Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
iproute2
Commits
c40bba69
Commit
c40bba69
authored
Aug 06, 2009
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update kernel headers to 2.6.31-rc5
parent
2d8240f8
Changes
18
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1308 additions
and
50 deletions
+1308
-50
include/linux/gen_stats.h
include/linux/gen_stats.h
+1
-1
include/linux/if.h
include/linux/if.h
+4
-0
include/linux/if_addr.h
include/linux/if_addr.h
+2
-0
include/linux/if_ether.h
include/linux/if_ether.h
+33
-4
include/linux/if_link.h
include/linux/if_link.h
+2
-0
include/linux/if_tunnel.h
include/linux/if_tunnel.h
+12
-9
include/linux/if_vlan.h
include/linux/if_vlan.h
+298
-0
include/linux/inet_diag.h
include/linux/inet_diag.h
+16
-0
include/linux/neighbour.h
include/linux/neighbour.h
+1
-0
include/linux/netdevice.h
include/linux/netdevice.h
+92
-0
include/linux/netfilter/x_tables.h
include/linux/netfilter/x_tables.h
+451
-14
include/linux/netfilter/xt_tcpudp.h
include/linux/netfilter/xt_tcpudp.h
+11
-9
include/linux/netfilter_ipv4.h
include/linux/netfilter_ipv4.h
+8
-0
include/linux/netlink.h
include/linux/netlink.h
+119
-0
include/linux/rtnetlink.h
include/linux/rtnetlink.h
+165
-0
include/linux/socket.h
include/linux/socket.h
+34
-6
include/linux/types.h
include/linux/types.h
+56
-6
include/linux/xfrm.h
include/linux/xfrm.h
+3
-1
No files found.
include/linux/gen_stats.h
View file @
c40bba69
...
...
@@ -22,7 +22,7 @@ struct gnet_stats_basic
{
__u64
bytes
;
__u32
packets
;
};
}
__attribute__
((
packed
))
;
/**
* struct gnet_stats_rate_est - rate estimator
...
...
include/linux/if.h
View file @
c40bba69
...
...
@@ -66,6 +66,10 @@
#define IFF_SLAVE_NEEDARP 0x40
/* need ARPs for validation */
#define IFF_ISATAP 0x80
/* ISATAP interface (RFC4214) */
#define IFF_MASTER_ARPMON 0x100
/* bonding master, ARP mon in use */
#define IFF_WAN_HDLC 0x200
/* WAN HDLC device */
#define IFF_XMIT_DST_RELEASE 0x400
/* dev_hard_start_xmit() is allowed to
* release skb->dst
*/
#define IF_GET_IFACE 0x0001
/* for querying only */
#define IF_GET_PROTO 0x0002
...
...
include/linux/if_addr.h
View file @
c40bba69
...
...
@@ -55,7 +55,9 @@ struct ifa_cacheinfo
};
/* backwards compatibility for userspace */
#ifndef __KERNEL__
#define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
#endif
#endif
include/linux/if_ether.h
View file @
c40bba69
...
...
@@ -78,6 +78,9 @@
#define ETH_P_PAE 0x888E
/* Port Access Entity (IEEE 802.1X) */
#define ETH_P_AOE 0x88A2
/* ATA over Ethernet */
#define ETH_P_TIPC 0x88CA
/* TIPC */
#define ETH_P_1588 0x88F7
/* IEEE 1588 Timesync */
#define ETH_P_FCOE 0x8906
/* Fibre Channel over Ethernet */
#define ETH_P_FIP 0x8914
/* FCoE Initialization Protocol */
#define ETH_P_EDSA 0xDADA
/* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
/*
...
...
@@ -105,6 +108,7 @@
#define ETH_P_DSA 0x001B
/* Distributed Switch Arch. */
#define ETH_P_TRAILER 0x001C
/* Trailer switch tagging */
#define ETH_P_PHONET 0x00F5
/* Nokia Phonet frames */
#define ETH_P_IEEE802154 0x00F6
/* IEEE802.15.4 frame */
/*
* This is an Ethernet frame header.
...
...
@@ -116,5 +120,30 @@ struct ethhdr {
__be16
h_proto
;
/* packet type ID field */
}
__attribute__
((
packed
));
#ifdef __KERNEL__
#include <linux/skbuff.h>
static
inline
struct
ethhdr
*
eth_hdr
(
const
struct
sk_buff
*
skb
)
{
return
(
struct
ethhdr
*
)
skb_mac_header
(
skb
);
}
int
eth_header_parse
(
const
struct
sk_buff
*
skb
,
unsigned
char
*
haddr
);
#ifdef CONFIG_SYSCTL
extern
struct
ctl_table
ether_table
[];
#endif
extern
ssize_t
sysfs_format_mac
(
char
*
buf
,
const
unsigned
char
*
addr
,
int
len
);
/*
* Display a 6 byte device address (MAC) in a readable format.
*/
extern
char
*
print_mac
(
char
*
buf
,
const
unsigned
char
*
addr
);
#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_BUF_SIZE 18
#define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE] __maybe_unused
#endif
#endif
/* _LINUX_IF_ETHER_H */
include/linux/if_link.h
View file @
c40bba69
...
...
@@ -88,8 +88,10 @@ enum
#define IFLA_MAX (__IFLA_MAX - 1)
/* backwards compatibility for userspace */
#ifndef __KERNEL__
#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
#endif
/* ifi_flags.
...
...
include/linux/if_tunnel.h
View file @
c40bba69
...
...
@@ -3,6 +3,9 @@
#include <linux/types.h>
#ifdef __KERNEL__
#include <linux/ip.h>
#endif
#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
...
...
@@ -13,14 +16,14 @@
#define SIOCDELPRL (SIOCDEVPRIVATE + 6)
#define SIOCCHGPRL (SIOCDEVPRIVATE + 7)
#define GRE_CSUM __c
onstant_htons
(0x8000)
#define GRE_ROUTING __c
onstant_htons
(0x4000)
#define GRE_KEY __c
onstant_htons
(0x2000)
#define GRE_SEQ __c
onstant_htons
(0x1000)
#define GRE_STRICT __c
onstant_htons
(0x0800)
#define GRE_REC __c
onstant_htons
(0x0700)
#define GRE_FLAGS __c
onstant_htons
(0x00F8)
#define GRE_VERSION __c
onstant_htons
(0x0007)
#define GRE_CSUM __c
pu_to_be16
(0x8000)
#define GRE_ROUTING __c
pu_to_be16
(0x4000)
#define GRE_KEY __c
pu_to_be16
(0x2000)
#define GRE_SEQ __c
pu_to_be16
(0x1000)
#define GRE_STRICT __c
pu_to_be16
(0x0800)
#define GRE_REC __c
pu_to_be16
(0x0700)
#define GRE_FLAGS __c
pu_to_be16
(0x00F8)
#define GRE_VERSION __c
pu_to_be16
(0x0007)
struct
ip_tunnel_parm
{
...
...
@@ -41,7 +44,7 @@ struct ip_tunnel_prl {
__u16
flags
;
__u16
__reserved
;
__u32
datalen
;
__u32
__reserved2
;
__u32
rs_delay
;
/* data follows */
};
...
...
include/linux/if_vlan.h
View file @
c40bba69
...
...
@@ -13,6 +13,304 @@
#ifndef _LINUX_IF_VLAN_H_
#define _LINUX_IF_VLAN_H_
#ifdef __KERNEL__
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#define VLAN_HLEN 4
/* The additional bytes (on top of the Ethernet header)
* that VLAN requires.
*/
#define VLAN_ETH_ALEN 6
/* Octets in one ethernet addr */
#define VLAN_ETH_HLEN 18
/* Total octets in header. */
#define VLAN_ETH_ZLEN 64
/* Min. octets in frame sans FCS */
/*
* According to 802.3ac, the packet can be 4 bytes longer. --Klika Jan
*/
#define VLAN_ETH_DATA_LEN 1500
/* Max. octets in payload */
#define VLAN_ETH_FRAME_LEN 1518
/* Max. octets in frame sans FCS */
/*
* struct vlan_hdr - vlan header
* @h_vlan_TCI: priority and VLAN ID
* @h_vlan_encapsulated_proto: packet type ID or len
*/
struct
vlan_hdr
{
__be16
h_vlan_TCI
;
__be16
h_vlan_encapsulated_proto
;
};
/**
* struct vlan_ethhdr - vlan ethernet header (ethhdr + vlan_hdr)
* @h_dest: destination ethernet address
* @h_source: source ethernet address
* @h_vlan_proto: ethernet protocol (always 0x8100)
* @h_vlan_TCI: priority and VLAN ID
* @h_vlan_encapsulated_proto: packet type ID or len
*/
struct
vlan_ethhdr
{
unsigned
char
h_dest
[
ETH_ALEN
];
unsigned
char
h_source
[
ETH_ALEN
];
__be16
h_vlan_proto
;
__be16
h_vlan_TCI
;
__be16
h_vlan_encapsulated_proto
;
};
#include <linux/skbuff.h>
static
inline
struct
vlan_ethhdr
*
vlan_eth_hdr
(
const
struct
sk_buff
*
skb
)
{
return
(
struct
vlan_ethhdr
*
)
skb_mac_header
(
skb
);
}
#define VLAN_VID_MASK 0xfff
/* found in socket.c */
extern
void
vlan_ioctl_set
(
int
(
*
hook
)(
struct
net
*
,
void
__user
*
));
/* if this changes, algorithm will have to be reworked because this
* depends on completely exhausting the VLAN identifier space. Thus
* it gives constant time look-up, but in many cases it wastes memory.
*/
#define VLAN_GROUP_ARRAY_LEN 4096
#define VLAN_GROUP_ARRAY_SPLIT_PARTS 8
#define VLAN_GROUP_ARRAY_PART_LEN (VLAN_GROUP_ARRAY_LEN/VLAN_GROUP_ARRAY_SPLIT_PARTS)
struct
vlan_group
{
struct
net_device
*
real_dev
;
/* The ethernet(like) device
* the vlan is attached to.
*/
unsigned
int
nr_vlans
;
struct
hlist_node
hlist
;
/* linked list */
struct
net_device
**
vlan_devices_arrays
[
VLAN_GROUP_ARRAY_SPLIT_PARTS
];
struct
rcu_head
rcu
;
};
static
inline
struct
net_device
*
vlan_group_get_device
(
struct
vlan_group
*
vg
,
u16
vlan_id
)
{
struct
net_device
**
array
;
array
=
vg
->
vlan_devices_arrays
[
vlan_id
/
VLAN_GROUP_ARRAY_PART_LEN
];
return
array
?
array
[
vlan_id
%
VLAN_GROUP_ARRAY_PART_LEN
]
:
NULL
;
}
static
inline
void
vlan_group_set_device
(
struct
vlan_group
*
vg
,
u16
vlan_id
,
struct
net_device
*
dev
)
{
struct
net_device
**
array
;
if
(
!
vg
)
return
;
array
=
vg
->
vlan_devices_arrays
[
vlan_id
/
VLAN_GROUP_ARRAY_PART_LEN
];
array
[
vlan_id
%
VLAN_GROUP_ARRAY_PART_LEN
]
=
dev
;
}
#define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci)
#define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci)
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
extern
struct
net_device
*
vlan_dev_real_dev
(
const
struct
net_device
*
dev
);
extern
u16
vlan_dev_vlan_id
(
const
struct
net_device
*
dev
);
extern
int
__vlan_hwaccel_rx
(
struct
sk_buff
*
skb
,
struct
vlan_group
*
grp
,
u16
vlan_tci
,
int
polling
);
extern
int
vlan_hwaccel_do_receive
(
struct
sk_buff
*
skb
);
extern
int
vlan_gro_receive
(
struct
napi_struct
*
napi
,
struct
vlan_group
*
grp
,
unsigned
int
vlan_tci
,
struct
sk_buff
*
skb
);
extern
int
vlan_gro_frags
(
struct
napi_struct
*
napi
,
struct
vlan_group
*
grp
,
unsigned
int
vlan_tci
);
#else
static
inline
struct
net_device
*
vlan_dev_real_dev
(
const
struct
net_device
*
dev
)
{
BUG
();
return
NULL
;
}
static
inline
u16
vlan_dev_vlan_id
(
const
struct
net_device
*
dev
)
{
BUG
();
return
0
;
}
static
inline
int
__vlan_hwaccel_rx
(
struct
sk_buff
*
skb
,
struct
vlan_group
*
grp
,
u16
vlan_tci
,
int
polling
)
{
BUG
();
return
NET_XMIT_SUCCESS
;
}
static
inline
int
vlan_hwaccel_do_receive
(
struct
sk_buff
*
skb
)
{
return
0
;
}
static
inline
int
vlan_gro_receive
(
struct
napi_struct
*
napi
,
struct
vlan_group
*
grp
,
unsigned
int
vlan_tci
,
struct
sk_buff
*
skb
)
{
return
NET_RX_DROP
;
}
static
inline
int
vlan_gro_frags
(
struct
napi_struct
*
napi
,
struct
vlan_group
*
grp
,
unsigned
int
vlan_tci
)
{
return
NET_RX_DROP
;
}
#endif
/**
* vlan_hwaccel_rx - netif_rx wrapper for VLAN RX acceleration
* @skb: buffer
* @grp: vlan group
* @vlan_tci: VLAN TCI as received from the card
*/
static
inline
int
vlan_hwaccel_rx
(
struct
sk_buff
*
skb
,
struct
vlan_group
*
grp
,
u16
vlan_tci
)
{
return
__vlan_hwaccel_rx
(
skb
,
grp
,
vlan_tci
,
0
);
}
/**
* vlan_hwaccel_receive_skb - netif_receive_skb wrapper for VLAN RX acceleration
* @skb: buffer
* @grp: vlan group
* @vlan_tci: VLAN TCI as received from the card
*/
static
inline
int
vlan_hwaccel_receive_skb
(
struct
sk_buff
*
skb
,
struct
vlan_group
*
grp
,
u16
vlan_tci
)
{
return
__vlan_hwaccel_rx
(
skb
,
grp
,
vlan_tci
,
1
);
}
/**
* __vlan_put_tag - regular VLAN tag inserting
* @skb: skbuff to tag
* @vlan_tci: VLAN TCI to insert
*
* Inserts the VLAN tag into @skb as part of the payload
* Returns a VLAN tagged skb. If a new skb is created, @skb is freed.
*
* Following the skb_unshare() example, in case of error, the calling function
* doesn't have to worry about freeing the original skb.
*/
static
inline
struct
sk_buff
*
__vlan_put_tag
(
struct
sk_buff
*
skb
,
u16
vlan_tci
)
{
struct
vlan_ethhdr
*
veth
;
if
(
skb_cow_head
(
skb
,
VLAN_HLEN
)
<
0
)
{
kfree_skb
(
skb
);
return
NULL
;
}
veth
=
(
struct
vlan_ethhdr
*
)
skb_push
(
skb
,
VLAN_HLEN
);
/* Move the mac addresses to the beginning of the new header. */
memmove
(
skb
->
data
,
skb
->
data
+
VLAN_HLEN
,
2
*
VLAN_ETH_ALEN
);
skb
->
mac_header
-=
VLAN_HLEN
;
/* first, the ethernet type */
veth
->
h_vlan_proto
=
htons
(
ETH_P_8021Q
);
/* now, the TCI */
veth
->
h_vlan_TCI
=
htons
(
vlan_tci
);
skb
->
protocol
=
htons
(
ETH_P_8021Q
);
return
skb
;
}
/**
* __vlan_hwaccel_put_tag - hardware accelerated VLAN inserting
* @skb: skbuff to tag
* @vlan_tci: VLAN TCI to insert
*
* Puts the VLAN TCI in @skb->vlan_tci and lets the device do the rest
*/
static
inline
struct
sk_buff
*
__vlan_hwaccel_put_tag
(
struct
sk_buff
*
skb
,
u16
vlan_tci
)
{
skb
->
vlan_tci
=
vlan_tci
;
return
skb
;
}
#define HAVE_VLAN_PUT_TAG
/**
* vlan_put_tag - inserts VLAN tag according to device features
* @skb: skbuff to tag
* @vlan_tci: VLAN TCI to insert
*
* Assumes skb->dev is the target that will xmit this frame.
* Returns a VLAN tagged skb.
*/
static
inline
struct
sk_buff
*
vlan_put_tag
(
struct
sk_buff
*
skb
,
u16
vlan_tci
)
{
if
(
skb
->
dev
->
features
&
NETIF_F_HW_VLAN_TX
)
{
return
__vlan_hwaccel_put_tag
(
skb
,
vlan_tci
);
}
else
{
return
__vlan_put_tag
(
skb
,
vlan_tci
);
}
}
/**
* __vlan_get_tag - get the VLAN ID that is part of the payload
* @skb: skbuff to query
* @vlan_tci: buffer to store vlaue
*
* Returns error if the skb is not of VLAN type
*/
static
inline
int
__vlan_get_tag
(
const
struct
sk_buff
*
skb
,
u16
*
vlan_tci
)
{
struct
vlan_ethhdr
*
veth
=
(
struct
vlan_ethhdr
*
)
skb
->
data
;
if
(
veth
->
h_vlan_proto
!=
htons
(
ETH_P_8021Q
))
{
return
-
EINVAL
;
}
*
vlan_tci
=
ntohs
(
veth
->
h_vlan_TCI
);
return
0
;
}
/**
* __vlan_hwaccel_get_tag - get the VLAN ID that is in @skb->cb[]
* @skb: skbuff to query
* @vlan_tci: buffer to store vlaue
*
* Returns error if @skb->vlan_tci is not set correctly
*/
static
inline
int
__vlan_hwaccel_get_tag
(
const
struct
sk_buff
*
skb
,
u16
*
vlan_tci
)
{
if
(
vlan_tx_tag_present
(
skb
))
{
*
vlan_tci
=
skb
->
vlan_tci
;
return
0
;
}
else
{
*
vlan_tci
=
0
;
return
-
EINVAL
;
}
}
#define HAVE_VLAN_GET_TAG
/**
* vlan_get_tag - get the VLAN ID from the skb
* @skb: skbuff to query
* @vlan_tci: buffer to store vlaue
*
* Returns error if the skb is not VLAN tagged
*/
static
inline
int
vlan_get_tag
(
const
struct
sk_buff
*
skb
,
u16
*
vlan_tci
)
{
if
(
skb
->
dev
->
features
&
NETIF_F_HW_VLAN_TX
)
{
return
__vlan_hwaccel_get_tag
(
skb
,
vlan_tci
);
}
else
{
return
__vlan_get_tag
(
skb
,
vlan_tci
);
}
}
#endif
/* __KERNEL__ */
/* VLAN IOCTLs are found in sockios.h */
...
...
include/linux/inet_diag.h
View file @
c40bba69
...
...
@@ -120,5 +120,21 @@ struct tcpvegas_info {
__u32
tcpv_minrtt
;
};
#ifdef __KERNEL__
struct
sock
;
struct
inet_hashinfo
;
struct
inet_diag_handler
{
struct
inet_hashinfo
*
idiag_hashinfo
;
void
(
*
idiag_get_info
)(
struct
sock
*
sk
,
struct
inet_diag_msg
*
r
,
void
*
info
);
__u16
idiag_info_size
;
__u16
idiag_type
;
};
extern
int
inet_diag_register
(
const
struct
inet_diag_handler
*
handler
);
extern
void
inet_diag_unregister
(
const
struct
inet_diag_handler
*
handler
);
#endif
/* __KERNEL__ */
#endif
/* _INET_DIAG_H_ */
include/linux/neighbour.h
View file @
c40bba69
...
...
@@ -31,6 +31,7 @@ enum
* Neighbor Cache Entry Flags
*/
#define NTF_USE 0x01
#define NTF_PROXY 0x08
/* == ATF_PUBL */
#define NTF_ROUTER 0x80
...
...
include/linux/netdevice.h
0 → 100644
View file @
c40bba69
/*
* INET An implementation of the TCP/IP protocol suite for the LINUX
* operating system. INET is implemented using the BSD Socket
* interface as the means of communication with the user level.
*
* Definitions for the Interfaces handler.
*
* Version: @(#)dev.h 1.0.10 08/12/93
*
* Authors: Ross Biro
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
* Corey Minyard <wf-rch!minyard@relay.EU.net>
* Donald J. Becker, <becker@cesdis.gsfc.nasa.gov>
* Alan Cox, <alan@lxorguk.ukuu.org.uk>
* Bjorn Ekwall. <bj0rn@blox.se>
* Pekka Riikonen <priikone@poseidon.pspt.fi>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Moved to /usr/include/linux for NET3
*/
#ifndef _LINUX_NETDEVICE_H
#define _LINUX_NETDEVICE_H
#include <linux/if.h>
#include <linux/if_ether.h>
#include <linux/if_packet.h>
#define MAX_ADDR_LEN 32
/* Largest hardware address length */
/* Driver transmit return codes */
#define NETDEV_TX_OK 0
/* driver took care of packet */
#define NETDEV_TX_BUSY 1
/* driver tx path was busy*/
#define NETDEV_TX_LOCKED -1
/* driver tx lock was already taken */
/*
* Network device statistics. Akin to the 2.0 ether stats but
* with byte counters.
*/
struct
net_device_stats
{
unsigned
long
rx_packets
;
/* total packets received */
unsigned
long
tx_packets
;
/* total packets transmitted */
unsigned
long
rx_bytes
;
/* total bytes received */
unsigned
long
tx_bytes
;
/* total bytes transmitted */
unsigned
long
rx_errors
;
/* bad packets received */
unsigned
long
tx_errors
;
/* packet transmit problems */
unsigned
long
rx_dropped
;
/* no space in linux buffers */
unsigned
long
tx_dropped
;
/* no space available in linux */
unsigned
long
multicast
;
/* multicast packets received */
unsigned
long
collisions
;
/* detailed rx_errors: */
unsigned
long
rx_length_errors
;
unsigned
long
rx_over_errors
;
/* receiver ring buff overflow */
unsigned
long
rx_crc_errors
;
/* recved pkt with crc error */
unsigned
long
rx_frame_errors
;
/* recv'd frame alignment error */
unsigned
long
rx_fifo_errors
;
/* recv'r fifo overrun */
unsigned
long
rx_missed_errors
;
/* receiver missed packet */
/* detailed tx_errors */
unsigned
long
tx_aborted_errors
;
unsigned
long
tx_carrier_errors
;
unsigned
long
tx_fifo_errors
;
unsigned
long
tx_heartbeat_errors
;
unsigned
long
tx_window_errors
;
/* for cslip etc */
unsigned
long
rx_compressed
;
unsigned
long
tx_compressed
;
};
/* Media selection options. */
enum
{
IF_PORT_UNKNOWN
=
0
,
IF_PORT_10BASE2
,
IF_PORT_10BASET
,
IF_PORT_AUI
,
IF_PORT_100BASET
,
IF_PORT_100BASETX
,
IF_PORT_100BASEFX
};
#endif
/* _LINUX_NETDEVICE_H */
include/linux/netfilter/x_tables.h
View file @
c40bba69
This diff is collapsed.
Click to expand it.
include/linux/netfilter/xt_tcpudp.h
View file @
c40bba69
#ifndef _XT_TCPUDP_H
#define _XT_TCPUDP_H
#include <linux/types.h>
/* TCP matching stuff */
struct
xt_tcp
{
u_int16_t
spts
[
2
];
/* Source port range. */
u_int16_t
dpts
[
2
];
/* Destination port range. */
u_int8_t
option
;
/* TCP Option iff non-zero*/
u_int8_t
flg_mask
;
/* TCP flags mask byte */
u_int8_t
flg_cmp
;
/* TCP flags compare byte */
u_int8_t
invflags
;
/* Inverse flags */
__u16
spts
[
2
];
/* Source port range. */
__u16
dpts
[
2
];
/* Destination port range. */
__u8
option
;
/* TCP Option iff non-zero*/
__u8
flg_mask
;
/* TCP flags mask byte */
__u8
flg_cmp
;
/* TCP flags compare byte */
__u8
invflags
;
/* Inverse flags */
};
/* Values for "inv" field in struct ipt_tcp. */
...
...
@@ -22,9 +24,9 @@ struct xt_tcp
/* UDP matching stuff */
struct
xt_udp
{
u_int16_t
spts
[
2
];
/* Source port range. */
u_int16_t
dpts
[
2
];
/* Destination port range. */
u_int8_t
invflags
;
/* Inverse flags */
__u16
spts
[
2
];
/* Source port range. */
__u16
dpts
[
2
];
/* Destination port range. */
__u8
invflags
;
/* Inverse flags */
};
/* Values for "invflags" field in struct ipt_udp. */
...
...
include/linux/netfilter_ipv4.h
View file @
c40bba69
...
...
@@ -8,6 +8,7 @@
#include <linux/netfilter.h>
/* only for userspace compatibility */
#ifndef __KERNEL__
/* IP Cache bits. */
/* Src IP address. */
#define NFC_IP_SRC 0x0001
...
...
@@ -48,6 +49,7 @@
/* Packets about to hit the wire. */
#define NF_IP_POST_ROUTING 4
#define NF_IP_NUMHOOKS 5
#endif
/* ! __KERNEL__ */
enum
nf_ip_hook_priorities
{
NF_IP_PRI_FIRST
=
INT_MIN
,
...
...
@@ -71,5 +73,11 @@ enum nf_ip_hook_priorities {
/* 2.4 firewalling went 64 through 67. */
#define SO_ORIGINAL_DST 80
#ifdef __KERNEL__
extern
int
ip_route_me_harder
(
struct
sk_buff
*
skb
,
unsigned
addr_type
);
extern
int
ip_xfrm_me_harder
(
struct
sk_buff
*
skb
);
extern
__sum16
nf_ip_checksum
(
struct
sk_buff
*
skb
,
unsigned
int
hook
,
unsigned
int
dataoff
,
u_int8_t
protocol
);
#endif
/*__KERNEL__*/
#endif
/*__LINUX_IP_NETFILTER_H*/
include/linux/netlink.h
View file @
c40bba69
...
...
@@ -103,6 +103,8 @@ struct nlmsgerr
#define NETLINK_ADD_MEMBERSHIP 1
#define NETLINK_DROP_MEMBERSHIP 2
#define NETLINK_PKTINFO 3
#define NETLINK_BROADCAST_ERROR 4
#define NETLINK_NO_ENOBUFS 5
struct
nl_pktinfo
{
...
...
@@ -149,5 +151,122 @@ struct nlattr
#define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
#define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
#ifdef __KERNEL__
#include <linux/capability.h>
#include <linux/skbuff.h>
static
inline
struct
nlmsghdr
*
nlmsg_hdr
(
const
struct
sk_buff
*
skb
)
{
return
(
struct
nlmsghdr
*
)
skb
->
data
;
}
struct
netlink_skb_parms
{
struct
ucred
creds
;
/* Skb credentials */
__u32
pid
;
__u32
dst_group
;
kernel_cap_t
eff_cap
;
__u32
loginuid
;
/* Login (audit) uid */
__u32
sessionid
;
/* Session id (audit) */
__u32
sid
;
/* SELinux security id */
};
#define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb))
#define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
extern
struct
sock
*
netlink_kernel_create
(
struct
net
*
net
,
int
unit
,
unsigned
int
groups
,
void
(
*
input
)(
struct
sk_buff
*
skb
),
struct
mutex
*
cb_mutex
,
struct
module
*
module
);
extern
void
netlink_kernel_release
(
struct
sock
*
sk
);
extern
int
netlink_change_ngroups
(
struct
sock
*
sk
,
unsigned
int
groups
);
extern
void
netlink_clear_multicast_users
(
struct
sock
*
sk
,
unsigned
int
group
);
extern
void
netlink_ack
(
struct
sk_buff
*
in_skb
,
struct
nlmsghdr
*
nlh
,
int
err
);
extern
int
netlink_has_listeners
(
struct
sock
*
sk
,
unsigned
int
group
);
extern
int
netlink_unicast
(
struct
sock
*
ssk
,
struct
sk_buff
*
skb
,
__u32
pid
,
int
nonblock
);
extern
int
netlink_broadcast
(
struct
sock
*
ssk
,
struct
sk_buff
*
skb
,
__u32
pid
,
__u32
group
,
gfp_t
allocation
);
extern
void
netlink_set_err
(
struct
sock
*
ssk
,
__u32
pid
,
__u32
group
,
int
code
);
extern
int
netlink_register_notifier
(
struct
notifier_block
*
nb
);
extern
int
netlink_unregister_notifier
(
struct
notifier_block
*
nb
);
/* finegrained unicast helpers: */
struct
sock
*
netlink_getsockbyfilp
(
struct
file
*
filp
);
int
netlink_attachskb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
long
*
timeo
,
struct
sock
*
ssk
);
void
netlink_detachskb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
);
int
netlink_sendskb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
);
/*
* skb should fit one page. This choice is good for headerless malloc.
* But we should limit to 8K so that userspace does not have to
* use enormous buffer sizes on recvmsg() calls just to avoid
* MSG_TRUNC when PAGE_SIZE is very large.
*/
#if PAGE_SIZE < 8192UL
#define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(PAGE_SIZE)
#else
#define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(8192UL)
#endif
#define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN)
struct
netlink_callback
{
struct
sk_buff
*
skb
;
struct
nlmsghdr
*
nlh
;
int
(
*
dump
)(
struct
sk_buff
*
skb
,
struct
netlink_callback
*
cb
);
int
(
*
done
)(
struct
netlink_callback
*
cb
);
int
family
;
long
args
[
6
];
};
struct
netlink_notify
{
struct
net
*
net
;
int
pid
;
int
protocol
;
};
static
__inline__
struct
nlmsghdr
*
__nlmsg_put
(
struct
sk_buff
*
skb
,
u32
pid
,
u32
seq
,
int
type
,
int
len
,
int
flags
)
{
struct
nlmsghdr
*
nlh
;
int
size
=
NLMSG_LENGTH
(
len
);
nlh
=
(
struct
nlmsghdr
*
)
skb_put
(
skb
,
NLMSG_ALIGN
(
size
));
nlh
->
nlmsg_type
=
type
;
nlh
->
nlmsg_len
=
size
;
nlh
->
nlmsg_flags
=
flags
;
nlh
->
nlmsg_pid
=
pid
;
nlh
->
nlmsg_seq
=
seq
;
if
(
!
__builtin_constant_p
(
size
)
||
NLMSG_ALIGN
(
size
)
-
size
!=
0
)
memset
(
NLMSG_DATA
(
nlh
)
+
len
,
0
,
NLMSG_ALIGN
(
size
)
-
size
);
return
nlh
;
}
#define NLMSG_NEW(skb, pid, seq, type, len, flags) \
({ if (unlikely(skb_tailroom(skb) < (int)NLMSG_SPACE(len))) \
goto nlmsg_failure; \
__nlmsg_put(skb, pid, seq, type, len, flags); })
#define NLMSG_PUT(skb, pid, seq, type, len) \
NLMSG_NEW(skb, pid, seq, type, len, 0)
extern
int
netlink_dump_start
(
struct
sock
*
ssk
,
struct
sk_buff
*
skb
,
struct
nlmsghdr
*
nlh
,
int
(
*
dump
)(
struct
sk_buff
*
skb
,
struct
netlink_callback
*
),
int
(
*
done
)(
struct
netlink_callback
*
));
#define NL_NONROOT_RECV 0x1
#define NL_NONROOT_SEND 0x2
extern
void
netlink_set_nonroot
(
int
protocol
,
unsigned
flag
);
#endif
/* __KERNEL__ */
#endif
/* __LINUX_NETLINK_H */
include/linux/rtnetlink.h
View file @
c40bba69
...
...
@@ -524,6 +524,7 @@ enum
#define NDUSEROPT_MAX (__NDUSEROPT_MAX - 1)
#ifndef __KERNEL__
/* RTnetlink multicast groups - backwards compatibility for userspace */
#define RTMGRP_LINK 1
#define RTMGRP_NOTIFY 2
...
...
@@ -544,6 +545,7 @@ enum
#define RTMGRP_DECnet_ROUTE 0x4000
#define RTMGRP_IPV6_PREFIX 0x20000
#endif
/* RTnetlink multicast groups */
enum
rtnetlink_groups
{
...
...
@@ -609,6 +611,169 @@ struct tcamsg
/* End of information exported to user level */
#ifdef __KERNEL__
#include <linux/mutex.h>
static
__inline__
int
rtattr_strcmp
(
const
struct
rtattr
*
rta
,
const
char
*
str
)
{
int
len
=
strlen
(
str
)
+
1
;
return
len
>
rta
->
rta_len
||
memcmp
(
RTA_DATA
(
rta
),
str
,
len
);
}
extern
int
rtnetlink_send
(
struct
sk_buff
*
skb
,
struct
net
*
net
,
u32
pid
,
u32
group
,
int
echo
);
extern
int
rtnl_unicast
(
struct
sk_buff
*
skb
,
struct
net
*
net
,
u32
pid
);
extern
void
rtnl_notify
(
struct
sk_buff
*
skb
,
struct
net
*
net
,
u32
pid
,
u32
group
,
struct
nlmsghdr
*
nlh
,
gfp_t
flags
);
extern
void
rtnl_set_sk_err
(
struct
net
*
net
,
u32
group
,
int
error
);
extern
int
rtnetlink_put_metrics
(
struct
sk_buff
*
skb
,
u32
*
metrics
);
extern
int
rtnl_put_cacheinfo
(
struct
sk_buff
*
skb
,
struct
dst_entry
*
dst
,
u32
id
,
u32
ts
,
u32
tsage
,
long
expires
,
u32
error
);
extern
void
__rta_fill
(
struct
sk_buff
*
skb
,
int
attrtype
,
int
attrlen
,
const
void
*
data
);
#define RTA_PUT(skb, attrtype, attrlen, data) \
({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
goto rtattr_failure; \
__rta_fill(skb, attrtype, attrlen, data); })
#define RTA_APPEND(skb, attrlen, data) \
({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \
goto rtattr_failure; \
memcpy(skb_put(skb, attrlen), data, attrlen); })
#define RTA_PUT_NOHDR(skb, attrlen, data) \
({ RTA_APPEND(skb, RTA_ALIGN(attrlen), data); \
memset(skb_tail_pointer(skb) - (RTA_ALIGN(attrlen) - attrlen), 0, \
RTA_ALIGN(attrlen) - attrlen); })
#define RTA_PUT_U8(skb, attrtype, value) \
({ u8 _tmp = (value); \
RTA_PUT(skb, attrtype, sizeof(u8), &_tmp); })
#define RTA_PUT_U16(skb, attrtype, value) \
({ u16 _tmp = (value); \
RTA_PUT(skb, attrtype, sizeof(u16), &_tmp); })
#define RTA_PUT_U32(skb, attrtype, value) \
({ u32 _tmp = (value); \
RTA_PUT(skb, attrtype, sizeof(u32), &_tmp); })
#define RTA_PUT_U64(skb, attrtype, value) \
({ u64 _tmp = (value); \
RTA_PUT(skb, attrtype, sizeof(u64), &_tmp); })
#define RTA_PUT_SECS(skb, attrtype, value) \
RTA_PUT_U64(skb, attrtype, (value) / HZ)
#define RTA_PUT_MSECS(skb, attrtype, value) \
RTA_PUT_U64(skb, attrtype, jiffies_to_msecs(value))
#define RTA_PUT_STRING(skb, attrtype, value) \
RTA_PUT(skb, attrtype, strlen(value) + 1, value)
#define RTA_PUT_FLAG(skb, attrtype) \
RTA_PUT(skb, attrtype, 0, NULL);
#define RTA_NEST(skb, type) \
({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \
RTA_PUT(skb, type, 0, NULL); \
__start; })
#define RTA_NEST_END(skb, start) \
({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \
(skb)->len; })
#define RTA_NEST_COMPAT(skb, type, attrlen, data) \
({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \
RTA_PUT(skb, type, attrlen, data); \
RTA_NEST(skb, type); \
__start; })
#define RTA_NEST_COMPAT_END(skb, start) \
({ struct rtattr *__nest = (void *)(start) + NLMSG_ALIGN((start)->rta_len); \
(start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \
RTA_NEST_END(skb, __nest); \
(skb)->len; })
#define RTA_NEST_CANCEL(skb, start) \
({ if (start) \
skb_trim(skb, (unsigned char *) (start) - (skb)->data); \
-1; })
#define RTA_GET_U8(rta) \
({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u8)) \
goto rtattr_failure; \
*(u8 *) RTA_DATA(rta); })
#define RTA_GET_U16(rta) \
({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u16)) \
goto rtattr_failure; \
*(u16 *) RTA_DATA(rta); })
#define RTA_GET_U32(rta) \
({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u32)) \
goto rtattr_failure; \
*(u32 *) RTA_DATA(rta); })
#define RTA_GET_U64(rta) \
({ u64 _tmp; \
if (!rta || RTA_PAYLOAD(rta) < sizeof(u64)) \
goto rtattr_failure; \
memcpy(&_tmp, RTA_DATA(rta), sizeof(_tmp)); \
_tmp; })
#define RTA_GET_FLAG(rta) (!!(rta))
#define RTA_GET_SECS(rta) ((unsigned long) RTA_GET_U64(rta) * HZ)
#define RTA_GET_MSECS(rta) (msecs_to_jiffies((unsigned long) RTA_GET_U64(rta)))
static
inline
struct
rtattr
*
__rta_reserve
(
struct
sk_buff
*
skb
,
int
attrtype
,
int
attrlen
)
{
struct
rtattr
*
rta
;
int
size
=
RTA_LENGTH
(
attrlen
);
rta
=
(
struct
rtattr
*
)
skb_put
(
skb
,
RTA_ALIGN
(
size
));
rta
->
rta_type
=
attrtype
;
rta
->
rta_len
=
size
;
memset
(
RTA_DATA
(
rta
)
+
attrlen
,
0
,
RTA_ALIGN
(
size
)
-
size
);
return
rta
;
}
#define __RTA_PUT(skb, attrtype, attrlen) \
({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
goto rtattr_failure; \
__rta_reserve(skb, attrtype, attrlen); })
extern
void
rtmsg_ifinfo
(
int
type
,
struct
net_device
*
dev
,
unsigned
change
);
/* RTNL is used as a global lock for all changes to network configuration */
extern
void
rtnl_lock
(
void
);
extern
void
rtnl_unlock
(
void
);
extern
int
rtnl_trylock
(
void
);
extern
int
rtnl_is_locked
(
void
);
extern
void
rtnetlink_init
(
void
);
extern
void
__rtnl_unlock
(
void
);
#define ASSERT_RTNL() do { \
if (unlikely(!rtnl_is_locked())) { \
printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \
__FILE__, __LINE__); \
dump_stack(); \
} \
} while(0)
static
inline
u32
rtm_get_table
(
struct
rtattr
**
rta
,
u8
table
)
{
return
RTA_GET_U32
(
rta
[
RTA_TABLE
-
1
]);
rtattr_failure:
return
table
;
}
#endif
/* __KERNEL__ */
#endif
/* __LINUX_RTNETLINK_H */
include/linux/socket.h
View file @
c40bba69
...
...
@@ -22,12 +22,14 @@ struct __kernel_sockaddr_storage {
#include <linux/sockios.h>
/* the SIOCxxx I/O controls */
#include <linux/uio.h>
/* iovec support */
#include <linux/types.h>
/* pid_t */
/*
*/
#include <linux/compiler.h>
/* __user
*/
#ifdef CONFIG_PROC_FS
#ifdef __KERNEL__
# ifdef CONFIG_PROC_FS
struct
seq_file
;
extern
void
socket_seq_show
(
struct
seq_file
*
seq
);
#endif
# endif
#endif
/* __KERNEL__ */
typedef
unsigned
short
sa_family_t
;
...
...
@@ -102,10 +104,12 @@ struct cmsghdr {
* This mess will go away with glibc
*/
#if defined(__GNUC__)
#ifdef __KERNEL__
#define __KINLINE static inline
#elif defined(__GNUC__)
#define __KINLINE static __inline__
#elif defined(__cplusplus)
#define __KINLINE static
__inline__
#define __KINLINE static
inline
#else
#define __KINLINE static
#endif
...
...
@@ -177,6 +181,7 @@ struct ucred {
#define AF_ASH 18
/* Ash */
#define AF_ECONET 19
/* Acorn Econet */
#define AF_ATMSVC 20
/* ATM SVCs */
#define AF_RDS 21
/* RDS sockets */
#define AF_SNA 22
/* Linux SNA Project (nutters!) */
#define AF_IRDA 23
/* IRDA sockets */
#define AF_PPPOX 24
/* PPPoX sockets */
...
...
@@ -189,7 +194,8 @@ struct ucred {
#define AF_RXRPC 33
/* RxRPC sockets */
#define AF_ISDN 34
/* mISDN sockets */
#define AF_PHONET 35
/* Phonet sockets */
#define AF_MAX 36
/* For now.. */
#define AF_IEEE802154 36
/* IEEE802154 sockets */
#define AF_MAX 37
/* For now.. */
/* Protocol families, same as address families. */
#define PF_UNSPEC AF_UNSPEC
...
...
@@ -215,6 +221,7 @@ struct ucred {
#define PF_ASH AF_ASH
#define PF_ECONET AF_ECONET
#define PF_ATMSVC AF_ATMSVC
#define PF_RDS AF_RDS
#define PF_SNA AF_SNA
#define PF_IRDA AF_IRDA
#define PF_PPPOX AF_PPPOX
...
...
@@ -227,6 +234,7 @@ struct ucred {
#define PF_RXRPC AF_RXRPC
#define PF_ISDN AF_ISDN
#define PF_PHONET AF_PHONET
#define PF_IEEE802154 AF_IEEE802154
#define PF_MAX AF_MAX
/* Maximum queue length specifiable by listen. */
...
...
@@ -296,9 +304,29 @@ struct ucred {
#define SOL_PPPOL2TP 273
#define SOL_BLUETOOTH 274
#define SOL_PNPIPE 275
#define SOL_RDS 276
#define SOL_IUCV 277
/* IPX options */
#define IPX_TYPE 1
#ifdef __KERNEL__
extern
int
memcpy_fromiovec
(
unsigned
char
*
kdata
,
struct
iovec
*
iov
,
int
len
);
extern
int
memcpy_fromiovecend
(
unsigned
char
*
kdata
,
const
struct
iovec
*
iov
,
int
offset
,
int
len
);
extern
int
csum_partial_copy_fromiovecend
(
unsigned
char
*
kdata
,
struct
iovec
*
iov
,
int
offset
,
unsigned
int
len
,
__wsum
*
csump
);
extern
int
verify_iovec
(
struct
msghdr
*
m
,
struct
iovec
*
iov
,
struct
sockaddr
*
address
,
int
mode
);
extern
int
memcpy_toiovec
(
struct
iovec
*
v
,
unsigned
char
*
kdata
,
int
len
);
extern
int
memcpy_toiovecend
(
const
struct
iovec
*
v
,
unsigned
char
*
kdata
,
int
offset
,
int
len
);
extern
int
move_addr_to_user
(
struct
sockaddr
*
kaddr
,
int
klen
,
void
__user
*
uaddr
,
int
__user
*
ulen
);
extern
int
move_addr_to_kernel
(
void
__user
*
uaddr
,
int
ulen
,
struct
sockaddr
*
kaddr
);
extern
int
put_cmsg
(
struct
msghdr
*
,
int
level
,
int
type
,
int
len
,
void
*
data
);
#endif
#endif
/* not kernel and not glibc */
#endif
/* _LINUX_SOCKET_H */
include/linux/types.h
View file @
c40bba69
#ifndef _LINUX_TYPES_H
#define _LINUX_TYPES_H
#include <asm/types.h>
#ifndef __ASSEMBLY__
#ifdef __KERNEL__
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]
#endif
#include <linux/posix_types.h>
#include <asm/types.h>
#if
ndef __KERNEL_STRICT_NAMES
#if
def __KERNEL__
typedef
__u32
__kernel_dev_t
;
...
...
@@ -23,8 +31,20 @@ typedef __kernel_timer_t timer_t;
typedef
__kernel_clockid_t
clockid_t
;
typedef
__kernel_mqd_t
mqd_t
;
typedef
__kernel_uid_t
uid_t
;
typedef
__kernel_gid_t
gid_t
;
typedef
_Bool
bool
;
typedef
__kernel_uid32_t
uid_t
;
typedef
__kernel_gid32_t
gid_t
;
typedef
__kernel_uid16_t
uid16_t
;
typedef
__kernel_gid16_t
gid16_t
;
typedef
unsigned
long
uintptr_t
;
#ifdef CONFIG_UID16
/* This is defined by include/asm-{arch}/posix_types.h */
typedef
__kernel_old_uid_t
old_uid_t
;
typedef
__kernel_old_gid_t
old_gid_t
;
#endif
/* CONFIG_UID16 */
#if defined(__GNUC__)
typedef
__kernel_loff_t
loff_t
;
...
...
@@ -111,7 +131,7 @@ typedef __s64 int64_t;
*
* blkcnt_t is the type of the inode's block count.
*/
#ifdef CONFIG_LBD
#ifdef CONFIG_LBD
AF
typedef
u64
sector_t
;
typedef
u64
blkcnt_t
;
#else
...
...
@@ -127,7 +147,7 @@ typedef unsigned long blkcnt_t;
#define pgoff_t unsigned long
#endif
#endif
/* __KERNEL_
STRICT_NAMES
*/
#endif
/* __KERNEL_
_
*/
/*
* Below are truly Linux-specific types that should never collide with
...
...
@@ -155,5 +175,35 @@ typedef __u64 __bitwise __be64;
typedef
__u16
__bitwise
__sum16
;
typedef
__u32
__bitwise
__wsum
;
#ifdef __KERNEL__
typedef
unsigned
__bitwise__
gfp_t
;
typedef
unsigned
__bitwise__
fmode_t
;
#ifdef CONFIG_PHYS_ADDR_T_64BIT
typedef
u64
phys_addr_t
;
#else
typedef
u32
phys_addr_t
;
#endif
typedef
phys_addr_t
resource_size_t
;
typedef
struct
{
volatile
int
counter
;
}
atomic_t
;
#ifdef CONFIG_64BIT
typedef
struct
{
volatile
long
counter
;
}
atomic64_t
;
#endif
struct
ustat
{
__kernel_daddr_t
f_tfree
;
__kernel_ino_t
f_tinode
;
char
f_fname
[
6
];
char
f_fpack
[
6
];
};
#endif
/* __KERNEL__ */
#endif
/* __ASSEMBLY__ */
#endif
/* _LINUX_TYPES_H */
include/linux/xfrm.h
View file @
c40bba69
...
...
@@ -58,7 +58,7 @@ struct xfrm_selector
__u8
prefixlen_s
;
__u8
proto
;
int
ifindex
;
uid
_t
user
;
__kernel_uid32
_t
user
;
};
#define XFRM_INF (~(__u64)0)
...
...
@@ -450,12 +450,14 @@ struct xfrm_user_mapping {
__be16
new_sport
;
};
#ifndef __KERNEL__
/* backwards compatibility for userspace */
#define XFRMGRP_ACQUIRE 1
#define XFRMGRP_EXPIRE 2
#define XFRMGRP_SA 4
#define XFRMGRP_POLICY 8
#define XFRMGRP_REPORT 0x20
#endif
enum
xfrm_nlgroups
{
XFRMNLGRP_NONE
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment