modified to support building of libnet

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@960 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2002-09-03 00:02:40 +00:00
parent e1481ffc45
commit 0b5170a447
8 changed files with 21 additions and 63 deletions
+6 -1
View File
@@ -4,10 +4,12 @@
#ifndef _SYS_SOCKET_H
#define _SYS_SOCKET_H
#include <OS.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
typedef uint32 socklen_t;
/* These are the address/protocol families we'll be using... */
/* NB these should be added to as required... */
@@ -189,6 +191,7 @@ struct cmsghdr {
/* there now follows uchar[] cmsg_data */
};
#if 0
#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
@@ -225,6 +228,8 @@ struct cmsghdr {
#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */
#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */
#endif
#ifndef _KERNEL_MODE
/* Function declarations */
+1 -1
View File
@@ -5,7 +5,7 @@
#define _SYS_SOCKETVAR_H
#include <OS.h>
#include <mbuf.h>
#include <sys/mbuf.h>
#include <sys/uio.h>
#include <sys/socket.h>
+4 -24
View File
@@ -1,29 +1,9 @@
/* net_ioctl.h */
#ifndef _SYS_SOCKIO_H
#define _SYS_SOCKIO_H
#ifndef SYS_NET_IOCTL_H
#define SYS_NET_IOCTL_H
#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */
#define IOC_OUT (unsigned long)0x40000000
/* copy parameters in */
#define IOC_IN (unsigned long)0x80000000
/* copy paramters in and out */
#define IOC_INOUT (IOC_IN|IOC_OUT)
/* mask for IN/OUT/VOID */
#define _IOC(inout,group,num,len) \
(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
#define IOCGROUP(x) (((x) >> 8) & 0xff)
#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t))
#define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t))
#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */
#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */
#include <sys/ioccom.h>
/* Socket ioctl's. */
#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */