From cda78f2486272d8485b267661f2c393948568d81 Mon Sep 17 00:00:00 2001 From: David Reid Date: Wed, 10 Jul 2002 22:10:23 +0000 Subject: [PATCH] Start adding the networking headers in their correct place and with the correct things in them. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@64 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/net/icmp_module.h | 16 +++++++++++++++ headers/private/net/ipv4_module.h | 34 +++++++++++++++++++++++++++++++ headers/private/net/net_module.h | 29 ++++++++++++++++++++++++++ headers/private/net/raw_module.h | 21 +++++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 headers/private/net/icmp_module.h create mode 100644 headers/private/net/ipv4_module.h create mode 100644 headers/private/net/net_module.h create mode 100644 headers/private/net/raw_module.h diff --git a/headers/private/net/icmp_module.h b/headers/private/net/icmp_module.h new file mode 100644 index 0000000000..880301f545 --- /dev/null +++ b/headers/private/net/icmp_module.h @@ -0,0 +1,16 @@ +/* icmp_module.h + */ + +#ifndef ICMP_MODULE_H +#define ICMP_MODULE_H + +#include + +#define ICMP_MODULE_PATH "network/protocol/icmp" + +struct icmp_module_info { + struct kernel_net_module_info info; + void (*error)(struct mbuf *, int, int, n_long, struct ifnet *); +}; + +#endif /* ICMP_MODULE_H */ diff --git a/headers/private/net/ipv4_module.h b/headers/private/net/ipv4_module.h new file mode 100644 index 0000000000..1b44bef06c --- /dev/null +++ b/headers/private/net/ipv4_module.h @@ -0,0 +1,34 @@ +/* ipv4_module.h + * definitions for ipv4 protocol + */ + +#ifndef IPV4_MODULE_H +#define IPV4_MODULE_H + +#ifndef _KERNEL_MODE +#error "This is a kernel ONLY file" +#endif + +#include "net/net_module.h" + +#define IPV4_MODULE_PATH "network/protocol/ipv4" + +struct ipv4_module_info { + struct kernel_net_module_info info; + int (*output)(struct mbuf *, + struct mbuf *, + struct route *, + int, void *); + int (*ctloutput)(int, + struct socket *, + int, int, + struct mbuf **); + struct mbuf *(*ip_srcroute)(void); + void (*ip_stripoptions)(struct mbuf *, + struct mbuf *); + struct mbuf *(*srcroute)(void); +}; + +extern uint16 ip_id; + +#endif /* IPV4_MODULE_H */ diff --git a/headers/private/net/net_module.h b/headers/private/net/net_module.h new file mode 100644 index 0000000000..0dc638ff39 --- /dev/null +++ b/headers/private/net/net_module.h @@ -0,0 +1,29 @@ +/* net_module.h + * fundtions and staructures for all modules using the + * net_server + */ + +#ifndef _NET_NET_MODULE_H +#define _NET_NET_MODULE_H + +#include + +#include + +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; + int status; +}; + +int inetctlerrmap(int); + +#endif /* _NET_NET_MODULE_H */ + diff --git a/headers/private/net/raw_module.h b/headers/private/net/raw_module.h new file mode 100644 index 0000000000..ec77ad2447 --- /dev/null +++ b/headers/private/net/raw_module.h @@ -0,0 +1,21 @@ +/* raw_module.h + */ + +#ifndef RAW_MODULE_H +#define RAW_MODULE_H + +#include "net_module.h" + +#ifdef _KERNEL_ +#include +#define RAW_MODULE_PATH "network/protocol/raw" +#else +#define RAW_MODULE_PATH "modules/protocols/raw" +#endif + +struct raw_module_info { + struct kernel_net_module_info info; + void (*input)(struct mbuf *, int); +}; + +#endif /* RAW_MODULE_H */