diff options
Diffstat (limited to 'pfinet/linux-src/include')
-rw-r--r-- | pfinet/linux-src/include/linux/isdn_compat.h | 108 | ||||
-rw-r--r-- | pfinet/linux-src/include/linux/net.h | 12 | ||||
-rw-r--r-- | pfinet/linux-src/include/linux/rtnetlink.h | 10 |
3 files changed, 15 insertions, 115 deletions
diff --git a/pfinet/linux-src/include/linux/isdn_compat.h b/pfinet/linux-src/include/linux/isdn_compat.h deleted file mode 100644 index db002c41..00000000 --- a/pfinet/linux-src/include/linux/isdn_compat.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifdef __KERNEL__ -/* Compatibility for various Linux kernel versions */ - -#ifndef _LINUX_ISDN_COMPAT_H -#define _LINUX_ISDN_COMPAT_H - -#ifndef LINUX_VERSION_CODE -#include <linux/version.h> -#endif - -#ifndef KERNEL_VERSION -#define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z)) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) -#include <linux/mm.h> - -#define ioremap vremap -#define ioremap_nocache vremap -#define iounmap vfree - -static inline unsigned long copy_from_user(void *to, const void *from, unsigned long n) -{ - int i; - if ((i = verify_area(VERIFY_READ, from, n)) != 0) - return i; - memcpy_fromfs(to, from, n); - return 0; -} - -static inline unsigned long copy_to_user(void *to, const void *from, unsigned long n) -{ - int i; - if ((i = verify_area(VERIFY_WRITE, to, n)) != 0) - return i; - memcpy_tofs(to, from, n); - return 0; -} - -#define GET_USER(x, addr) ( x = get_user(addr) ) -#ifdef __alpha__ /* needed for 2.0.x with alpha-patches */ -#define RWTYPE long -#define LSTYPE long -#define RWARG unsigned long -#else -#define RWTYPE int -#define LSTYPE int -#define RWARG int -#endif -#define LSARG off_t -#else -#include <asm/uaccess.h> -#define GET_USER get_user -#define PUT_USER put_user -#define RWTYPE long -#define LSTYPE long long -#define RWARG unsigned long -#define LSARG long long -#endif /* LINUX_VERSION_CODE */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,15) -#define SET_SKB_FREE(x) ( x->free = 1 ) -#define idev_kfree_skb(a,b) dev_kfree_skb(a,b) -#else -#define SET_SKB_FREE(x) -#define idev_kfree_skb(a,b) dev_kfree_skb(a) -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,18) -#define COMPAT_HAS_NEW_SYMTAB -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,31) -#define CLOSETYPE void -#define CLOSEVAL -#else -#define CLOSETYPE int -#define CLOSEVAL (0) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,37) -#define test_and_clear_bit clear_bit -#define test_and_set_bit set_bit -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,81) -#define kstat_irqs( PAR ) kstat.interrupts[PAR] -#endif - -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,91) -#define COMPAT_HAS_NEW_PCI -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13) -#define get_pcibase(ps, nr) ps->base_address[nr] -#else -#define get_pcibase(ps, nr) ps->resource[nr].start -#endif -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,127) -#define schedule_timeout(a) current->timeout = jiffies + (a); schedule (); -#endif - -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,0) -#define COMPAT_HAS_NEW_WAITQ -#endif - -#endif /* __KERNEL__ */ -#endif /* _LINUX_ISDN_COMPAT_H */ diff --git a/pfinet/linux-src/include/linux/net.h b/pfinet/linux-src/include/linux/net.h index 63e996f9..da193dcc 100644 --- a/pfinet/linux-src/include/linux/net.h +++ b/pfinet/linux-src/include/linux/net.h @@ -65,8 +65,14 @@ struct socket unsigned long flags; struct proto_ops *ops; struct inode *inode; +#ifdef _HURD_ + uint_fast32_t refcnt; /* # of sock_user's pointing to this */ + mach_port_t identity; /* for io_identity */ + struct file; /* forward decl magic */ +#else struct fasync_struct *fasync_list; /* Asynchronous wake up list */ struct file *file; /* File back pointer for gc */ +#endif struct sock *sk; struct wait_queue *wait; @@ -103,12 +109,12 @@ struct proto_ops { int (*getsockopt) (struct socket *sock, int level, int optname, char *optval, int *optlen); int (*fcntl) (struct socket *sock, unsigned int cmd, - unsigned long arg); + unsigned long arg); int (*sendmsg) (struct socket *sock, struct msghdr *m, int total_len, struct scm_cookie *scm); int (*recvmsg) (struct socket *sock, struct msghdr *m, int total_len, int flags, struct scm_cookie *scm); }; -struct net_proto_family +struct net_proto_family { int family; int (*create)(struct socket *sock, int protocol); @@ -119,7 +125,7 @@ struct net_proto_family short encrypt_net; }; -struct net_proto +struct net_proto { const char *name; /* Protocol name */ void (*init_func)(struct net_proto *); /* Bootstrap */ diff --git a/pfinet/linux-src/include/linux/rtnetlink.h b/pfinet/linux-src/include/linux/rtnetlink.h index 39802a5f..2b5d6efa 100644 --- a/pfinet/linux-src/include/linux/rtnetlink.h +++ b/pfinet/linux-src/include/linux/rtnetlink.h @@ -1,9 +1,7 @@ #ifndef __LINUX_RTNETLINK_H #define __LINUX_RTNETLINK_H -#ifdef __KERNEL__ #include <linux/config.h> -#endif #include <linux/netlink.h> #define RTNL_DEBUG 1 @@ -51,7 +49,7 @@ #define RTM_MAX (RTM_BASE+31) -/* +/* Generic structure for encapsulation optional route information. It is reminiscent of sockaddr, but with sa_family replaced with attribute type. @@ -92,7 +90,7 @@ struct rtmsg unsigned char rtm_table; /* Routing table id */ unsigned char rtm_protocol; /* Routing protocol; see below */ - unsigned char rtm_scope; /* See below */ + unsigned char rtm_scope; /* See below */ unsigned char rtm_type; /* See below */ unsigned rtm_flags; @@ -638,15 +636,19 @@ extern __inline__ void rtnl_exunlock(void) extern __inline__ void rtnl_shlock(void) { +#ifndef _HURD_ while (atomic_read(&rtnl_rlockct)) sleep_on(&rtnl_wait); atomic_inc(&rtnl_rlockct); +#endif } extern __inline__ void rtnl_shunlock(void) { +#ifndef _HURD_ if (atomic_dec_and_test(&rtnl_rlockct)) wake_up(&rtnl_wait); +#endif } extern __inline__ void rtnl_exlock(void) |