2002-07-11 02:10:23 +04:00
|
|
|
/* net_module.h
|
|
|
|
* fundtions and staructures for all modules using the
|
|
|
|
* net_server
|
|
|
|
*/
|
|
|
|
|
2002-08-27 11:59:57 +04:00
|
|
|
#ifndef OBOS_NET_MODULE_H
|
|
|
|
#define OBOS_NET_MODULE_H
|
2002-07-11 02:10:23 +04:00
|
|
|
|
2002-08-27 11:59:57 +04:00
|
|
|
#include <kernel/OS.h>
|
|
|
|
#include <image.h>
|
2002-07-11 02:10:23 +04:00
|
|
|
|
2002-10-30 04:21:54 +03:00
|
|
|
#include "mbuf.h"
|
2002-08-27 11:59:57 +04:00
|
|
|
#include "net_misc.h"
|
|
|
|
#include "sys/socketvar.h"
|
|
|
|
#include "net/if.h"
|
|
|
|
#include "net/route.h"
|
|
|
|
|
|
|
|
#ifdef _KERNEL_MODE
|
2002-07-11 02:10:23 +04:00
|
|
|
#include <module.h>
|
2002-08-27 11:59:57 +04:00
|
|
|
#else
|
|
|
|
typedef struct module_info {
|
|
|
|
const char *name;
|
|
|
|
uint32 flags;
|
|
|
|
status_t (*std_ops)(int32, ...);
|
|
|
|
} module_info;
|
|
|
|
|
|
|
|
#define B_MODULE_INIT 1
|
|
|
|
#define B_MODULE_UNINIT 2
|
|
|
|
#define B_KEEP_LOADED 0x00000001
|
|
|
|
#endif
|
2002-07-11 02:10:23 +04:00
|
|
|
|
|
|
|
struct kernel_net_module_info {
|
|
|
|
module_info info;
|
|
|
|
int (*start)(void *);
|
|
|
|
int (*stop)(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct net_module {
|
|
|
|
struct net_module *next;
|
|
|
|
char *name;
|
|
|
|
struct kernel_net_module_info *ptr;
|
2002-10-30 04:21:54 +03:00
|
|
|
#ifndef _KERNEL_MODE
|
2002-08-27 11:59:57 +04:00
|
|
|
image_id iid;
|
|
|
|
#endif
|
2002-07-11 02:10:23 +04:00
|
|
|
int status;
|
|
|
|
};
|
2002-10-30 04:21:54 +03:00
|
|
|
|
|
|
|
//XXX already in posix/sys/protosw.h
|
|
|
|
//enum {
|
|
|
|
// NET_LAYER1 = 1, /* link layer */
|
|
|
|
// NET_LAYER2, /* network layer */
|
|
|
|
// NET_LAYER3, /* transport layer */
|
|
|
|
// NET_LAYER4 /* socket layer */
|
|
|
|
//};
|
2002-07-11 02:10:23 +04:00
|
|
|
|
2002-08-27 11:59:57 +04:00
|
|
|
#endif /* OBOS_NET_MODULE_H */
|
2002-07-11 02:10:23 +04:00
|
|
|
|