summaryrefslogtreecommitdiffstats
path: root/src/appl/popper/pop_xtnd.c
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1993-06-03 19:29:40 +0000
committerTheodore Tso <tytso@mit.edu>1993-06-03 19:29:40 +0000
commit746386f12e01102acbe5637aac6f1259c74bb552 (patch)
tree715df6527f739854dc978c588047607e1907e9e9 /src/appl/popper/pop_xtnd.c
parentacbed92e113f54d33789d427e697a23a0f07ab64 (diff)
downloadkrb5-746386f12e01102acbe5637aac6f1259c74bb552.tar.gz
krb5-746386f12e01102acbe5637aac6f1259c74bb552.tar.xz
krb5-746386f12e01102acbe5637aac6f1259c74bb552.zip
Initial revision
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2611 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/popper/pop_xtnd.c')
-rw-r--r--src/appl/popper/pop_xtnd.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/appl/popper/pop_xtnd.c b/src/appl/popper/pop_xtnd.c
new file mode 100644
index 0000000000..29aaed8f70
--- /dev/null
+++ b/src/appl/popper/pop_xtnd.c
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 1989 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char copyright[] = "Copyright (c) 1990 Regents of the University of California.\nAll rights reserved.\n";
+static char SccsId[] = "@(#)pop_xtnd.c 1.5 7/13/90";
+#endif not lint
+
+#include <stdio.h>
+#include <sys/types.h>
+#include "popper.h"
+
+/*
+ * xtnd: Handle extensions to the POP protocol suite
+ */
+
+extern xtnd_table * pop_get_subcommand();
+
+int pop_xtnd (p)
+POP * p;
+{
+ xtnd_table * x;
+
+ /* Convert the XTND subcommand to lower case */
+ pop_lower(p->pop_subcommand);
+
+ /* Search for the subcommand in the XTND command table */
+ if ((x = pop_get_subcommand(p)) == NULL) return(POP_FAILURE);
+
+ /* Call the function associated with this subcommand */
+ if (x->function) return((*x->function)(p));
+
+ /* Otherwise assume NOOP */
+ return (pop_msg(p,POP_SUCCESS,NULL));
+}