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 "stdlib.h":
13 void * malloc(int size)
16 cdef extern from "netinet/in.h":
21 unsigned short sin_port
25 cdef extern from "afs/stds.h":
26 ctypedef unsigned long afs_uint32
27 ctypedef long afs_int32
29 cdef extern from "afs/dirpath.h":
30 char * AFSDIR_CLIENT_ETC_DIRPATH
32 cdef extern from "afs/cellconfig.h":
38 # We just pass afsconf_dir structs around to other AFS functions,
39 # so this can be treated as opaque
43 # For afsconf_cell, on the other hand, we care about everything
45 char name[MAXCELLCHARS]
48 sockaddr_in hostAddr[MAXHOSTSPERCELL]
49 char hostName[MAXHOSTSPERCELL][MAXHOSTCHARS]
53 afsconf_dir *afsconf_Open(char *adir)
54 int afsconf_GetCellInfo(afsconf_dir *adir,
57 afsconf_cell *acellInfo)
59 cdef extern from "rx/rxkad.h":
60 ctypedef char rxkad_level
70 struct ktc_encryptionKey:
74 char name[MAXKTCNAMELEN]
75 char instance[MAXKTCNAMELEN]
76 char cell[MAXKTCREALMLEN]
78 struct rx_securityClass:
81 rx_securityClass *rxkad_NewClientSecurityObject(rxkad_level level,
82 ktc_encryptionKey *sessionKey,
86 rx_securityClass *rxnull_NewClientSecurityObject()
88 int rxs_Release(rx_securityClass *aobj)
90 cdef extern from "rx/rx.h":
97 rx_connection *rx_NewConnection(afs_uint32 shost,
99 unsigned short sservice,
100 rx_securityClass *securityObject,
101 int serviceSecurityIndex)
103 cdef extern from "afs/auth.h":
108 ktc_encryptionKey sessionKey
111 char ticket[MAXKTCTICKETLEN]
113 int ktc_GetToken(ktc_principal *server,
116 ktc_principal *client)
118 cdef extern from "afs/prclient.h":
122 cdef extern from "ubik.h":
126 # ubik_client is an opaque struct, so we don't care about its members
130 int ubik_ClientInit(rx_connection **serverconns,
131 ubik_client **aclient)
132 afs_int32 ubik_ClientDestroy(ubik_client *aclient)
134 cdef extern from "afs/com_err.h":
135 char * afs_error_message(int)