]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/afp_util.c
AFP_LOGINCONT was missing in AFP cmdcode stringizer
[netatalk.git] / etc / afpd / afp_util.c
1 /*
2  * $Id: afp_util.c,v 1.6 2009-09-28 11:59:44 franklahm Exp $
3  *
4  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
5  * Copyright (c) 1990,1993 Regents of The University of Michigan.
6  * All Rights Reserved.  See COPYRIGHT.
7  *
8  * Copyright (c) 2002 netatalk
9  *
10  * 
11  */
12
13 #ifdef HAVE_CONFIG_H
14 #include "config.h"
15 #endif /* HAVE_CONFIG_H */
16
17 #include <atalk/afp.h>
18
19 const char *AfpNum2name(int num)
20 {
21         switch(num) {
22     case AFP_BYTELOCK      : return "AFP_BYTELOCK";         /*   1 */
23         case AFP_CLOSEVOL      : return "AFP_CLOSEVOL";             /*   2 */
24         case AFP_CLOSEDIR      : return "AFP_CLOSEDIR";             /*   3 */
25         case AFP_CLOSEFORK     : return "AFP_CLOSEFORK";            /*   4 */
26         case AFP_COPYFILE      : return "AFP_COPYFILE";             /*   5 */
27         case AFP_CREATEDIR     : return "AFP_CREATEDIR";            /*   6 */
28         case AFP_CREATEFILE    : return "AFP_CREATEFILE";           /*   7 */
29         case AFP_DELETE        : return "AFP_DELETE";               /*   8 */
30         case AFP_ENUMERATE     : return "AFP_ENUMERATE";            /*   9 */
31         case AFP_FLUSH         : return "AFP_FLUSH";                /*  10 */
32         case AFP_FLUSHFORK     : return "AFP_FLUSHFORK";            /*  11 */
33
34         case AFP_GETFORKPARAM  : return "AFP_GETFORKPARAM";     /*      14 */
35         case AFP_GETSRVINFO    : return "AFP_GETSRVINFO";           /*  15 */
36         case AFP_GETSRVPARAM   : return "AFP_GETSRVPARAM";      /*      16 */
37         case AFP_GETVOLPARAM   : return "AFP_GETVOLPARAM";      /*      17 */
38         case AFP_LOGIN         : return "AFP_LOGIN";                /*  18 */
39     case AFP_LOGINCONT     : return "AFP_LOGINCONT";        /*  19 */
40         case AFP_LOGOUT        : return "AFP_LOGOUT";               /*  20 */
41     case AFP_MAPID         : return "AFP_MAPID";            /*  21 */
42     case AFP_MAPNAME       : return "AFP_MAPNAME";          /*  22 */
43     case AFP_MOVE          : return "AFP_MOVE";             /*  23 */
44         case AFP_OPENVOL       : return "AFP_OPENVOL";              /*  24 */
45         case AFP_OPENDIR       : return "AFP_OPENDIR";              /*  25 */
46         case AFP_OPENFORK      : return "AFP_OPENFORK";             /*  26 */
47         case AFP_READ              : return "AFP_READ";                     /*  27 */
48     case AFP_RENAME        : return "AFP_RENAME";           /*  28 */
49     case AFP_SETDIRPARAM   : return "AFP_SETDIRPARAM";      /*  29 */
50     case AFP_SETFILEPARAM  : return "AFP_SETFILEPARAM";     /*  30 */
51     case AFP_SETFORKPARAM  : return "AFP_SETFORKPARAM";     /*  31 */
52     case AFP_SETVOLPARAM   : return "AFP_SETVOLPARAM ";     /*  32 */
53         case AFP_WRITE             : return "AFP_WRITE";                    /*  33 */
54         case AFP_GETFLDRPARAM  : return "AFP_GETFLDRPARAM";         /*  34 */   
55         case AFP_SETFLDRPARAM  : return "AFP_SETFLDRPARAM";         /*  35 */   
56         case AFP_CHANGEPW      : return "AFP_CHANGEPW";         /*  36 */       
57
58     case AFP_GETSRVRMSG    : return "AFP_GETSRVRMSG";       /*  38 */
59     case AFP_CREATEID      : return "AFP_CREATEID";         /*  39 */
60     case AFP_DELETEID      : return "AFP_DELETEID";         /*  40 */
61     case AFP_RESOLVEID     : return "AFP_RESOLVEID";        /*  41 */
62     case AFP_EXCHANGEFILE  : return "AFP_EXCHANGEFILE";     /*  42 */
63     case AFP_CATSEARCH     : return "AFP_CATSEARCH";        /*  43 */
64
65         case AFP_OPENDT        : return "AFP_OPENDT";                   /*  48 */
66         case AFP_CLOSEDT       : return "AFP_CLOSEDT";              /*  49 */
67     case AFP_GETICON       : return "AFP_GETICON";                  /*  51 */
68     case AFP_GTICNINFO     : return "AFP_GTICNINFO";            /*      52 */
69     case AFP_ADDAPPL       : return "AFP_ADDAPPL";              /*      53 */
70     case AFP_RMVAPPL       : return "AFP_RMVAPPL";              /*      54 */
71     case AFP_GETAPPL       : return "AFP_GETAPPL";              /*      55 */
72     case AFP_ADDCMT        : return "AFP_ADDCMT";               /*      56 */
73         case AFP_RMVCMT        : return "AFP_RMVCMT";           /*      57 */
74         case AFP_GETCMT        : return "AFP_GETCMT";           /*      58 */
75         case AFP_ADDICON       : return "AFP_ADDICON";          /* 192 */
76     /* version 3.0 */
77     case AFP_BYTELOCK_EXT  : return "AFP_BYTELOCK_EXT";     /*  59 */
78     case AFP_READ_EXT      : return "AFP_READ_EXT";         /*  60 */
79     case AFP_WRITE_EXT     : return "AFP_WRITE_EXT";        /*  61 */
80     case AFP_GETSESSTOKEN  : return "AFP_GETSESSTOKEN";     /*  64 */ 
81     case AFP_LOGIN_EXT     : return "AFP_LOGIN_EXT";        /*  63 */
82     case AFP_DISCTOLDSESS  : return "AFP_DISCTOLDSESS";     /*  65 */
83     case AFP_ENUMERATE_EXT : return "AFP_ENUMERATE_EXT";    /*  66 */
84     case AFP_CATSEARCH_EXT : return "AFP_CATSEARCH_EXT";    /*  67 */
85     /* version 3.1 */
86     case AFP_ENUMERATE_EXT2: return "AFP_ENUMERATE_EXT2";   /*  68 */
87     case AFP_ZZZ  : return "AFP_ZZZ";       /* 122 */
88     /* version 3.2 */                                                                                                                     
89     case AFP_GETEXTATTR         : return "AFP_GETEXTATTR";            /* 69 */
90     case AFP_SETEXTATTR         : return "AFP_SETEXTATTR";            /* 70 */
91     case AFP_REMOVEATTR         : return "AFP_REMOVEATTR";            /* 71 */
92     case AFP_LISTEXTATTR        : return "AFP_LISTEXTATTR";           /* 72 */
93     case AFP_GETACL             : return "AFP_GETACL";            /* 73 */
94     case AFP_SETACL             : return "AFP_SETACL";            /* 74 */
95     case AFP_ACCESS             : return "AFP_ACCESS";            /* 75 */
96     case AFP_SPOTLIGHT_PRIVATE  : return "AFP_SPOTLIGHT_PRIVATE"; /* 76 */
97     case AFP_SYNCDIR            : return "AFP_SYNCDIR";           /* 78 */
98     case AFP_SYNCFORK           : return "AFP_SYNCFORK";              /* 79 */
99         }
100         return "not yet defined";                                                                 
101 }