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
+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_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */
#ifdef _KERNEL_MODE
#define __IPADDR(x) ((uint32) htonl((uint32)(x)))
#else
#define __IPADDR(x) ((uint32)(x))
#endif
#define INADDR_ANY __IPADDR(0x00000000)
#define INADDR_LOOPBACK __IPADDR(0x7f000001)
@@ -116,9 +112,7 @@ struct sockaddr_in {
#define IN_LOOPBACKNET 127 /* official! */
#ifndef _KERNEL_MODE
#define INADDR_NONE __IPADDR(0xffffffff)
#endif
#define IN_CLASSA(i) (((uint32)(i) & __IPADDR(0x80000000)) == \
__IPADDR(0x00000000))
@@ -154,25 +148,22 @@ struct sockaddr_in {
#define IP_MAX_MEMBERSHIPS 20
#ifdef _KERNEL_MODE
/* some helpful macro's :) */
#define in_hosteq(s,t) ((s).s_addr == (t).s_addr)
#define in_nullhost(x) ((x).s_addr == INADDR_ANY)
#define satosin(sa) ((struct sockaddr_in *)(sa))
#define sintosa(sin) ((struct sockaddr *)(sin))
/* some helpful macro's :) */
#define in_hosteq(s,t) ((s).s_addr == (t).s_addr)
#define in_nullhost(x) ((x).s_addr == INADDR_ANY)
#define satosin(sa) ((struct sockaddr_in *)(sa))
#define sintosa(sin) ((struct sockaddr *)(sin))
struct ifnet; // forward declaration
struct ifnet; // forward declaration
/* Prototypes... */
int in_broadcast (struct in_addr, struct ifnet *);
int in_canforward (struct in_addr);
int in_localaddr (struct in_addr);
void in_socktrim (struct sockaddr_in*);
/* Prototypes... */
int in_broadcast (struct in_addr, struct ifnet *);
int in_canforward (struct in_addr);
int in_localaddr (struct in_addr);
void in_socktrim (struct sockaddr_in*);
/* 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
}
#endif /* __cplusplus */
+18 -20
View File
@@ -46,28 +46,26 @@ struct inpcb {
struct route inp_route; /* the route to host */
};
#ifdef _KERNEL_MODE
int in_pcbinit (void);
int in_pcballoc (struct socket *, struct inpcb *);
int in_pcbbind (struct inpcb *, struct mbuf *);
int in_pcbconnect (struct inpcb *, struct mbuf *);
void in_pcbdetach (struct inpcb *);
int in_pcbdisconnect (struct inpcb *);
void in_losing (struct inpcb *);
void in_setpeeraddr (struct inpcb *, struct mbuf *);
void in_setsockaddr (struct inpcb *, struct mbuf *);
int in_pcbinit (void);
int in_pcballoc (struct socket *, struct inpcb *);
int in_pcbbind (struct inpcb *, struct mbuf *);
int in_pcbconnect (struct inpcb *, struct mbuf *);
void in_pcbdetach (struct inpcb *);
int in_pcbdisconnect (struct inpcb *);
void in_losing (struct inpcb *);
void in_setpeeraddr (struct inpcb *, struct mbuf *);
void in_setsockaddr (struct inpcb *, struct mbuf *);
struct inpcb *in_pcblookup(struct inpcb *head, struct in_addr faddr,
uint16 fport_a, struct in_addr laddr,
uint16 lport_a, int flags);
struct rtentry *in_pcbrtentry (struct inpcb *);
void in_pcbnotify (struct inpcb *, struct sockaddr *,
uint16, struct in_addr, uint16,
int, void (*)(struct inpcb *, int));
struct inpcb *in_pcblookup(struct inpcb *head, struct in_addr faddr,
uint16 fport_a, struct in_addr laddr,
uint16 lport_a, int flags);
struct rtentry *in_pcbrtentry (struct inpcb *);
void in_pcbnotify (struct inpcb *, struct sockaddr *,
uint16, struct in_addr, uint16,
int, void (*)(struct inpcb *, int));
/* helpful macro's */
#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
#endif /* _KERNEL_MODE */
/* helpful macro's */
#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
#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 */
#ifdef _KERNEL_MODE
#define iptime() (htonl((uint32)real_time_clock_usecs()))
#endif /* _KERNEL_MODE */
#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.
*/
#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;
@@ -63,6 +61,6 @@ struct in_multi {
int scrub);
int inetctlerr(int cmd);
struct in_ifaddr *get_primary_addr(void);
#endif
#endif /* NETINET_IN_VAR_H */