|
|
1.1 ! root 1: #include <ipc.h> ! 2: #include <stdio.h> ! 3: #include <libc.h> ! 4: #include <regexp.h> ! 5: ! 6: /* ! 7: * table of regular expressions ! 8: */ ! 9: ! 10: typedef struct cregexp { ! 11: struct cregexp *next; ! 12: char *re; /* uncompiled reg exp */ ! 13: regexp *prog; /* compiled reg exp */ ! 14: int ref; /* reference count */ ! 15: } Cregexp; ! 16: extern Cregexp *newre(); ! 17: extern int freerep(); ! 18: extern int execre(); ! 19: ! 20: /* ! 21: * table of user mappings ! 22: * one per line in the mapping files ! 23: */ ! 24: ! 25: typedef struct mapping{ ! 26: Cregexp *from; /* originating machine */ ! 27: Cregexp *user; /* originating user */ ! 28: Cregexp *serv; /* service(s) requested */ ! 29: char *luser; /* local user name to use */ ! 30: struct mapping *next; ! 31: } Mapping; ! 32: extern Mapping *newmap(); ! 33: extern int freemap(); ! 34: extern int addmap(); ! 35: ! 36: /* ! 37: * action instances ! 38: * a linked list of these exist for each service ! 39: */ ! 40: ! 41: typedef struct action { ! 42: int (*func)(); /* funciton to use for this action */ ! 43: char *arg; /* arguments or NULL */ ! 44: int accept; /* true if ipcaccept to be done by action */ ! 45: struct action *next; ! 46: } Action; ! 47: extern Action *newaction(); ! 48: extern int freeaction(); ! 49: ! 50: /* ! 51: * table of services ! 52: * one per line in the file of services (hopefully) ! 53: */ ! 54: ! 55: typedef struct service { ! 56: char *name; /* name of service (e.g. `uucp') */ ! 57: Cregexp *from; /* originating machine */ ! 58: int listen; /* fd for listening */ ! 59: Action *ap; /* list of actions to perform */ ! 60: int accept; /* true if ipcaccept to be done by the service */ ! 61: long lasttime; ! 62: struct service *same; ! 63: struct service *next; ! 64: } Service; ! 65: extern Service *newservice(); ! 66: extern int freeservice(); ! 67: extern int addservice(); ! 68: ! 69: /* ! 70: * request returned by listen ! 71: */ ! 72: typedef struct { ! 73: ipcinfo *i; /* from the ipclisten */ ! 74: Service *s; /* service requested */ ! 75: char *line; /* password line from authentication */ ! 76: char *args; /* args gotten by from getargs */ ! 77: char *term; /* terminal type */ ! 78: int errfd; /* standard error (if different from stdout) */ ! 79: } Request; ! 80: extern Request *newrequest(); ! 81: extern int freerequest(); ! 82: ! 83: extern int logevent(); ! 84: ! 85: #define ARB 512
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.