4 cdef extern from "errno.h":
7 cdef extern from "string.h":
8 char * strerror(int errnum)
9 char * strncpy(char *s1, char *s2, size_t n)
10 void * memset(void *b, int c, size_t n)
11 void * memcpy(void *s1, void *s2, size_t n)
13 cdef extern from "stdlib.h":
14 void * malloc(size_t size)
17 cdef extern from "netinet/in.h":
22 unsigned short sin_port
26 cdef extern from "afs/stds.h":
27 ctypedef unsigned long afs_uint32
28 ctypedef long afs_int32
30 cdef extern from "afs/dirpath.h":
31 char * AFSDIR_CLIENT_ETC_DIRPATH
33 cdef extern from "afs/cellconfig.h":
39 # We just pass afsconf_dir structs around to other AFS functions,
40 # so this can be treated as opaque
44 # For afsconf_cell, on the other hand, we care about everything
46 char name[MAXCELLCHARS]
49 sockaddr_in hostAddr[MAXHOSTSPERCELL]
50 char hostName[MAXHOSTSPERCELL][MAXHOSTCHARS]
54 afsconf_dir *afsconf_Open(char *adir)
55 int afsconf_GetCellInfo(afsconf_dir *adir,
58 afsconf_cell *acellInfo)
60 cdef extern from "rx/rxkad.h":
61 ctypedef char rxkad_level
71 struct ktc_encryptionKey:
75 char name[MAXKTCNAMELEN]
76 char instance[MAXKTCNAMELEN]
77 char cell[MAXKTCREALMLEN]
79 struct rx_securityClass:
82 rx_securityClass *rxkad_NewClientSecurityObject(rxkad_level level,
83 ktc_encryptionKey *sessionKey,
87 rx_securityClass *rxnull_NewClientSecurityObject()
89 int rxs_Release(rx_securityClass *aobj)
91 cdef extern from "rx/rx.h":
98 rx_connection *rx_NewConnection(afs_uint32 shost,
100 unsigned short sservice,
101 rx_securityClass *securityObject,
102 int serviceSecurityIndex)
104 cdef extern from "afs/auth.h":
109 ktc_encryptionKey sessionKey
112 char ticket[MAXKTCTICKETLEN]
114 int ktc_GetToken(ktc_principal *server,
117 ktc_principal *client)
119 cdef extern from "afs/prclient.h":
123 cdef extern from "ubik.h":
127 # ubik_client is an opaque struct, so we don't care about its members
131 int ubik_ClientInit(rx_connection **serverconns,
132 ubik_client **aclient)
133 afs_int32 ubik_ClientDestroy(ubik_client *aclient)
135 cdef extern from "afs/com_err.h":
136 char * afs_error_message(int)
138 # All AFS error tables
139 cdef extern from "afs/auth.h":
140 void initialize_KTC_error_table()
141 cdef extern from "afs/cellconfig.h":
142 void initialize_ACFG_error_table()
143 cdef extern from "afs/pterror.h":
144 void initialize_PT_error_table()
145 cdef extern from "rx/rxkad.h":
146 void initialize_RXK_error_table()
147 cdef extern from "ubik.h":
148 void initialize_U_error_table()