Forgot to commit these... Should fix network stuff build issues.

Add again the load_driver_symbols() export into our KernelExport.h, as it's expected
by many kernel add-ons (drivers, modules)... the network ones, for a start.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2672 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin
2003-02-09 21:05:37 +00:00
parent d11f020628
commit e803870545
11 changed files with 72 additions and 75 deletions
+2
View File
@@ -191,6 +191,8 @@ typedef int (*debugger_command_hook)(int argc, char **argv);
extern int add_debugger_command(char *name, debugger_command_hook hook, char *help); extern int add_debugger_command(char *name, debugger_command_hook hook, char *help);
extern int remove_debugger_command(char *name, debugger_command_hook hook); extern int remove_debugger_command(char *name, debugger_command_hook hook);
extern status_t load_driver_symbols(char *driver_name);
/*-------------------------------------------------------------*/ /*-------------------------------------------------------------*/
/* misc */ /* misc */
+18 -20
View File
@@ -250,28 +250,26 @@ struct ifa_msghdr {
int ifam_metric; /* value of ifa_metric */ int ifam_metric; /* value of ifa_metric */
}; };
#ifdef _KERNEL_MODE /* function declaration */
/* function declaration */ struct ifq *start_ifq(void);
struct ifq *start_ifq(void); void stop_ifq(struct ifq *);
void stop_ifq(struct ifq *); struct ifnet *get_interfaces(void);
struct ifnet *get_interfaces(void); struct ifnet *ifunit(char *name);
struct ifnet *ifunit(char *name); struct ifaddr *ifa_ifwithaddr(struct sockaddr *);
struct ifaddr *ifa_ifwithaddr(struct sockaddr *); struct ifaddr *ifa_ifwithaf(int);
struct ifaddr *ifa_ifwithaf(int); struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *);
struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *); struct ifaddr *ifa_ifwithnet(struct sockaddr *);
struct ifaddr *ifa_ifwithnet(struct sockaddr *); struct ifaddr *ifa_ifwithroute(int, struct sockaddr *,
struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *);
struct sockaddr *); struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *);
struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *); void ifafree(struct ifaddr *);
void ifafree(struct ifaddr *);
void if_attach(struct ifnet *ifp); void if_attach(struct ifnet *ifp);
void if_detach(struct ifnet *ifp); void if_detach(struct ifnet *ifp);
int ifioctl(struct socket *so, ulong cmd, caddr_t data); int ifioctl(struct socket *so, ulong cmd, caddr_t data);
int ifconf(int cmd, char *data); int ifconf(int cmd, char *data);
void if_init(void); void if_init(void);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
+12 -21
View File
@@ -99,11 +99,7 @@ struct sockaddr_in {
#define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */ #define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */
#define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */ #define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */
#ifdef _KERNEL_MODE
#define __IPADDR(x) ((uint32) htonl((uint32)(x))) #define __IPADDR(x) ((uint32) htonl((uint32)(x)))
#else
#define __IPADDR(x) ((uint32)(x))
#endif
#define INADDR_ANY __IPADDR(0x00000000) #define INADDR_ANY __IPADDR(0x00000000)
#define INADDR_LOOPBACK __IPADDR(0x7f000001) #define INADDR_LOOPBACK __IPADDR(0x7f000001)
@@ -116,9 +112,7 @@ struct sockaddr_in {
#define IN_LOOPBACKNET 127 /* official! */ #define IN_LOOPBACKNET 127 /* official! */
#ifndef _KERNEL_MODE
#define INADDR_NONE __IPADDR(0xffffffff) #define INADDR_NONE __IPADDR(0xffffffff)
#endif
#define IN_CLASSA(i) (((uint32)(i) & __IPADDR(0x80000000)) == \ #define IN_CLASSA(i) (((uint32)(i) & __IPADDR(0x80000000)) == \
__IPADDR(0x00000000)) __IPADDR(0x00000000))
@@ -154,25 +148,22 @@ struct sockaddr_in {
#define IP_MAX_MEMBERSHIPS 20 #define IP_MAX_MEMBERSHIPS 20
#ifdef _KERNEL_MODE /* some helpful macro's :) */
/* some helpful macro's :) */ #define in_hosteq(s,t) ((s).s_addr == (t).s_addr)
#define in_hosteq(s,t) ((s).s_addr == (t).s_addr) #define in_nullhost(x) ((x).s_addr == INADDR_ANY)
#define in_nullhost(x) ((x).s_addr == INADDR_ANY) #define satosin(sa) ((struct sockaddr_in *)(sa))
#define satosin(sa) ((struct sockaddr_in *)(sa)) #define sintosa(sin) ((struct sockaddr *)(sin))
#define sintosa(sin) ((struct sockaddr *)(sin))
struct ifnet; // forward declaration struct ifnet; // forward declaration
/* Prototypes... */ /* Prototypes... */
int in_broadcast (struct in_addr, struct ifnet *); int in_broadcast (struct in_addr, struct ifnet *);
int in_canforward (struct in_addr); int in_canforward (struct in_addr);
int in_localaddr (struct in_addr); int in_localaddr (struct in_addr);
void in_socktrim (struct sockaddr_in*); void in_socktrim (struct sockaddr_in*);
/* uint16 in_cksum (struct mbuf *, int); */ /* uint16 in_cksum (struct mbuf *, int); */
uint16 in_cksum(struct mbuf *m, int len, int off); uint16 in_cksum(struct mbuf *m, int len, int off);
#endif /* _KERNEL_MODE */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
+18 -20
View File
@@ -46,28 +46,26 @@ struct inpcb {
struct route inp_route; /* the route to host */ struct route inp_route; /* the route to host */
}; };
#ifdef _KERNEL_MODE int in_pcbinit (void);
int in_pcbinit (void); int in_pcballoc (struct socket *, struct inpcb *);
int in_pcballoc (struct socket *, struct inpcb *); int in_pcbbind (struct inpcb *, struct mbuf *);
int in_pcbbind (struct inpcb *, struct mbuf *); int in_pcbconnect (struct inpcb *, struct mbuf *);
int in_pcbconnect (struct inpcb *, struct mbuf *); void in_pcbdetach (struct inpcb *);
void in_pcbdetach (struct inpcb *); int in_pcbdisconnect (struct inpcb *);
int in_pcbdisconnect (struct inpcb *); void in_losing (struct inpcb *);
void in_losing (struct inpcb *); void in_setpeeraddr (struct inpcb *, struct mbuf *);
void in_setpeeraddr (struct inpcb *, struct mbuf *); void in_setsockaddr (struct inpcb *, struct mbuf *);
void in_setsockaddr (struct inpcb *, struct mbuf *);
struct inpcb *in_pcblookup(struct inpcb *head, struct in_addr faddr, struct inpcb *in_pcblookup(struct inpcb *head, struct in_addr faddr,
uint16 fport_a, struct in_addr laddr, uint16 fport_a, struct in_addr laddr,
uint16 lport_a, int flags); uint16 lport_a, int flags);
struct rtentry *in_pcbrtentry (struct inpcb *); struct rtentry *in_pcbrtentry (struct inpcb *);
void in_pcbnotify (struct inpcb *, struct sockaddr *, void in_pcbnotify (struct inpcb *, struct sockaddr *,
uint16, struct in_addr, uint16, uint16, struct in_addr, uint16,
int, void (*)(struct inpcb *, int)); int, void (*)(struct inpcb *, int));
/* helpful macro's */ /* helpful macro's */
#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb) #define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
#endif /* _KERNEL_MODE */
#endif /* _NETINET_INPCB_H */ #endif /* _NETINET_INPCB_H */
-2
View File
@@ -54,9 +54,7 @@ typedef uint32 n_long; /* long as received from the net */
typedef uint32 n_time; /* ms since 00:00 GMT, byte rev */ typedef uint32 n_time; /* ms since 00:00 GMT, byte rev */
#ifdef _KERNEL_MODE
#define iptime() (htonl((uint32)real_time_clock_usecs())) #define iptime() (htonl((uint32)real_time_clock_usecs()))
#endif /* _KERNEL_MODE */
#endif /* NETINET_IN_SYSTM_H */ #endif /* NETINET_IN_SYSTM_H */
+2 -4
View File
@@ -52,9 +52,7 @@ struct in_multi {
* return a pointer to the addr as a sockaddr_in. * return a pointer to the addr as a sockaddr_in.
*/ */
#ifdef _KERNEL_MODE #define IA_SIN(ia) (&(((struct in_ifaddr *)(ia))->ia_addr))
#define IA_SIN(ia) (&(((struct in_ifaddr *)(ia))->ia_addr))
// extern struct in_ifaddr *in_ifaddr; // extern struct in_ifaddr *in_ifaddr;
@@ -63,6 +61,6 @@ struct in_multi {
int scrub); int scrub);
int inetctlerr(int cmd); int inetctlerr(int cmd);
struct in_ifaddr *get_primary_addr(void); struct in_ifaddr *get_primary_addr(void);
#endif
#endif /* NETINET_IN_VAR_H */ #endif /* NETINET_IN_VAR_H */
+11 -5
View File
@@ -5,6 +5,10 @@
#ifndef _SYS_DOMAIN_H #ifndef _SYS_DOMAIN_H
#define _SYS_DOMAIN_H #define _SYS_DOMAIN_H
#ifdef __cplusplus
extern "C" {
#endif
struct domain { struct domain {
int dom_family; /* AF_INET and so on */ int dom_family; /* AF_INET and so on */
char *dom_name; char *dom_name;
@@ -19,11 +23,13 @@ struct domain {
int dom_maxrtkey; int dom_maxrtkey;
}; };
#ifdef _KERNEL_MODE extern struct domain *domains;
struct domain *domains;
void add_domain (struct domain *dom, int fam); void add_domain (struct domain *dom, int fam);
void remove_domain (int fam); void remove_domain (int fam);
#endif /* _KERNEL_MODE */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DOMAIN_H */ #endif /* _SYS_DOMAIN_H */
-2
View File
@@ -11,7 +11,6 @@ typedef struct iovec {
} iovec; } iovec;
#ifdef _KERNEL_MODE
enum uio_rw { UIO_READ, UIO_WRITE }; enum uio_rw { UIO_READ, UIO_WRITE };
/* Segment flag values. */ /* Segment flag values. */
@@ -31,7 +30,6 @@ struct uio {
}; };
int uiomove(char *cp, int n, struct uio *uio); int uiomove(char *cp, int n, struct uio *uio);
#endif
ssize_t readv(int fd, const struct iovec *vector, size_t count); ssize_t readv(int fd, const struct iovec *vector, size_t count);
ssize_t readv_pos(int fd, off_t pos, const struct iovec *vec, size_t count); ssize_t readv_pos(int fd, off_t pos, const struct iovec *vec, size_t count);
+3
View File
@@ -59,13 +59,16 @@ status_t std_ops(int32 op, ...);
static int start_stack(void); static int start_stack(void);
static int stop_stack(void); static int stop_stack(void);
static void add_protosw(struct protosw *[], int layer); static void add_protosw(struct protosw *[], int layer);
static struct net_module *module_list = NULL; static struct net_module *module_list = NULL;
/* Wider scoped prototypes */ /* Wider scoped prototypes */
int net_sysctl(int *name, uint namelen, void *oldp, size_t *oldlenp, int net_sysctl(int *name, uint namelen, void *oldp, size_t *oldlenp,
void *newp, size_t newlen); void *newp, size_t newlen);
struct protosw * protocols; struct protosw * protocols;
struct domain *domains = NULL;
struct core_module_info core_info = { struct core_module_info core_info = {
{ {
-1
View File
@@ -36,7 +36,6 @@ static int sosend(struct socket *so, struct mbuf *addr, struct uio *uio,
static int soreceive (struct socket *so, struct mbuf **paddr, struct uio *uio, static int soreceive (struct socket *so, struct mbuf **paddr, struct uio *uio,
struct mbuf **mp0, struct mbuf **controlp, int *flagsp); struct mbuf **mp0, struct mbuf **controlp, int *flagsp);
/* Static global objects... */ /* Static global objects... */
static pool_ctl *spool; static pool_ctl *spool;
static benaphore sockets_lock; static benaphore sockets_lock;
+6
View File
@@ -1,5 +1,11 @@
SubDir OBOS_TOP src servers input ; SubDir OBOS_TOP src servers input ;
# AddResources
# input_server
# :
# input_server.rsrc
# ;
Server input_server : Server input_server :
InputServer.cpp InputServer.cpp
InputServerDevice.cpp InputServerDevice.cpp