Some net cleanup...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1907 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin 2002-11-12 21:03:25 +00:00
parent c399a55fcd
commit a0a6d75d61
5 changed files with 8 additions and 30 deletions

View File

@ -151,10 +151,6 @@ struct core_module_info {
int (*socket_set_event_callback)(struct socket *so, socket_event_callback, void *, int);
};
#ifdef _KERNEL_MODE
#define CORE_MODULE_PATH "network/core"
#else
#define CORE_MODULE_PATH "modules/core"
#endif
#define NET_CORE_MODULE_NAME "network/core/v1"
#endif /* OBOS_CORE_MODULE_H */

View File

@ -6,20 +6,12 @@
#include "net_module.h"
#ifdef _KERNEL_MODE
#include <KernelExport.h>
#define ICMP_MODULE_PATH "network/protocol/icmp"
#else /* _KERNEL_MODE */
#define ICMP_MODULE_PATH "modules/protocol/icmp"
#endif /* _KERNEL_MODE */
#define NET_ICMP_MODULE_NAME "network/protocols/icmp"
struct icmp_module_info {
struct kernel_net_module_info info;
#ifndef _KERNEL_MODE
void (*set_core)(struct core_module_info *);
#endif
void (*error)(struct mbuf *, int, int, n_long, struct ifnet *);
};

View File

@ -7,18 +7,11 @@
#include "net_module.h"
#ifdef _KERNEL_MODE
#include <KernelExport.h>
#define IPV4_MODULE_PATH "network/protocol/ipv4"
#else /* _KERNEL_MODE */
#define IPV4_MODULE_PATH "modules/protocol/ipv4"
#endif /* _KERNEL_MODE */
#define NET_IPV4_MODULE_NAME "network/protocols/ipv4"
struct ipv4_module_info {
struct kernel_net_module_info info;
#ifndef _KERNEL_MODE
void (*set_core)(struct core_module_info *);
#endif
int (*output)(struct mbuf *,
struct mbuf *,

View File

@ -6,15 +6,12 @@
#include "net_module.h"
#ifdef _KERNEL_MODE
#include <KernelExport.h>
#define RAW_MODULE_PATH "network/protocol/raw"
#else
#define RAW_MODULE_PATH "modules/protocols/raw"
#endif
#define NET_RAW_MODULE_NAME "network/protocols/raw"
struct raw_module_info {
struct kernel_net_module_info info;
void (*input)(struct mbuf *, int);
};

View File

@ -207,9 +207,9 @@ _EXPORT status_t init_driver(void)
dprintf(LOGID "init_driver, built %s %s\n", __DATE__, __TIME__);
#endif
rv = get_module(CORE_MODULE_PATH, (module_info **) &core);
rv = get_module(NET_CORE_MODULE_NAME, (module_info **) &core);
if (rv < 0) {
dprintf(LOGID ERR "Argh, can't load " CORE_MODULE_PATH " module: %d\n", rv);
dprintf(LOGID ERR "Argh, can't load " NET_CORE_MODULE_NAME " module: %d\n", rv);
return rv;
}
@ -239,7 +239,7 @@ _EXPORT void uninit_driver(void)
// shutdown the network stack
core->stop();
#endif
put_module(CORE_MODULE_PATH);
put_module(NET_CORE_MODULE_NAME);
};
}