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)
12 cdef extern from "netinet/in.h":
17 unsigned short sin_port
21 cdef extern from "afs/stds.h":
22 ctypedef unsigned long afs_uint32
23 ctypedef long afs_int32
25 cdef extern from "afs/dirpath.h":
26 char * AFSDIR_CLIENT_ETC_DIRPATH
28 cdef extern from "afs/cellconfig.h":
34 # We just pass afsconf_dir structs around to other AFS functions,
35 # so this can be treated as opaque
39 # For afsconf_cell, on the other hand, we care about everything
41 char name[MAXCELLCHARS]
44 sockaddr_in hostAddr[MAXHOSTSPERCELL]
45 char hostName[MAXHOSTSPERCELL][MAXHOSTCHARS]
49 afsconf_dir *afsconf_Open(char *adir)
50 int afsconf_GetCellInfo(afsconf_dir *adir,
53 afsconf_cell *acellInfo)
55 cdef extern from "rx/rxkad.h":
56 ctypedef char rxkad_level
66 struct ktc_encryptionKey:
70 char name[MAXKTCNAMELEN]
71 char instance[MAXKTCNAMELEN]
72 char cell[MAXKTCREALMLEN]
74 struct rx_securityClass:
77 rx_securityClass *rxkad_NewClientSecurityObject(rxkad_level level,
78 ktc_encryptionKey *sessionKey,
82 rx_securityClass *rxnull_NewClientSecurityObject()
84 int rxs_Release(rx_securityClass *aobj)
86 cdef extern from "rx/rx.h":
93 rx_connection *rx_NewConnection(afs_uint32 shost,
95 unsigned short sservice,
96 rx_securityClass *securityObject,
97 int serviceSecurityIndex)
99 cdef extern from "afs/auth.h":
104 ktc_encryptionKey sessionKey
107 char ticket[MAXKTCTICKETLEN]
109 int ktc_GetToken(ktc_principal *server,
112 ktc_principal *client)
114 cdef extern from "afs/prclient.h":
118 cdef extern from "ubik.h":
122 # ubik_client is an opaque struct, so we don't care about its members
126 int ubik_ClientInit(rx_connection **serverconns,
127 ubik_client **aclient)
128 afs_int32 ubik_ClientDestroy(ubik_client *aclient)
130 cdef extern from "afs/com_err.h":
131 char * afs_error_message(int)