00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef LIBGATE_H_
00012 # define LIBGATE_H_
00013
00014 # include <libc.h>
00015
00016 # define GATE_NAME_SZ 64
00017 # define OK 0
00018 # define NOT_OK 1
00019
00020 enum e_libgate_errors
00021 {
00022 ENOGATE = 2,
00023 EREGISTERED,
00024 ENOPROCESS,
00025 EGATEEMPTY,
00026 ENOCLASS,
00027 ECOPY
00028 };
00029
00030
00031
00032
00033
00034 enum gate_classes
00035 {
00036 CLASS_KERNEL = 1,
00037 CLASS_NETWORK,
00038 CLASS_ETHERNET
00039 };
00040
00041 typedef struct
00042 {
00043 int class;
00044 int gate_id;
00045 int minor;
00046 char manufacturer[GATE_NAME_SZ];
00047 char dev_name[GATE_NAME_SZ];
00048 int gate_index;
00049 } t_gate_infos;
00050
00063 int gatesrv_register(int class,
00064 int gate_id,
00065 int minor,
00066 char *manufacturer,
00067 char *dev_name);
00068
00077 int gatesrv_unregister(int gate_id);
00078
00091 int gatesrv_get_first(int class,
00092 t_gate_infos *gi,
00093 int *occur);
00094
00107 int gatesrv_get_next(int class,
00108 t_gate_infos *gi,
00109 int *occur);
00110
00120 int gatesrv_use(t_gate_infos *gi);
00121
00122
00131 int gatesrv_unuse(t_gate_infos *gi);
00132
00133 #endif