Merge branch 'linux-2.6' into for-linus
This commit is contained in:
@@ -120,6 +120,7 @@ header-y += netrom.h
|
||||
header-y += nfs2.h
|
||||
header-y += nfs4_mount.h
|
||||
header-y += nfs_mount.h
|
||||
header-y += oom.h
|
||||
header-y += param.h
|
||||
header-y += pci_ids.h
|
||||
header-y += pci_regs.h
|
||||
@@ -192,7 +193,6 @@ unifdef-y += cuda.h
|
||||
unifdef-y += cyclades.h
|
||||
unifdef-y += dccp.h
|
||||
unifdef-y += dirent.h
|
||||
unifdef-y += divert.h
|
||||
unifdef-y += dlm.h
|
||||
unifdef-y += elfcore.h
|
||||
unifdef-y += errno.h
|
||||
|
||||
@@ -37,7 +37,7 @@ enum atmarp_ctrl_type {
|
||||
struct atmarp_ctrl {
|
||||
enum atmarp_ctrl_type type; /* message type */
|
||||
int itf_num;/* interface number (if present) */
|
||||
uint32_t ip; /* IP address (act_need only) */
|
||||
__be32 ip; /* IP address (act_need only) */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -86,8 +86,8 @@ struct atm_backend_br2684 {
|
||||
* efficient per-if in/out filters, this support will be removed
|
||||
*/
|
||||
struct br2684_filter {
|
||||
__u32 prefix; /* network byte order */
|
||||
__u32 netmask; /* 0 = disable filter */
|
||||
__be32 prefix; /* network byte order */
|
||||
__be32 netmask; /* 0 = disable filter */
|
||||
};
|
||||
|
||||
struct br2684_filter_set {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
struct atmmpc_ioc {
|
||||
int dev_num;
|
||||
uint32_t ipaddr; /* the IP address of the shortcut */
|
||||
__be32 ipaddr; /* the IP address of the shortcut */
|
||||
int type; /* ingress or egress */
|
||||
};
|
||||
|
||||
@@ -21,8 +21,8 @@ typedef struct in_ctrl_info {
|
||||
uint8_t Last_NHRP_CIE_code;
|
||||
uint8_t Last_Q2931_cause_value;
|
||||
uint8_t eg_MPC_ATM_addr[ATM_ESA_LEN];
|
||||
uint32_t tag;
|
||||
uint32_t in_dst_ip; /* IP address this ingress MPC sends packets to */
|
||||
__be32 tag;
|
||||
__be32 in_dst_ip; /* IP address this ingress MPC sends packets to */
|
||||
uint16_t holding_time;
|
||||
uint32_t request_id;
|
||||
} in_ctrl_info;
|
||||
@@ -30,10 +30,10 @@ typedef struct in_ctrl_info {
|
||||
typedef struct eg_ctrl_info {
|
||||
uint8_t DLL_header[256];
|
||||
uint8_t DH_length;
|
||||
uint32_t cache_id;
|
||||
uint32_t tag;
|
||||
uint32_t mps_ip;
|
||||
uint32_t eg_dst_ip; /* IP address to which ingress MPC sends packets */
|
||||
__be32 cache_id;
|
||||
__be32 tag;
|
||||
__be32 mps_ip;
|
||||
__be32 eg_dst_ip; /* IP address to which ingress MPC sends packets */
|
||||
uint8_t in_MPC_data_ATM_addr[ATM_ESA_LEN];
|
||||
uint16_t holding_time;
|
||||
} eg_ctrl_info;
|
||||
@@ -49,7 +49,7 @@ struct mpc_parameters {
|
||||
|
||||
struct k_message {
|
||||
uint16_t type;
|
||||
uint32_t ip_mask;
|
||||
__be32 ip_mask;
|
||||
uint8_t MPS_ctrl[ATM_ESA_LEN];
|
||||
union {
|
||||
in_ctrl_info in_info;
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
#include <asm/atomic.h>
|
||||
|
||||
struct page;
|
||||
|
||||
/*
|
||||
* Bits in backing_dev_info.state
|
||||
*/
|
||||
@@ -88,6 +90,11 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi)
|
||||
(1 << BDI_write_congested));
|
||||
}
|
||||
|
||||
void clear_bdi_congested(struct backing_dev_info *bdi, int rw);
|
||||
void set_bdi_congested(struct backing_dev_info *bdi, int rw);
|
||||
long congestion_wait(int rw, long timeout);
|
||||
void congestion_end(int rw);
|
||||
|
||||
#define bdi_cap_writeback_dirty(bdi) \
|
||||
(!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK))
|
||||
|
||||
|
||||
+24
-5
@@ -651,6 +651,26 @@ extern void blk_recount_segments(request_queue_t *, struct bio *);
|
||||
extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *);
|
||||
extern int sg_scsi_ioctl(struct file *, struct request_queue *,
|
||||
struct gendisk *, struct scsi_ioctl_command __user *);
|
||||
|
||||
/*
|
||||
* A queue has just exitted congestion. Note this in the global counter of
|
||||
* congested queues, and wake up anyone who was waiting for requests to be
|
||||
* put back.
|
||||
*/
|
||||
static inline void blk_clear_queue_congested(request_queue_t *q, int rw)
|
||||
{
|
||||
clear_bdi_congested(&q->backing_dev_info, rw);
|
||||
}
|
||||
|
||||
/*
|
||||
* A queue has just entered congestion. Flag that in the queue's VM-visible
|
||||
* state flags and increment the global gounter of congested queues.
|
||||
*/
|
||||
static inline void blk_set_queue_congested(request_queue_t *q, int rw)
|
||||
{
|
||||
set_bdi_congested(&q->backing_dev_info, rw);
|
||||
}
|
||||
|
||||
extern void blk_start_queue(request_queue_t *q);
|
||||
extern void blk_stop_queue(request_queue_t *q);
|
||||
extern void blk_sync_queue(struct request_queue *q);
|
||||
@@ -658,10 +678,11 @@ extern void __blk_stop_queue(request_queue_t *q);
|
||||
extern void blk_run_queue(request_queue_t *);
|
||||
extern void blk_start_queueing(request_queue_t *);
|
||||
extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *);
|
||||
extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned int);
|
||||
extern int blk_rq_unmap_user(struct bio *, unsigned int);
|
||||
extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long);
|
||||
extern int blk_rq_unmap_user(struct request *);
|
||||
extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t);
|
||||
extern int blk_rq_map_user_iov(request_queue_t *, struct request *, struct sg_iovec *, int);
|
||||
extern int blk_rq_map_user_iov(request_queue_t *, struct request *,
|
||||
struct sg_iovec *, int, unsigned int);
|
||||
extern int blk_execute_rq(request_queue_t *, struct gendisk *,
|
||||
struct request *, int);
|
||||
extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *,
|
||||
@@ -765,10 +786,8 @@ extern int blk_queue_init_tags(request_queue_t *, int, struct blk_queue_tag *);
|
||||
extern void blk_queue_free_tags(request_queue_t *);
|
||||
extern int blk_queue_resize_tags(request_queue_t *, int);
|
||||
extern void blk_queue_invalidate_tags(request_queue_t *);
|
||||
extern long blk_congestion_wait(int rw, long timeout);
|
||||
extern struct blk_queue_tag *blk_init_tags(int);
|
||||
extern void blk_free_tags(struct blk_queue_tag *);
|
||||
extern void blk_congestion_end(int rw);
|
||||
|
||||
static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt,
|
||||
int tag)
|
||||
|
||||
@@ -49,6 +49,15 @@ enum blktrace_act {
|
||||
__BLK_TA_REMAP, /* bio was remapped */
|
||||
};
|
||||
|
||||
/*
|
||||
* Notify events.
|
||||
*/
|
||||
enum blktrace_notify {
|
||||
__BLK_TN_PROCESS = 0, /* establish pid/name mapping */
|
||||
__BLK_TN_TIMESTAMP, /* include system clock */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Trace actions in full. Additionally, read or write is masked
|
||||
*/
|
||||
@@ -68,6 +77,9 @@ enum blktrace_act {
|
||||
#define BLK_TA_BOUNCE (__BLK_TA_BOUNCE)
|
||||
#define BLK_TA_REMAP (__BLK_TA_REMAP | BLK_TC_ACT(BLK_TC_QUEUE))
|
||||
|
||||
#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
|
||||
#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
|
||||
|
||||
#define BLK_IO_TRACE_MAGIC 0x65617400
|
||||
#define BLK_IO_TRACE_VERSION 0x07
|
||||
|
||||
|
||||
@@ -69,6 +69,8 @@ struct buffer_head {
|
||||
bh_end_io_t *b_end_io; /* I/O completion */
|
||||
void *b_private; /* reserved for b_end_io */
|
||||
struct list_head b_assoc_buffers; /* associated with another mapping */
|
||||
struct address_space *b_assoc_map; /* mapping this buffer is
|
||||
associated with */
|
||||
atomic_t b_count; /* users using this buffer_head */
|
||||
};
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
|
||||
#define BITS_TO_COMPAT_LONGS(bits) \
|
||||
(((bits)+BITS_PER_COMPAT_LONG-1)/BITS_PER_COMPAT_LONG)
|
||||
|
||||
long compat_get_bitmap(unsigned long *mask, compat_ulong_t __user *umask,
|
||||
long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask,
|
||||
unsigned long bitmap_size);
|
||||
long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
|
||||
unsigned long bitmap_size);
|
||||
@@ -230,5 +230,9 @@ asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
|
||||
extern int compat_printk(const char *fmt, ...);
|
||||
extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat);
|
||||
|
||||
asmlinkage long compat_sys_migrate_pages(compat_pid_t pid,
|
||||
compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes,
|
||||
const compat_ulong_t __user *new_nodes);
|
||||
|
||||
#endif /* CONFIG_COMPAT */
|
||||
#endif /* _LINUX_COMPAT_H */
|
||||
|
||||
@@ -131,6 +131,7 @@ COMPATIBLE_IOCTL(RUN_ARRAY)
|
||||
COMPATIBLE_IOCTL(STOP_ARRAY)
|
||||
COMPATIBLE_IOCTL(STOP_ARRAY_RO)
|
||||
COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
|
||||
COMPATIBLE_IOCTL(GET_BITMAP_FILE)
|
||||
ULONG_IOCTL(SET_BITMAP_FILE)
|
||||
/* DM */
|
||||
COMPATIBLE_IOCTL(DM_VERSION_32)
|
||||
|
||||
@@ -245,7 +245,7 @@ int crypto_alg_available(const char *name, u32 flags)
|
||||
__deprecated_for_modules;
|
||||
int crypto_has_alg(const char *name, u32 type, u32 mask);
|
||||
#else
|
||||
static int crypto_alg_available(const char *name, u32 flags);
|
||||
static int crypto_alg_available(const char *name, u32 flags)
|
||||
__deprecated_for_modules;
|
||||
static inline int crypto_alg_available(const char *name, u32 flags)
|
||||
{
|
||||
|
||||
+47
-16
@@ -30,7 +30,7 @@ struct dccp_hdr {
|
||||
#else
|
||||
#error "Adjust your <asm/byteorder.h> defines"
|
||||
#endif
|
||||
__u16 dccph_checksum;
|
||||
__sum16 dccph_checksum;
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
__u8 dccph_x:1,
|
||||
dccph_type:4,
|
||||
@@ -175,17 +175,21 @@ enum {
|
||||
DCCPC_CCID3 = 3,
|
||||
};
|
||||
|
||||
/* DCCP features */
|
||||
enum {
|
||||
DCCPF_RESERVED = 0,
|
||||
DCCPF_CCID = 1,
|
||||
DCCPF_SEQUENCE_WINDOW = 3,
|
||||
DCCPF_ACK_RATIO = 5,
|
||||
DCCPF_SEND_ACK_VECTOR = 6,
|
||||
DCCPF_SEND_NDP_COUNT = 7,
|
||||
/* 10-127 reserved */
|
||||
DCCPF_MIN_CCID_SPECIFIC = 128,
|
||||
DCCPF_MAX_CCID_SPECIFIC = 255,
|
||||
/* DCCP features (RFC 4340 section 6.4) */
|
||||
enum {
|
||||
DCCPF_RESERVED = 0,
|
||||
DCCPF_CCID = 1,
|
||||
DCCPF_SHORT_SEQNOS = 2, /* XXX: not yet implemented */
|
||||
DCCPF_SEQUENCE_WINDOW = 3,
|
||||
DCCPF_ECN_INCAPABLE = 4, /* XXX: not yet implemented */
|
||||
DCCPF_ACK_RATIO = 5,
|
||||
DCCPF_SEND_ACK_VECTOR = 6,
|
||||
DCCPF_SEND_NDP_COUNT = 7,
|
||||
DCCPF_MIN_CSUM_COVER = 8,
|
||||
DCCPF_DATA_CHECKSUM = 9, /* XXX: not yet implemented */
|
||||
/* 10-127 reserved */
|
||||
DCCPF_MIN_CCID_SPECIFIC = 128,
|
||||
DCCPF_MAX_CCID_SPECIFIC = 255,
|
||||
};
|
||||
|
||||
/* this structure is argument to DCCP_SOCKOPT_CHANGE_X */
|
||||
@@ -196,13 +200,16 @@ struct dccp_so_feat {
|
||||
};
|
||||
|
||||
/* DCCP socket options */
|
||||
#define DCCP_SOCKOPT_PACKET_SIZE 1
|
||||
#define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */
|
||||
#define DCCP_SOCKOPT_SERVICE 2
|
||||
#define DCCP_SOCKOPT_CHANGE_L 3
|
||||
#define DCCP_SOCKOPT_CHANGE_R 4
|
||||
#define DCCP_SOCKOPT_SEND_CSCOV 10
|
||||
#define DCCP_SOCKOPT_RECV_CSCOV 11
|
||||
#define DCCP_SOCKOPT_CCID_RX_INFO 128
|
||||
#define DCCP_SOCKOPT_CCID_TX_INFO 192
|
||||
|
||||
/* maximum number of services provided on the same listening port */
|
||||
#define DCCP_SERVICE_LIST_MAX_LEN 32
|
||||
|
||||
#ifdef __KERNEL__
|
||||
@@ -256,6 +263,13 @@ static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb)
|
||||
return (struct dccp_hdr *)skb->h.raw;
|
||||
}
|
||||
|
||||
static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen)
|
||||
{
|
||||
skb->h.raw = skb_push(skb, headlen);
|
||||
memset(skb->h.raw, 0, headlen);
|
||||
return dccp_hdr(skb);
|
||||
}
|
||||
|
||||
static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb)
|
||||
{
|
||||
return (struct dccp_hdr_ext *)(skb->h.raw + sizeof(struct dccp_hdr));
|
||||
@@ -342,6 +356,9 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
|
||||
* @dccpms_ccid - Congestion Control Id (CCID) (section 10)
|
||||
* @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5)
|
||||
* @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2)
|
||||
* @dccpms_ack_ratio - Ack Ratio Feature (section 11.3)
|
||||
* @dccpms_pending - List of features being negotiated
|
||||
* @dccpms_conf -
|
||||
*/
|
||||
struct dccp_minisock {
|
||||
__u64 dccpms_sequence_window;
|
||||
@@ -439,12 +456,25 @@ struct dccp_ackvec;
|
||||
* @dccps_gss - greatest sequence number sent
|
||||
* @dccps_gsr - greatest valid sequence number received
|
||||
* @dccps_gar - greatest valid ack number received on a non-Sync; initialized to %dccps_iss
|
||||
* @dccps_service - first (passive sock) or unique (active sock) service code
|
||||
* @dccps_service_list - second .. last service code on passive socket
|
||||
* @dccps_timestamp_time - time of latest TIMESTAMP option
|
||||
* @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option
|
||||
* @dccps_packet_size - Set thru setsockopt
|
||||
* @dccps_role - Role of this sock, one of %dccp_role
|
||||
* @dccps_l_ack_ratio -
|
||||
* @dccps_r_ack_ratio -
|
||||
* @dccps_pcslen - sender partial checksum coverage (via sockopt)
|
||||
* @dccps_pcrlen - receiver partial checksum coverage (via sockopt)
|
||||
* @dccps_ndp_count - number of Non Data Packets since last data packet
|
||||
* @dccps_mss_cache -
|
||||
* @dccps_minisock -
|
||||
* @dccps_hc_rx_ackvec - rx half connection ack vector
|
||||
* @dccps_hc_rx_ccid -
|
||||
* @dccps_hc_tx_ccid -
|
||||
* @dccps_options_received -
|
||||
* @dccps_epoch -
|
||||
* @dccps_role - Role of this sock, one of %dccp_role
|
||||
* @dccps_hc_rx_insert_options -
|
||||
* @dccps_hc_tx_insert_options -
|
||||
* @dccps_xmit_timer - timer for when CCID is not ready to send
|
||||
*/
|
||||
struct dccp_sock {
|
||||
@@ -464,9 +494,10 @@ struct dccp_sock {
|
||||
struct dccp_service_list *dccps_service_list;
|
||||
struct timeval dccps_timestamp_time;
|
||||
__u32 dccps_timestamp_echo;
|
||||
__u32 dccps_packet_size;
|
||||
__u16 dccps_l_ack_ratio;
|
||||
__u16 dccps_r_ack_ratio;
|
||||
__u16 dccps_pcslen;
|
||||
__u16 dccps_pcrlen;
|
||||
unsigned long dccps_ndp_count;
|
||||
__u32 dccps_mss_cache;
|
||||
struct dccp_minisock dccps_minisock;
|
||||
|
||||
+32
-5
@@ -21,6 +21,7 @@
|
||||
#include <linux/pm.h>
|
||||
#include <asm/semaphore.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/device.h>
|
||||
|
||||
#define DEVICE_NAME_SIZE 50
|
||||
#define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */
|
||||
@@ -42,6 +43,8 @@ struct bus_type {
|
||||
struct klist klist_devices;
|
||||
struct klist klist_drivers;
|
||||
|
||||
struct blocking_notifier_head bus_notifier;
|
||||
|
||||
struct bus_attribute * bus_attrs;
|
||||
struct device_attribute * dev_attrs;
|
||||
struct driver_attribute * drv_attrs;
|
||||
@@ -75,6 +78,29 @@ int __must_check bus_for_each_drv(struct bus_type *bus,
|
||||
struct device_driver *start, void *data,
|
||||
int (*fn)(struct device_driver *, void *));
|
||||
|
||||
/*
|
||||
* Bus notifiers: Get notified of addition/removal of devices
|
||||
* and binding/unbinding of drivers to devices.
|
||||
* In the long run, it should be a replacement for the platform
|
||||
* notify hooks.
|
||||
*/
|
||||
struct notifier_block;
|
||||
|
||||
extern int bus_register_notifier(struct bus_type *bus,
|
||||
struct notifier_block *nb);
|
||||
extern int bus_unregister_notifier(struct bus_type *bus,
|
||||
struct notifier_block *nb);
|
||||
|
||||
/* All 4 notifers below get called with the target struct device *
|
||||
* as an argument. Note that those functions are likely to be called
|
||||
* with the device semaphore held in the core, so be careful.
|
||||
*/
|
||||
#define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */
|
||||
#define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */
|
||||
#define BUS_NOTIFY_BOUND_DRIVER 0x00000003 /* driver bound to device */
|
||||
#define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be
|
||||
unbound */
|
||||
|
||||
/* driverfs interface for exporting bus attributes */
|
||||
|
||||
struct bus_attribute {
|
||||
@@ -343,8 +369,6 @@ struct device {
|
||||
void *driver_data; /* data private to the driver */
|
||||
void *platform_data; /* Platform specific data, device
|
||||
core doesn't touch it */
|
||||
void *firmware_data; /* Firmware specific data (e.g. ACPI,
|
||||
BIOS data),reserved for device core*/
|
||||
struct dev_pm_info power;
|
||||
|
||||
u64 *dma_mask; /* dma mask (if dma'able device) */
|
||||
@@ -358,6 +382,8 @@ struct device {
|
||||
|
||||
struct dma_coherent_mem *dma_mem; /* internal for coherent mem
|
||||
override */
|
||||
/* arch specific additions */
|
||||
struct dev_archdata archdata;
|
||||
|
||||
/* class_device migration path */
|
||||
struct list_head node;
|
||||
@@ -393,9 +419,12 @@ extern void device_unregister(struct device * dev);
|
||||
extern void device_initialize(struct device * dev);
|
||||
extern int __must_check device_add(struct device * dev);
|
||||
extern void device_del(struct device * dev);
|
||||
extern int __must_check device_for_each_child(struct device *, void *,
|
||||
extern int device_for_each_child(struct device *, void *,
|
||||
int (*fn)(struct device *, void *));
|
||||
extern struct device *device_find_child(struct device *, void *data,
|
||||
int (*match)(struct device *, void *));
|
||||
extern int device_rename(struct device *dev, char *new_name);
|
||||
extern int device_move(struct device *dev, struct device *new_parent);
|
||||
|
||||
/*
|
||||
* Manual binding of a device to driver. See drivers/base/bus.c
|
||||
@@ -415,8 +444,6 @@ extern struct device *device_create(struct class *cls, struct device *parent,
|
||||
__attribute__((format(printf,4,5)));
|
||||
extern void device_destroy(struct class *cls, dev_t devt);
|
||||
|
||||
extern int virtual_device_parent(struct device *dev);
|
||||
|
||||
/*
|
||||
* Platform "fixup" functions - allow the platform to have their say
|
||||
* about devices and actions that the general device layer doesn't
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
/*
|
||||
* Frame Diversion, Benoit Locher <Benoit.Locher@skf.com>
|
||||
*
|
||||
* Changes:
|
||||
* 06/09/2000 BL: initial version
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_DIVERT_H
|
||||
#define _LINUX_DIVERT_H
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
#define MAX_DIVERT_PORTS 8 /* Max number of ports to divert (tcp, udp) */
|
||||
|
||||
/* Divertable protocols */
|
||||
#define DIVERT_PROTO_NONE 0x0000
|
||||
#define DIVERT_PROTO_IP 0x0001
|
||||
#define DIVERT_PROTO_ICMP 0x0002
|
||||
#define DIVERT_PROTO_TCP 0x0004
|
||||
#define DIVERT_PROTO_UDP 0x0008
|
||||
|
||||
/*
|
||||
* This is an Ethernet Frame Diverter option block
|
||||
*/
|
||||
struct divert_blk
|
||||
{
|
||||
int divert; /* are we active */
|
||||
unsigned int protos; /* protocols */
|
||||
__u16 tcp_dst[MAX_DIVERT_PORTS]; /* specific tcp dst ports to divert */
|
||||
__u16 tcp_src[MAX_DIVERT_PORTS]; /* specific tcp src ports to divert */
|
||||
__u16 udp_dst[MAX_DIVERT_PORTS]; /* specific udp dst ports to divert */
|
||||
__u16 udp_src[MAX_DIVERT_PORTS]; /* specific udp src ports to divert */
|
||||
};
|
||||
|
||||
/*
|
||||
* Diversion control block, for configuration with the userspace tool
|
||||
* divert
|
||||
*/
|
||||
|
||||
typedef union _divert_cf_arg
|
||||
{
|
||||
__s16 int16;
|
||||
__u16 uint16;
|
||||
__s32 int32;
|
||||
__u32 uint32;
|
||||
__s64 int64;
|
||||
__u64 uint64;
|
||||
void __user *ptr;
|
||||
} divert_cf_arg;
|
||||
|
||||
|
||||
struct divert_cf
|
||||
{
|
||||
int cmd; /* Command */
|
||||
divert_cf_arg arg1,
|
||||
arg2,
|
||||
arg3;
|
||||
int dev_index; /* device index (eth0=0, etc...) */
|
||||
};
|
||||
|
||||
|
||||
/* Diversion commands */
|
||||
#define DIVCMD_DIVERT 1 /* ENABLE/DISABLE diversion */
|
||||
#define DIVCMD_IP 2 /* ENABLE/DISABLE whold IP diversion */
|
||||
#define DIVCMD_TCP 3 /* ENABLE/DISABLE whold TCP diversion */
|
||||
#define DIVCMD_TCPDST 4 /* ADD/REMOVE TCP DST port for diversion */
|
||||
#define DIVCMD_TCPSRC 5 /* ADD/REMOVE TCP SRC port for diversion */
|
||||
#define DIVCMD_UDP 6 /* ENABLE/DISABLE whole UDP diversion */
|
||||
#define DIVCMD_UDPDST 7 /* ADD/REMOVE UDP DST port for diversion */
|
||||
#define DIVCMD_UDPSRC 8 /* ADD/REMOVE UDP SRC port for diversion */
|
||||
#define DIVCMD_ICMP 9 /* ENABLE/DISABLE whole ICMP diversion */
|
||||
#define DIVCMD_GETSTATUS 10 /* GET the status of the diverter */
|
||||
#define DIVCMD_RESET 11 /* Reset the diverter on the specified dev */
|
||||
#define DIVCMD_GETVERSION 12 /* Retrieve the diverter code version (char[32]) */
|
||||
|
||||
/* General syntax of the commands:
|
||||
*
|
||||
* DIVCMD_xxxxxx(arg1, arg2, arg3, dev_index)
|
||||
*
|
||||
* SIOCSIFDIVERT:
|
||||
* DIVCMD_DIVERT(DIVARG1_ENABLE|DIVARG1_DISABLE, , ,ifindex)
|
||||
* DIVCMD_IP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
|
||||
* DIVCMD_TCP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
|
||||
* DIVCMD_TCPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
|
||||
* DIVCMD_TCPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
|
||||
* DIVCMD_UDP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
|
||||
* DIVCMD_UDPDST(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
|
||||
* DIVCMD_UDPSRC(DIVARG1_ADD|DIVARG1_REMOVE, port, , ifindex)
|
||||
* DIVCMD_ICMP(DIVARG1_ENABLE|DIVARG1_DISABLE, , , ifindex)
|
||||
* DIVCMD_RESET(, , , ifindex)
|
||||
*
|
||||
* SIOGIFDIVERT:
|
||||
* DIVCMD_GETSTATUS(divert_blk, , , ifindex)
|
||||
* DIVCMD_GETVERSION(string[3])
|
||||
*/
|
||||
|
||||
|
||||
/* Possible values for arg1 */
|
||||
#define DIVARG1_ENABLE 0 /* ENABLE something */
|
||||
#define DIVARG1_DISABLE 1 /* DISABLE something */
|
||||
#define DIVARG1_ADD 2 /* ADD something */
|
||||
#define DIVARG1_REMOVE 3 /* REMOVE something */
|
||||
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* diverter functions */
|
||||
#include <linux/skbuff.h>
|
||||
|
||||
#ifdef CONFIG_NET_DIVERT
|
||||
#include <linux/netdevice.h>
|
||||
|
||||
int alloc_divert_blk(struct net_device *);
|
||||
void free_divert_blk(struct net_device *);
|
||||
int divert_ioctl(unsigned int cmd, struct divert_cf __user *arg);
|
||||
void divert_frame(struct sk_buff *skb);
|
||||
static inline void handle_diverter(struct sk_buff *skb)
|
||||
{
|
||||
/* if diversion is supported on device, then divert */
|
||||
if (skb->dev->divert && skb->dev->divert->divert)
|
||||
divert_frame(skb);
|
||||
}
|
||||
|
||||
#else
|
||||
# define alloc_divert_blk(dev) (0)
|
||||
# define free_divert_blk(dev) do {} while (0)
|
||||
# define divert_ioctl(cmd, arg) (-ENOPKG)
|
||||
# define handle_diverter(skb) do {} while (0)
|
||||
#endif
|
||||
#endif
|
||||
#endif /* _LINUX_DIVERT_H */
|
||||
@@ -69,6 +69,7 @@ extern struct dmi_device * dmi_find_device(int type, const char *name,
|
||||
struct dmi_device *from);
|
||||
extern void dmi_scan_machine(void);
|
||||
extern int dmi_get_year(int field);
|
||||
extern int dmi_name_in_vendors(char *str);
|
||||
|
||||
#else
|
||||
|
||||
@@ -77,6 +78,7 @@ static inline char * dmi_get_system_info(int field) { return NULL; }
|
||||
static inline struct dmi_device * dmi_find_device(int type, const char *name,
|
||||
struct dmi_device *from) { return NULL; }
|
||||
static inline int dmi_get_year(int year) { return 0; }
|
||||
static inline int dmi_name_in_vendors(char *s) { return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
|
||||
typedef int (elevator_may_queue_fn) (request_queue_t *, int);
|
||||
|
||||
typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t);
|
||||
typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
|
||||
typedef void (elevator_put_req_fn) (struct request *);
|
||||
typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
|
||||
typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
|
||||
|
||||
typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *);
|
||||
typedef void *(elevator_init_fn) (request_queue_t *);
|
||||
typedef void (elevator_exit_fn) (elevator_t *);
|
||||
|
||||
struct elevator_ops
|
||||
|
||||
+4
-4
@@ -774,8 +774,8 @@ struct fb_info {
|
||||
#endif
|
||||
|
||||
struct fb_ops *fbops;
|
||||
struct device *device;
|
||||
struct class_device *class_device; /* sysfs per device attrs */
|
||||
struct device *device; /* This is the parent */
|
||||
struct device *dev; /* This is this fb device */
|
||||
int class_flag; /* private sysfs flags */
|
||||
#ifdef CONFIG_FB_TILEBLITTING
|
||||
struct fb_tile_ops *tileops; /* Tile Blitting */
|
||||
@@ -910,8 +910,8 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
|
||||
/* drivers/video/fbsysfs.c */
|
||||
extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
|
||||
extern void framebuffer_release(struct fb_info *info);
|
||||
extern int fb_init_class_device(struct fb_info *fb_info);
|
||||
extern void fb_cleanup_class_device(struct fb_info *head);
|
||||
extern int fb_init_device(struct fb_info *fb_info);
|
||||
extern void fb_cleanup_device(struct fb_info *head);
|
||||
extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max);
|
||||
|
||||
/* drivers/video/fbmon.c */
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
/* rule is permanent, and cannot be deleted */
|
||||
#define FIB_RULE_PERMANENT 1
|
||||
#define FIB_RULE_INVERT 2
|
||||
|
||||
struct fib_rule_hdr
|
||||
{
|
||||
@@ -34,7 +35,7 @@ enum
|
||||
FRA_UNUSED3,
|
||||
FRA_UNUSED4,
|
||||
FRA_UNUSED5,
|
||||
FRA_FWMARK, /* netfilter mark */
|
||||
FRA_FWMARK, /* mark */
|
||||
FRA_FLOW, /* flow/class id */
|
||||
FRA_UNUSED6,
|
||||
FRA_UNUSED7,
|
||||
|
||||
+12
-1
@@ -623,6 +623,9 @@ enum inode_i_mutex_lock_class
|
||||
I_MUTEX_QUOTA
|
||||
};
|
||||
|
||||
extern void inode_double_lock(struct inode *inode1, struct inode *inode2);
|
||||
extern void inode_double_unlock(struct inode *inode1, struct inode *inode2);
|
||||
|
||||
/*
|
||||
* NOTE: in a 32bit arch with a preemptable kernel and
|
||||
* an UP compile the i_size_read/write must be atomic
|
||||
@@ -656,7 +659,11 @@ static inline loff_t i_size_read(struct inode *inode)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* NOTE: unlike i_size_read(), i_size_write() does need locking around it
|
||||
* (normally i_mutex), otherwise on 32bit/SMP an update of i_size_seqcount
|
||||
* can be lost, resulting in subsequent i_size_read() calls spinning forever.
|
||||
*/
|
||||
static inline void i_size_write(struct inode *inode, loff_t i_size)
|
||||
{
|
||||
#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
|
||||
@@ -1705,6 +1712,8 @@ extern void __iget(struct inode * inode);
|
||||
extern void clear_inode(struct inode *);
|
||||
extern void destroy_inode(struct inode *);
|
||||
extern struct inode *new_inode(struct super_block *);
|
||||
extern int __remove_suid(struct dentry *, int);
|
||||
extern int should_remove_suid(struct dentry *);
|
||||
extern int remove_suid(struct dentry *);
|
||||
extern void remove_dquot_ref(struct super_block *, int, struct list_head *);
|
||||
|
||||
@@ -1751,6 +1760,8 @@ extern ssize_t generic_file_splice_read(struct file *, loff_t *,
|
||||
struct pipe_inode_info *, size_t, unsigned int);
|
||||
extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
|
||||
struct file *, loff_t *, size_t, unsigned int);
|
||||
extern ssize_t generic_file_splice_write_nolock(struct pipe_inode_info *,
|
||||
struct file *, loff_t *, size_t, unsigned int);
|
||||
extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
|
||||
struct file *out, loff_t *, size_t len, unsigned int flags);
|
||||
extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
|
||||
|
||||
+12
-4
@@ -1,15 +1,23 @@
|
||||
#ifndef LINUX_HTIRQ_H
|
||||
#define LINUX_HTIRQ_H
|
||||
|
||||
struct ht_irq_msg {
|
||||
u32 address_lo; /* low 32 bits of the ht irq message */
|
||||
u32 address_hi; /* high 32 bits of the it irq message */
|
||||
};
|
||||
|
||||
/* Helper functions.. */
|
||||
void write_ht_irq_low(unsigned int irq, u32 data);
|
||||
void write_ht_irq_high(unsigned int irq, u32 data);
|
||||
u32 read_ht_irq_low(unsigned int irq);
|
||||
u32 read_ht_irq_high(unsigned int irq);
|
||||
void fetch_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
||||
void write_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
||||
void mask_ht_irq(unsigned int irq);
|
||||
void unmask_ht_irq(unsigned int irq);
|
||||
|
||||
/* The arch hook for getting things started */
|
||||
int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev);
|
||||
|
||||
/* For drivers of buggy hardware */
|
||||
typedef void (ht_irq_update_t)(struct pci_dev *dev, int irq,
|
||||
struct ht_irq_msg *msg);
|
||||
int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update);
|
||||
|
||||
#endif /* LINUX_HTIRQ_H */
|
||||
|
||||
@@ -60,8 +60,11 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
|
||||
* If the arch doesn't supply something else, assume that hugepage
|
||||
* size aligned regions are ok without further preparation.
|
||||
*/
|
||||
static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
|
||||
static inline int prepare_hugepage_range(unsigned long addr, unsigned long len,
|
||||
pgoff_t pgoff)
|
||||
{
|
||||
if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
|
||||
return -EINVAL;
|
||||
if (len & ~HPAGE_MASK)
|
||||
return -EINVAL;
|
||||
if (addr & ~HPAGE_MASK)
|
||||
@@ -69,7 +72,8 @@ static inline int prepare_hugepage_range(unsigned long addr, unsigned long len)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int prepare_hugepage_range(unsigned long addr, unsigned long len);
|
||||
int prepare_hugepage_range(unsigned long addr, unsigned long len,
|
||||
pgoff_t pgoff);
|
||||
#endif
|
||||
|
||||
#ifndef ARCH_HAS_SETCLEAR_HUGE_PTE
|
||||
@@ -107,7 +111,7 @@ static inline unsigned long hugetlb_total_pages(void)
|
||||
#define hugetlb_report_meminfo(buf) 0
|
||||
#define hugetlb_report_node_meminfo(n, buf) 0
|
||||
#define follow_huge_pmd(mm, addr, pmd, write) NULL
|
||||
#define prepare_hugepage_range(addr, len) (-EINVAL)
|
||||
#define prepare_hugepage_range(addr,len,pgoff) (-EINVAL)
|
||||
#define pmd_huge(x) 0
|
||||
#define is_hugepage_only_range(mm, addr, len) 0
|
||||
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
struct icmphdr {
|
||||
__u8 type;
|
||||
__u8 code;
|
||||
__be16 checksum;
|
||||
__sum16 checksum;
|
||||
union {
|
||||
struct {
|
||||
__be16 id;
|
||||
|
||||
@@ -7,17 +7,17 @@ struct icmp6hdr {
|
||||
|
||||
__u8 icmp6_type;
|
||||
__u8 icmp6_code;
|
||||
__u16 icmp6_cksum;
|
||||
__sum16 icmp6_cksum;
|
||||
|
||||
|
||||
union {
|
||||
__u32 un_data32[1];
|
||||
__u16 un_data16[2];
|
||||
__be32 un_data32[1];
|
||||
__be16 un_data16[2];
|
||||
__u8 un_data8[4];
|
||||
|
||||
struct icmpv6_echo {
|
||||
__u16 identifier;
|
||||
__u16 sequence;
|
||||
__be16 identifier;
|
||||
__be16 sequence;
|
||||
} u_echo;
|
||||
|
||||
struct icmpv6_nd_advt {
|
||||
@@ -53,7 +53,7 @@ struct icmp6hdr {
|
||||
#else
|
||||
#error "Please fix <asm/byteorder.h>"
|
||||
#endif
|
||||
__u16 rt_lifetime;
|
||||
__be16 rt_lifetime;
|
||||
} u_nd_ra;
|
||||
|
||||
} icmp6_dataun;
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
#ifndef __LINUX_IF_PACKET_H
|
||||
#define __LINUX_IF_PACKET_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct sockaddr_pkt
|
||||
{
|
||||
unsigned short spkt_family;
|
||||
unsigned char spkt_device[14];
|
||||
unsigned short spkt_protocol;
|
||||
__be16 spkt_protocol;
|
||||
};
|
||||
|
||||
struct sockaddr_ll
|
||||
{
|
||||
unsigned short sll_family;
|
||||
unsigned short sll_protocol;
|
||||
__be16 sll_protocol;
|
||||
int sll_ifindex;
|
||||
unsigned short sll_hatype;
|
||||
unsigned char sll_pkttype;
|
||||
|
||||
@@ -19,10 +19,10 @@ struct ip_tunnel_parm
|
||||
{
|
||||
char name[IFNAMSIZ];
|
||||
int link;
|
||||
__u16 i_flags;
|
||||
__u16 o_flags;
|
||||
__u32 i_key;
|
||||
__u32 o_key;
|
||||
__be16 i_flags;
|
||||
__be16 o_flags;
|
||||
__be32 i_key;
|
||||
__be32 o_key;
|
||||
struct iphdr iph;
|
||||
};
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ struct igmphdr
|
||||
{
|
||||
__u8 type;
|
||||
__u8 code; /* For newer IGMP */
|
||||
__be16 csum;
|
||||
__sum16 csum;
|
||||
__be32 group;
|
||||
};
|
||||
|
||||
@@ -191,7 +191,7 @@ struct ip_mc_list
|
||||
#define IGMPV3_MASK(value, nb) ((nb)>=32 ? (value) : ((1<<(nb))-1) & (value))
|
||||
#define IGMPV3_EXP(thresh, nbmant, nbexp, value) \
|
||||
((value) < (thresh) ? (value) : \
|
||||
((IGMPV3_MASK(value, nbmant) | (1<<(nbmant+nbexp))) << \
|
||||
((IGMPV3_MASK(value, nbmant) | (1<<(nbmant))) << \
|
||||
(IGMPV3_MASK((value) >> (nbmant), nbexp) + (nbexp))))
|
||||
|
||||
#define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value)
|
||||
|
||||
@@ -45,6 +45,7 @@ enum {
|
||||
|
||||
IPPROTO_COMP = 108, /* Compression Header protocol */
|
||||
IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */
|
||||
IPPROTO_UDPLITE = 136, /* UDP-Lite (RFC 3828) */
|
||||
|
||||
IPPROTO_RAW = 255, /* Raw IP packets */
|
||||
IPPROTO_MAX
|
||||
|
||||
+13
-3
@@ -54,7 +54,7 @@ extern const struct in6_addr in6addr_loopback;
|
||||
struct sockaddr_in6 {
|
||||
unsigned short int sin6_family; /* AF_INET6 */
|
||||
__be16 sin6_port; /* Transport layer port # */
|
||||
__u32 sin6_flowinfo; /* IPv6 flow information */
|
||||
__be32 sin6_flowinfo; /* IPv6 flow information */
|
||||
struct in6_addr sin6_addr; /* IPv6 address */
|
||||
__u32 sin6_scope_id; /* scope id (new in RFC2553) */
|
||||
};
|
||||
@@ -72,7 +72,7 @@ struct ipv6_mreq {
|
||||
struct in6_flowlabel_req
|
||||
{
|
||||
struct in6_addr flr_dst;
|
||||
__u32 flr_label;
|
||||
__be32 flr_label;
|
||||
__u8 flr_action;
|
||||
__u8 flr_share;
|
||||
__u16 flr_flags;
|
||||
@@ -225,7 +225,7 @@ struct in6_flowlabel_req
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Netfilter
|
||||
* Netfilter (1)
|
||||
*
|
||||
* Following socket options are used in ip6_tables;
|
||||
* see include/linux/netfilter_ipv6/ip6_tables.h.
|
||||
@@ -240,4 +240,14 @@ struct in6_flowlabel_req
|
||||
#define IPV6_RECVTCLASS 66
|
||||
#define IPV6_TCLASS 67
|
||||
|
||||
/*
|
||||
* Netfilter (2)
|
||||
*
|
||||
* Following socket options are used in ip6_tables;
|
||||
* see include/linux/netfilter_ipv6/ip6_tables.h.
|
||||
*
|
||||
* IP6T_SO_GET_REVISION_MATCH 68
|
||||
* IP6T_SO_GET_REVISION_TARGET 69
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
extern __be32 in_aton(const char *str);
|
||||
extern int in4_pton(const char *src, int srclen, u8 *dst, char delim, const char **end);
|
||||
extern int in6_pton(const char *src, int srclen, u8 *dst, char delim, const char **end);
|
||||
extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
|
||||
extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
|
||||
#endif
|
||||
#endif /* _LINUX_INET_H */
|
||||
|
||||
@@ -124,12 +124,13 @@ static __inline__ int inet_ifa_match(__be32 addr, struct in_ifaddr *ifa)
|
||||
* Check if a mask is acceptable.
|
||||
*/
|
||||
|
||||
static __inline__ int bad_mask(u32 mask, u32 addr)
|
||||
static __inline__ int bad_mask(__be32 mask, __be32 addr)
|
||||
{
|
||||
__u32 hmask;
|
||||
if (addr & (mask = ~mask))
|
||||
return 1;
|
||||
mask = ntohl(mask);
|
||||
if (mask & (mask+1))
|
||||
hmask = ntohl(mask);
|
||||
if (hmask & (hmask+1))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -190,11 +191,12 @@ static __inline__ __be32 inet_make_mask(int logmask)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static __inline__ int inet_mask_len(__u32 mask)
|
||||
static __inline__ int inet_mask_len(__be32 mask)
|
||||
{
|
||||
if (!(mask = ntohl(mask)))
|
||||
__u32 hmask = ntohl(mask);
|
||||
if (!hmask)
|
||||
return 0;
|
||||
return 32 - ffz(~mask);
|
||||
return 32 - ffz(~hmask);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+27
-9
@@ -84,19 +84,37 @@ extern void setup_arch(char **);
|
||||
* by link order.
|
||||
* For backwards compatibility, initcall() puts the call in
|
||||
* the device init subsection.
|
||||
*
|
||||
* The `id' arg to __define_initcall() is needed so that multiple initcalls
|
||||
* can point at the same handler without causing duplicate-symbol build errors.
|
||||
*/
|
||||
|
||||
#define __define_initcall(level,fn) \
|
||||
static initcall_t __initcall_##fn __attribute_used__ \
|
||||
#define __define_initcall(level,fn,id) \
|
||||
static initcall_t __initcall_##fn##id __attribute_used__ \
|
||||
__attribute__((__section__(".initcall" level ".init"))) = fn
|
||||
|
||||
#define core_initcall(fn) __define_initcall("1",fn)
|
||||
#define postcore_initcall(fn) __define_initcall("2",fn)
|
||||
#define arch_initcall(fn) __define_initcall("3",fn)
|
||||
#define subsys_initcall(fn) __define_initcall("4",fn)
|
||||
#define fs_initcall(fn) __define_initcall("5",fn)
|
||||
#define device_initcall(fn) __define_initcall("6",fn)
|
||||
#define late_initcall(fn) __define_initcall("7",fn)
|
||||
/*
|
||||
* A "pure" initcall has no dependencies on anything else, and purely
|
||||
* initializes variables that couldn't be statically initialized.
|
||||
*
|
||||
* This only exists for built-in code, not for modules.
|
||||
*/
|
||||
#define pure_initcall(fn) __define_initcall("0",fn,1)
|
||||
|
||||
#define core_initcall(fn) __define_initcall("1",fn,1)
|
||||
#define core_initcall_sync(fn) __define_initcall("1s",fn,1s)
|
||||
#define postcore_initcall(fn) __define_initcall("2",fn,2)
|
||||
#define postcore_initcall_sync(fn) __define_initcall("2s",fn,2s)
|
||||
#define arch_initcall(fn) __define_initcall("3",fn,3)
|
||||
#define arch_initcall_sync(fn) __define_initcall("3s",fn,3s)
|
||||
#define subsys_initcall(fn) __define_initcall("4",fn,4)
|
||||
#define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s)
|
||||
#define fs_initcall(fn) __define_initcall("5",fn,5)
|
||||
#define fs_initcall_sync(fn) __define_initcall("5s",fn,5s)
|
||||
#define device_initcall(fn) __define_initcall("6",fn,6)
|
||||
#define device_initcall_sync(fn) __define_initcall("6s",fn,6s)
|
||||
#define late_initcall(fn) __define_initcall("7",fn,7)
|
||||
#define late_initcall_sync(fn) __define_initcall("7s",fn,7s)
|
||||
|
||||
#define __initcall(fn) device_initcall(fn)
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ struct resource_list {
|
||||
#define IORESOURCE_ROM_ENABLE (1<<0) /* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */
|
||||
#define IORESOURCE_ROM_SHADOW (1<<1) /* ROM is copy at C000:0 */
|
||||
#define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */
|
||||
#define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */
|
||||
|
||||
/* PC/ISA/whatever - the normal PC address spaces: IO and memory */
|
||||
extern struct resource ioport_resource;
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ struct iphdr {
|
||||
__be16 frag_off;
|
||||
__u8 ttl;
|
||||
__u8 protocol;
|
||||
__be16 check;
|
||||
__sum16 check;
|
||||
__be32 saddr;
|
||||
__be32 daddr;
|
||||
/*The options start here. */
|
||||
|
||||
@@ -25,7 +25,7 @@ struct ip6_tnl_parm {
|
||||
__u8 proto; /* tunnel protocol */
|
||||
__u8 encap_limit; /* encapsulation limit for tunnel */
|
||||
__u8 hop_limit; /* hop limit for tunnel */
|
||||
__u32 flowinfo; /* traffic class and flowlabel for tunnel */
|
||||
__be32 flowinfo; /* traffic class and flowlabel for tunnel */
|
||||
__u32 flags; /* tunnel flags */
|
||||
struct in6_addr laddr; /* local tunnel end-point address */
|
||||
struct in6_addr raddr; /* remote tunnel end-point address */
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
#define IPMI_INVALID_COMMAND_ERR 0xc1
|
||||
#define IPMI_ERR_MSG_TRUNCATED 0xc6
|
||||
#define IPMI_LOST_ARBITRATION_ERR 0x81
|
||||
#define IPMI_BUS_ERR 0x82
|
||||
#define IPMI_NAK_ON_WRITE_ERR 0x83
|
||||
#define IPMI_ERR_UNSPECIFIED 0xff
|
||||
|
||||
#define IPMI_CHANNEL_PROTOCOL_IPMB 1
|
||||
|
||||
@@ -274,7 +274,7 @@ struct ipv6_pinfo {
|
||||
struct in6_addr *saddr_cache;
|
||||
#endif
|
||||
|
||||
__u32 flow_label;
|
||||
__be32 flow_label;
|
||||
__u32 frag_size;
|
||||
__s16 hop_limit;
|
||||
__s16 mcast_hops;
|
||||
|
||||
+7
-7
@@ -7,8 +7,8 @@
|
||||
|
||||
struct sockaddr_ipx {
|
||||
sa_family_t sipx_family;
|
||||
__u16 sipx_port;
|
||||
__u32 sipx_network;
|
||||
__be16 sipx_port;
|
||||
__be32 sipx_network;
|
||||
unsigned char sipx_node[IPX_NODE_LEN];
|
||||
__u8 sipx_type;
|
||||
unsigned char sipx_zero; /* 16 byte fill */
|
||||
@@ -23,13 +23,13 @@ struct sockaddr_ipx {
|
||||
#define IPX_CRTITF 1
|
||||
|
||||
struct ipx_route_definition {
|
||||
__u32 ipx_network;
|
||||
__u32 ipx_router_network;
|
||||
__be32 ipx_network;
|
||||
__be32 ipx_router_network;
|
||||
unsigned char ipx_router_node[IPX_NODE_LEN];
|
||||
};
|
||||
|
||||
struct ipx_interface_definition {
|
||||
__u32 ipx_network;
|
||||
__be32 ipx_network;
|
||||
unsigned char ipx_device[16];
|
||||
unsigned char ipx_dlink_type;
|
||||
#define IPX_FRAME_NONE 0
|
||||
@@ -55,8 +55,8 @@ struct ipx_config_data {
|
||||
*/
|
||||
|
||||
struct ipx_route_def {
|
||||
__u32 ipx_network;
|
||||
__u32 ipx_router_network;
|
||||
__be32 ipx_network;
|
||||
__be32 ipx_router_network;
|
||||
#define IPX_ROUTE_NO_ROUTER 0
|
||||
unsigned char ipx_router_node[IPX_NODE_LEN];
|
||||
unsigned char ipx_device[16];
|
||||
|
||||
+11
-10
@@ -141,6 +141,7 @@ struct irq_chip {
|
||||
* @pending_mask: pending rebalanced interrupts
|
||||
* @dir: /proc/irq/ procfs entry
|
||||
* @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP
|
||||
* @name: flow handler name for /proc/interrupts output
|
||||
*
|
||||
* Pad this out to 32 bytes for cache and indexing reasons.
|
||||
*/
|
||||
@@ -165,8 +166,9 @@ struct irq_desc {
|
||||
cpumask_t pending_mask;
|
||||
#endif
|
||||
#ifdef CONFIG_PROC_FS
|
||||
struct proc_dir_entry *dir;
|
||||
struct proc_dir_entry *dir;
|
||||
#endif
|
||||
const char *name;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
extern struct irq_desc irq_desc[NR_IRQS];
|
||||
@@ -271,12 +273,6 @@ extern void fastcall handle_simple_irq(unsigned int irq, struct irq_desc *desc);
|
||||
extern void fastcall handle_percpu_irq(unsigned int irq, struct irq_desc *desc);
|
||||
extern void fastcall handle_bad_irq(unsigned int irq, struct irq_desc *desc);
|
||||
|
||||
/*
|
||||
* Get a descriptive string for the highlevel handler, for
|
||||
* /proc/interrupts output:
|
||||
*/
|
||||
extern const char *handle_irq_name(irq_flow_handler_t handle);
|
||||
|
||||
/*
|
||||
* Monolithic do_IRQ implementation.
|
||||
* (is an explicit fastcall, because i386 4KSTACKS calls it from assembly)
|
||||
@@ -329,7 +325,12 @@ extern void
|
||||
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
|
||||
irq_flow_handler_t handle);
|
||||
extern void
|
||||
__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained);
|
||||
set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
|
||||
irq_flow_handler_t handle, const char *name);
|
||||
|
||||
extern void
|
||||
__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
|
||||
const char *name);
|
||||
|
||||
/*
|
||||
* Set a highlevel flow handler for a given IRQ:
|
||||
@@ -337,7 +338,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained);
|
||||
static inline void
|
||||
set_irq_handler(unsigned int irq, irq_flow_handler_t handle)
|
||||
{
|
||||
__set_irq_handler(irq, handle, 0);
|
||||
__set_irq_handler(irq, handle, 0, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -349,7 +350,7 @@ static inline void
|
||||
set_irq_chained_handler(unsigned int irq,
|
||||
irq_flow_handler_t handle)
|
||||
{
|
||||
__set_irq_handler(irq, handle, 1);
|
||||
__set_irq_handler(irq, handle, 1, NULL);
|
||||
}
|
||||
|
||||
/* Handle dynamic irq creation and destruction */
|
||||
|
||||
@@ -315,7 +315,7 @@ typedef struct {
|
||||
* structures. If the freq0 variable is non-zero, the tone table contents
|
||||
* for the tone_index are updated to the frequencies and gains defined. It
|
||||
* should be noted that DTMF tones cannot be reassigned, so if DTMF tone
|
||||
* table indexs are used in a cadence the frequency and gain variables will
|
||||
* table indexes are used in a cadence the frequency and gain variables will
|
||||
* be ignored.
|
||||
*
|
||||
* If the array elements contain frequency parameters the driver will
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
#define __jiffy_data __attribute__((section(".data")))
|
||||
|
||||
/*
|
||||
* The 64-bit value is not volatile - you MUST NOT read it
|
||||
* The 64-bit value is not atomic - you MUST NOT read it
|
||||
* without sampling the sequence number in xtime_lock.
|
||||
* get_jiffies_64() will do this for you as appropriate.
|
||||
*/
|
||||
|
||||
@@ -30,8 +30,10 @@ extern const char linux_banner[];
|
||||
|
||||
#define STACK_MAGIC 0xdeadbeef
|
||||
|
||||
#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
|
||||
#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
#define ALIGN(x,a) (((x)+(a)-1UL)&~((a)-1UL))
|
||||
#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
|
||||
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
|
||||
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
|
||||
@@ -63,7 +65,7 @@ struct user;
|
||||
* context (spinlock, irq-handler, ...).
|
||||
*
|
||||
* This is a useful debugging help to be able to catch problems early and not
|
||||
* be biten later when the calling function happens to sleep when it is not
|
||||
* be bitten later when the calling function happens to sleep when it is not
|
||||
* supposed to.
|
||||
*/
|
||||
#ifdef CONFIG_PREEMPT_VOLUNTARY
|
||||
@@ -171,6 +173,8 @@ __attribute_const__ roundup_pow_of_two(unsigned long x)
|
||||
|
||||
extern int printk_ratelimit(void);
|
||||
extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
|
||||
extern bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
||||
unsigned int interval_msec);
|
||||
|
||||
static inline void console_silent(void)
|
||||
{
|
||||
|
||||
@@ -122,6 +122,8 @@ extern struct kimage *kexec_crash_image;
|
||||
#define KEXEC_ARCH_IA_64 (50 << 16)
|
||||
#define KEXEC_ARCH_S390 (22 << 16)
|
||||
#define KEXEC_ARCH_SH (42 << 16)
|
||||
#define KEXEC_ARCH_MIPS_LE (10 << 16)
|
||||
#define KEXEC_ARCH_MIPS ( 8 << 16)
|
||||
|
||||
#define KEXEC_FLAGS (KEXEC_ON_CRASH) /* List of defined/legal kexec flags */
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ enum kobject_action {
|
||||
KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */
|
||||
KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */
|
||||
KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */
|
||||
KOBJ_MOVE = (__force kobject_action_t) 0x08, /* device move */
|
||||
};
|
||||
|
||||
struct kobject {
|
||||
@@ -76,6 +77,7 @@ extern int __must_check kobject_add(struct kobject *);
|
||||
extern void kobject_del(struct kobject *);
|
||||
|
||||
extern int __must_check kobject_rename(struct kobject *, const char *new_name);
|
||||
extern int __must_check kobject_move(struct kobject *, struct kobject *);
|
||||
|
||||
extern int __must_check kobject_register(struct kobject *);
|
||||
extern void kobject_unregister(struct kobject *);
|
||||
@@ -264,6 +266,8 @@ extern int __must_check subsys_create_file(struct subsystem * ,
|
||||
|
||||
#if defined(CONFIG_HOTPLUG)
|
||||
void kobject_uevent(struct kobject *kobj, enum kobject_action action);
|
||||
void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
|
||||
char *envp[]);
|
||||
|
||||
int add_uevent_var(char **envp, int num_envp, int *cur_index,
|
||||
char *buffer, int buffer_size, int *cur_len,
|
||||
@@ -271,6 +275,10 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index,
|
||||
__attribute__((format (printf, 7, 8)));
|
||||
#else
|
||||
static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
|
||||
static inline void kobject_uevent_env(struct kobject *kobj,
|
||||
enum kobject_action action,
|
||||
char *envp[])
|
||||
{ }
|
||||
|
||||
static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
|
||||
char *buffer, int buffer_size, int *cur_len,
|
||||
|
||||
@@ -143,7 +143,7 @@ enum {
|
||||
ATA_DFLAG_CFG_MASK = (1 << 8) - 1,
|
||||
|
||||
ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */
|
||||
ATA_DFLAG_NCQ_OFF = (1 << 9), /* devied limited to non-NCQ mode */
|
||||
ATA_DFLAG_NCQ_OFF = (1 << 9), /* device limited to non-NCQ mode */
|
||||
ATA_DFLAG_SUSPENDED = (1 << 10), /* device suspended */
|
||||
ATA_DFLAG_INIT_MASK = (1 << 16) - 1,
|
||||
|
||||
@@ -702,7 +702,6 @@ extern int ata_std_prereset(struct ata_port *ap);
|
||||
extern int ata_std_softreset(struct ata_port *ap, unsigned int *classes);
|
||||
extern int sata_std_hardreset(struct ata_port *ap, unsigned int *class);
|
||||
extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes);
|
||||
extern int ata_dev_revalidate(struct ata_device *dev, int post_reset);
|
||||
extern void ata_port_disable(struct ata_port *);
|
||||
extern void ata_std_ports(struct ata_ioports *ioaddr);
|
||||
#ifdef CONFIG_PCI
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
#define LINUX_LOCKD_BIND_H
|
||||
|
||||
#include <linux/lockd/nlm.h>
|
||||
/* need xdr-encoded error codes too, so... */
|
||||
#include <linux/lockd/xdr.h>
|
||||
#ifdef CONFIG_LOCKD_V4
|
||||
#include <linux/lockd/xdr4.h>
|
||||
#endif
|
||||
|
||||
/* Dummy declarations */
|
||||
struct svc_rqst;
|
||||
|
||||
@@ -154,7 +154,7 @@ int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *);
|
||||
struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl);
|
||||
void nlmclnt_finish_block(struct nlm_wait *block);
|
||||
int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout);
|
||||
u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *);
|
||||
__be32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *);
|
||||
void nlmclnt_recovery(struct nlm_host *);
|
||||
int nlmclnt_reclaim(struct nlm_host *, struct file_lock *);
|
||||
void nlmclnt_next_cookie(struct nlm_cookie *);
|
||||
@@ -184,12 +184,12 @@ typedef int (*nlm_host_match_fn_t)(struct nlm_host *cur, struct nlm_host *ref)
|
||||
/*
|
||||
* Server-side lock handling
|
||||
*/
|
||||
u32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *,
|
||||
__be32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *,
|
||||
struct nlm_lock *, int, struct nlm_cookie *);
|
||||
u32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *);
|
||||
u32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *,
|
||||
__be32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *);
|
||||
__be32 nlmsvc_testlock(struct nlm_file *, struct nlm_lock *,
|
||||
struct nlm_lock *);
|
||||
u32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *);
|
||||
__be32 nlmsvc_cancel_blocked(struct nlm_file *, struct nlm_lock *);
|
||||
unsigned long nlmsvc_retry_blocked(void);
|
||||
void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,
|
||||
nlm_host_match_fn_t match);
|
||||
@@ -198,7 +198,7 @@ void nlmsvc_grant_reply(struct nlm_cookie *, u32);
|
||||
/*
|
||||
* File handling for the server personality
|
||||
*/
|
||||
u32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **,
|
||||
__be32 nlm_lookup_file(struct svc_rqst *, struct nlm_file **,
|
||||
struct nfs_fh *);
|
||||
void nlm_release_file(struct nlm_file *);
|
||||
void nlmsvc_mark_resources(void);
|
||||
|
||||
@@ -21,9 +21,9 @@ struct nlm_share {
|
||||
u32 s_mode; /* deny mode */
|
||||
};
|
||||
|
||||
u32 nlmsvc_share_file(struct nlm_host *, struct nlm_file *,
|
||||
__be32 nlmsvc_share_file(struct nlm_host *, struct nlm_file *,
|
||||
struct nlm_args *);
|
||||
u32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *,
|
||||
__be32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *,
|
||||
struct nlm_args *);
|
||||
void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *,
|
||||
nlm_host_match_fn_t);
|
||||
|
||||
+17
-13
@@ -13,6 +13,8 @@
|
||||
#include <linux/nfs.h>
|
||||
#include <linux/sunrpc/xdr.h>
|
||||
|
||||
struct svc_rqst;
|
||||
|
||||
#define NLM_MAXCOOKIELEN 32
|
||||
#define NLM_MAXSTRLEN 1024
|
||||
|
||||
@@ -22,6 +24,8 @@
|
||||
#define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED)
|
||||
#define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD)
|
||||
|
||||
#define nlm_drop_reply __constant_htonl(30000)
|
||||
|
||||
/* Lock info passed via NLM */
|
||||
struct nlm_lock {
|
||||
char * caller;
|
||||
@@ -86,19 +90,19 @@ struct nlm_reboot {
|
||||
*/
|
||||
#define NLMSVC_XDRSIZE sizeof(struct nlm_args)
|
||||
|
||||
int nlmsvc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlmsvc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *);
|
||||
int nlmsvc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlmsvc_decode_cancargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlmsvc_decode_unlockargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlmsvc_encode_res(struct svc_rqst *, u32 *, struct nlm_res *);
|
||||
int nlmsvc_decode_res(struct svc_rqst *, u32 *, struct nlm_res *);
|
||||
int nlmsvc_encode_void(struct svc_rqst *, u32 *, void *);
|
||||
int nlmsvc_decode_void(struct svc_rqst *, u32 *, void *);
|
||||
int nlmsvc_decode_shareargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlmsvc_encode_shareres(struct svc_rqst *, u32 *, struct nlm_res *);
|
||||
int nlmsvc_decode_notify(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlmsvc_decode_reboot(struct svc_rqst *, u32 *, struct nlm_reboot *);
|
||||
int nlmsvc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlmsvc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *);
|
||||
int nlmsvc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlmsvc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlmsvc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlmsvc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
|
||||
int nlmsvc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
|
||||
int nlmsvc_encode_void(struct svc_rqst *, __be32 *, void *);
|
||||
int nlmsvc_decode_void(struct svc_rqst *, __be32 *, void *);
|
||||
int nlmsvc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlmsvc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *);
|
||||
int nlmsvc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlmsvc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *);
|
||||
/*
|
||||
int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
|
||||
|
||||
+13
-13
@@ -23,19 +23,19 @@
|
||||
|
||||
|
||||
|
||||
int nlm4svc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlm4svc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *);
|
||||
int nlm4svc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlm4svc_decode_cancargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlm4svc_decode_unlockargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlm4svc_encode_res(struct svc_rqst *, u32 *, struct nlm_res *);
|
||||
int nlm4svc_decode_res(struct svc_rqst *, u32 *, struct nlm_res *);
|
||||
int nlm4svc_encode_void(struct svc_rqst *, u32 *, void *);
|
||||
int nlm4svc_decode_void(struct svc_rqst *, u32 *, void *);
|
||||
int nlm4svc_decode_shareargs(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlm4svc_encode_shareres(struct svc_rqst *, u32 *, struct nlm_res *);
|
||||
int nlm4svc_decode_notify(struct svc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlm4svc_decode_reboot(struct svc_rqst *, u32 *, struct nlm_reboot *);
|
||||
int nlm4svc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlm4svc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *);
|
||||
int nlm4svc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlm4svc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlm4svc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlm4svc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
|
||||
int nlm4svc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
|
||||
int nlm4svc_encode_void(struct svc_rqst *, __be32 *, void *);
|
||||
int nlm4svc_decode_void(struct svc_rqst *, __be32 *, void *);
|
||||
int nlm4svc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlm4svc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *);
|
||||
int nlm4svc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *);
|
||||
int nlm4svc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *);
|
||||
/*
|
||||
int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
|
||||
int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
|
||||
|
||||
+13
-4
@@ -202,7 +202,7 @@ extern int lockdep_internal(void);
|
||||
*/
|
||||
|
||||
extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
|
||||
struct lock_class_key *key);
|
||||
struct lock_class_key *key, int subclass);
|
||||
|
||||
/*
|
||||
* Reinitialize a lock key - for cases where there is special locking or
|
||||
@@ -211,9 +211,14 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
|
||||
* or they are too narrow (they suffer from a false class-split):
|
||||
*/
|
||||
#define lockdep_set_class(lock, key) \
|
||||
lockdep_init_map(&(lock)->dep_map, #key, key)
|
||||
lockdep_init_map(&(lock)->dep_map, #key, key, 0)
|
||||
#define lockdep_set_class_and_name(lock, key, name) \
|
||||
lockdep_init_map(&(lock)->dep_map, name, key)
|
||||
lockdep_init_map(&(lock)->dep_map, name, key, 0)
|
||||
#define lockdep_set_class_and_subclass(lock, key, sub) \
|
||||
lockdep_init_map(&(lock)->dep_map, #key, key, sub)
|
||||
#define lockdep_set_subclass(lock, sub) \
|
||||
lockdep_init_map(&(lock)->dep_map, #lock, \
|
||||
(lock)->dep_map.key, sub)
|
||||
|
||||
/*
|
||||
* Acquire a lock.
|
||||
@@ -257,10 +262,14 @@ static inline int lockdep_internal(void)
|
||||
# define lock_release(l, n, i) do { } while (0)
|
||||
# define lockdep_init() do { } while (0)
|
||||
# define lockdep_info() do { } while (0)
|
||||
# define lockdep_init_map(lock, name, key) do { (void)(key); } while (0)
|
||||
# define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0)
|
||||
# define lockdep_set_class(lock, key) do { (void)(key); } while (0)
|
||||
# define lockdep_set_class_and_name(lock, key, name) \
|
||||
do { (void)(key); } while (0)
|
||||
#define lockdep_set_class_and_subclass(lock, key, sub) \
|
||||
do { (void)(key); } while (0)
|
||||
#define lockdep_set_subclass(lock, sub) do { } while (0)
|
||||
|
||||
# define INIT_LOCKDEP
|
||||
# define lockdep_reset() do { debug_locks = 1; } while (0)
|
||||
# define lockdep_free_key_range(start, size) do { } while (0)
|
||||
|
||||
@@ -150,7 +150,7 @@ extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new);
|
||||
extern void mpol_fix_fork_child_flag(struct task_struct *p);
|
||||
#define set_cpuset_being_rebound(x) (cpuset_being_rebound = (x))
|
||||
|
||||
#ifdef CONFIG_CPUSET
|
||||
#ifdef CONFIG_CPUSETS
|
||||
#define current_cpuset_is_being_rebound() \
|
||||
(cpuset_being_rebound == current->cpuset)
|
||||
#else
|
||||
|
||||
@@ -31,15 +31,14 @@
|
||||
#define HPET_MINOR 228
|
||||
|
||||
struct device;
|
||||
struct class_device;
|
||||
|
||||
struct miscdevice {
|
||||
int minor;
|
||||
const char *name;
|
||||
const struct file_operations *fops;
|
||||
struct list_head list;
|
||||
struct device *dev;
|
||||
struct class_device *class;
|
||||
struct device *parent;
|
||||
struct device *this_device;
|
||||
};
|
||||
|
||||
extern int misc_register(struct miscdevice * misc);
|
||||
|
||||
@@ -1115,9 +1115,6 @@ int in_gate_area_no_task(unsigned long addr);
|
||||
#define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);})
|
||||
#endif /* __HAVE_ARCH_GATE_AREA */
|
||||
|
||||
/* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */
|
||||
#define OOM_DISABLE -17
|
||||
|
||||
int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
|
||||
void __user *, size_t *, loff_t *);
|
||||
unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
|
||||
|
||||
@@ -39,6 +39,10 @@ struct mmc_csd {
|
||||
write_misalign:1;
|
||||
};
|
||||
|
||||
struct mmc_ext_csd {
|
||||
unsigned int hs_max_dtr;
|
||||
};
|
||||
|
||||
struct sd_scr {
|
||||
unsigned char sda_vsn;
|
||||
unsigned char bus_widths;
|
||||
@@ -46,6 +50,10 @@ struct sd_scr {
|
||||
#define SD_SCR_BUS_WIDTH_4 (1<<2)
|
||||
};
|
||||
|
||||
struct sd_switch_caps {
|
||||
unsigned int hs_max_dtr;
|
||||
};
|
||||
|
||||
struct mmc_host;
|
||||
|
||||
/*
|
||||
@@ -62,12 +70,15 @@ struct mmc_card {
|
||||
#define MMC_STATE_BAD (1<<2) /* unrecognised device */
|
||||
#define MMC_STATE_SDCARD (1<<3) /* is an SD card */
|
||||
#define MMC_STATE_READONLY (1<<4) /* card is read-only */
|
||||
#define MMC_STATE_HIGHSPEED (1<<5) /* card is in high speed mode */
|
||||
u32 raw_cid[4]; /* raw card CID */
|
||||
u32 raw_csd[4]; /* raw card CSD */
|
||||
u32 raw_scr[2]; /* raw card SCR */
|
||||
struct mmc_cid cid; /* card identification */
|
||||
struct mmc_csd csd; /* card specific */
|
||||
struct mmc_ext_csd ext_csd; /* mmc v4 extended card specific */
|
||||
struct sd_scr scr; /* extra SD information */
|
||||
struct sd_switch_caps sw_caps; /* switch (CMD6) caps */
|
||||
};
|
||||
|
||||
#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT)
|
||||
@@ -75,12 +86,14 @@ struct mmc_card {
|
||||
#define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD)
|
||||
#define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD)
|
||||
#define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY)
|
||||
#define mmc_card_highspeed(c) ((c)->state & MMC_STATE_HIGHSPEED)
|
||||
|
||||
#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
|
||||
#define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD)
|
||||
#define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD)
|
||||
#define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD)
|
||||
#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
|
||||
#define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED)
|
||||
|
||||
#define mmc_card_name(c) ((c)->cid.prod_name)
|
||||
#define mmc_card_id(c) ((c)->dev.bus_id)
|
||||
|
||||
@@ -74,8 +74,8 @@ struct mmc_card;
|
||||
struct device;
|
||||
|
||||
struct mmc_host {
|
||||
struct device *dev;
|
||||
struct class_device class_dev;
|
||||
struct device *parent;
|
||||
struct device class_dev;
|
||||
int index;
|
||||
const struct mmc_host_ops *ops;
|
||||
unsigned int f_min;
|
||||
@@ -125,8 +125,8 @@ static inline void *mmc_priv(struct mmc_host *host)
|
||||
return (void *)host->private;
|
||||
}
|
||||
|
||||
#define mmc_dev(x) ((x)->dev)
|
||||
#define mmc_hostname(x) ((x)->class_dev.class_id)
|
||||
#define mmc_dev(x) ((x)->parent)
|
||||
#define mmc_hostname(x) ((x)->class_dev.bus_id)
|
||||
|
||||
extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
|
||||
extern int mmc_resume_host(struct mmc_host *);
|
||||
|
||||
@@ -25,14 +25,16 @@
|
||||
#ifndef MMC_MMC_PROTOCOL_H
|
||||
#define MMC_MMC_PROTOCOL_H
|
||||
|
||||
/* Standard MMC commands (3.1) type argument response */
|
||||
/* Standard MMC commands (4.1) type argument response */
|
||||
/* class 1 */
|
||||
#define MMC_GO_IDLE_STATE 0 /* bc */
|
||||
#define MMC_SEND_OP_COND 1 /* bcr [31:0] OCR R3 */
|
||||
#define MMC_ALL_SEND_CID 2 /* bcr R2 */
|
||||
#define MMC_SET_RELATIVE_ADDR 3 /* ac [31:16] RCA R1 */
|
||||
#define MMC_SET_DSR 4 /* bc [31:16] RCA */
|
||||
#define MMC_SWITCH 6 /* ac [31:0] See below R1b */
|
||||
#define MMC_SELECT_CARD 7 /* ac [31:16] RCA R1 */
|
||||
#define MMC_SEND_EXT_CSD 8 /* adtc R1 */
|
||||
#define MMC_SEND_CSD 9 /* ac [31:16] RCA R2 */
|
||||
#define MMC_SEND_CID 10 /* ac [31:16] RCA R2 */
|
||||
#define MMC_READ_DAT_UNTIL_STOP 11 /* adtc [31:0] dadr R1 */
|
||||
@@ -80,6 +82,7 @@
|
||||
/* class 8 */
|
||||
/* This is basically the same command as for MMC with some quirks. */
|
||||
#define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */
|
||||
#define SD_SWITCH 6 /* adtc [31:0] See below R1 */
|
||||
|
||||
/* Application commands */
|
||||
#define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */
|
||||
@@ -87,6 +90,30 @@
|
||||
#define SD_APP_OP_COND 41 /* bcr [31:0] OCR R3 */
|
||||
#define SD_APP_SEND_SCR 51 /* adtc R1 */
|
||||
|
||||
/*
|
||||
* MMC_SWITCH argument format:
|
||||
*
|
||||
* [31:26] Always 0
|
||||
* [25:24] Access Mode
|
||||
* [23:16] Location of target Byte in EXT_CSD
|
||||
* [15:08] Value Byte
|
||||
* [07:03] Always 0
|
||||
* [02:00] Command Set
|
||||
*/
|
||||
|
||||
/*
|
||||
* SD_SWITCH argument format:
|
||||
*
|
||||
* [31] Check (0) or switch (1)
|
||||
* [30:24] Reserved (0)
|
||||
* [23:20] Function group 6
|
||||
* [19:16] Function group 5
|
||||
* [15:12] Function group 4
|
||||
* [11:8] Function group 3
|
||||
* [7:4] Function group 2
|
||||
* [3:0] Function group 1
|
||||
*/
|
||||
|
||||
/*
|
||||
MMC status in R1
|
||||
Type
|
||||
@@ -230,13 +257,54 @@ struct _mmc_csd {
|
||||
|
||||
#define CSD_STRUCT_VER_1_0 0 /* Valid for system specification 1.0 - 1.2 */
|
||||
#define CSD_STRUCT_VER_1_1 1 /* Valid for system specification 1.4 - 2.2 */
|
||||
#define CSD_STRUCT_VER_1_2 2 /* Valid for system specification 3.1 */
|
||||
#define CSD_STRUCT_VER_1_2 2 /* Valid for system specification 3.1 - 3.2 - 3.31 - 4.0 - 4.1 */
|
||||
#define CSD_STRUCT_EXT_CSD 3 /* Version is coded in CSD_STRUCTURE in EXT_CSD */
|
||||
|
||||
#define CSD_SPEC_VER_0 0 /* Implements system specification 1.0 - 1.2 */
|
||||
#define CSD_SPEC_VER_1 1 /* Implements system specification 1.4 */
|
||||
#define CSD_SPEC_VER_2 2 /* Implements system specification 2.0 - 2.2 */
|
||||
#define CSD_SPEC_VER_3 3 /* Implements system specification 3.1 */
|
||||
#define CSD_SPEC_VER_3 3 /* Implements system specification 3.1 - 3.2 - 3.31 */
|
||||
#define CSD_SPEC_VER_4 4 /* Implements system specification 4.0 - 4.1 */
|
||||
|
||||
/*
|
||||
* EXT_CSD fields
|
||||
*/
|
||||
|
||||
#define EXT_CSD_BUS_WIDTH 183 /* R/W */
|
||||
#define EXT_CSD_HS_TIMING 185 /* R/W */
|
||||
#define EXT_CSD_CARD_TYPE 196 /* RO */
|
||||
|
||||
/*
|
||||
* EXT_CSD field definitions
|
||||
*/
|
||||
|
||||
#define EXT_CSD_CMD_SET_NORMAL (1<<0)
|
||||
#define EXT_CSD_CMD_SET_SECURE (1<<1)
|
||||
#define EXT_CSD_CMD_SET_CPSECURE (1<<2)
|
||||
|
||||
#define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */
|
||||
#define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */
|
||||
|
||||
#define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */
|
||||
#define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */
|
||||
#define EXT_CSD_BUS_WIDTH_8 2 /* Card is in 8 bit mode */
|
||||
|
||||
/*
|
||||
* MMC_SWITCH access modes
|
||||
*/
|
||||
|
||||
#define MMC_SWITCH_MODE_CMD_SET 0x00 /* Change the command set */
|
||||
#define MMC_SWITCH_MODE_SET_BITS 0x01 /* Set bits which are 1 in value */
|
||||
#define MMC_SWITCH_MODE_CLEAR_BITS 0x02 /* Clear bits which are 1 in value */
|
||||
#define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */
|
||||
|
||||
/*
|
||||
* SCR field definitions
|
||||
*/
|
||||
|
||||
#define SCR_SPEC_VER_0 0 /* Implements system specification 1.0 - 1.01 */
|
||||
#define SCR_SPEC_VER_1 1 /* Implements system specification 1.10 */
|
||||
#define SCR_SPEC_VER_2 2 /* Implements system specification 2.00 */
|
||||
|
||||
/*
|
||||
* SD bus widths
|
||||
|
||||
@@ -218,13 +218,9 @@ struct zone {
|
||||
* under - it drives the swappiness decision: whether to unmap mapped
|
||||
* pages.
|
||||
*
|
||||
* temp_priority is used to remember the scanning priority at which
|
||||
* this zone was successfully refilled to free_pages == pages_high.
|
||||
*
|
||||
* Access to both these fields is quite racy even on uniprocessor. But
|
||||
* Access to both this field is quite racy even on uniprocessor. But
|
||||
* it is expected to average out OK.
|
||||
*/
|
||||
int temp_priority;
|
||||
int prev_priority;
|
||||
|
||||
|
||||
@@ -674,6 +670,12 @@ void sparse_init(void);
|
||||
#define sparse_index_init(_sec, _nid) do {} while (0)
|
||||
#endif /* CONFIG_SPARSEMEM */
|
||||
|
||||
#ifdef CONFIG_NODES_SPAN_OTHER_NODES
|
||||
#define early_pfn_in_nid(pfn, nid) (early_pfn_to_nid(pfn) == (nid))
|
||||
#else
|
||||
#define early_pfn_in_nid(pfn, nid) (1)
|
||||
#endif
|
||||
|
||||
#ifndef early_pfn_valid
|
||||
#define early_pfn_valid(pfn) (1)
|
||||
#endif
|
||||
|
||||
@@ -264,6 +264,7 @@ struct module
|
||||
struct module_attribute *modinfo_attrs;
|
||||
const char *version;
|
||||
const char *srcversion;
|
||||
struct kobject *drivers_dir;
|
||||
|
||||
/* Exported symbols */
|
||||
const struct kernel_symbol *syms;
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#ifndef _LINUX_MQUEUE_H
|
||||
#define _LINUX_MQUEUE_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define MQ_PRIO_MAX 32768
|
||||
/* per-uid limit of kernel memory used by mqueue, in bytes */
|
||||
#define MQ_BYTES_MAX 819200
|
||||
|
||||
@@ -402,6 +402,8 @@ extern const struct file_operations fat_file_operations;
|
||||
extern struct inode_operations fat_file_inode_operations;
|
||||
extern int fat_notify_change(struct dentry * dentry, struct iattr * attr);
|
||||
extern void fat_truncate(struct inode *inode);
|
||||
extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
||||
struct kstat *stat);
|
||||
|
||||
/* fat/inode.c */
|
||||
extern void fat_attach(struct inode *inode, loff_t i_pos);
|
||||
|
||||
@@ -355,7 +355,7 @@ struct nand_buffers {
|
||||
* @priv: [OPTIONAL] pointer to private chip date
|
||||
* @errstat: [OPTIONAL] hardware specific function to perform additional error status checks
|
||||
* (determine if errors are correctable)
|
||||
* @write_page [REPLACEABLE] High-level page write function
|
||||
* @write_page: [REPLACEABLE] High-level page write function
|
||||
*/
|
||||
|
||||
struct nand_chip {
|
||||
|
||||
@@ -724,7 +724,7 @@
|
||||
#define MV643XX_ETH_RX_FIFO_URGENT_THRESHOLD_REG(port) (0x2470 + (port<<10))
|
||||
#define MV643XX_ETH_TX_FIFO_URGENT_THRESHOLD_REG(port) (0x2474 + (port<<10))
|
||||
#define MV643XX_ETH_RX_MINIMAL_FRAME_SIZE_REG(port) (0x247c + (port<<10))
|
||||
#define MV643XX_ETH_RX_DISCARDED_FRAMES_COUNTER(port) (0x2484 + (port<<10)
|
||||
#define MV643XX_ETH_RX_DISCARDED_FRAMES_COUNTER(port) (0x2484 + (port<<10))
|
||||
#define MV643XX_ETH_PORT_DEBUG_0_REG(port) (0x248c + (port<<10))
|
||||
#define MV643XX_ETH_PORT_DEBUG_1_REG(port) (0x2490 + (port<<10))
|
||||
#define MV643XX_ETH_PORT_INTERNAL_ADDR_ERROR_REG(port) (0x2494 + (port<<10))
|
||||
@@ -1135,7 +1135,7 @@ struct mv64xxx_i2c_pdata {
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_1 (1<<19)
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_2 (1<<20)
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_3 ((1<<20) | (1<<19))
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_4 ((1<<21)
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_4 (1<<21)
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_5 ((1<<21) | (1<<19))
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_6 ((1<<21) | (1<<20))
|
||||
#define MV643XX_ETH_DEFAULT_RX_UDP_QUEUE_7 ((1<<21) | (1<<20) | (1<<19))
|
||||
|
||||
+4
-3
@@ -19,6 +19,7 @@
|
||||
#define _LINUX_NET_H
|
||||
|
||||
#include <linux/wait.h>
|
||||
#include <linux/random.h>
|
||||
#include <asm/socket.h>
|
||||
|
||||
struct poll_table_struct;
|
||||
@@ -193,9 +194,9 @@ extern int sock_map_fd(struct socket *sock);
|
||||
extern struct socket *sockfd_lookup(int fd, int *err);
|
||||
#define sockfd_put(sock) fput(sock->file)
|
||||
extern int net_ratelimit(void);
|
||||
extern unsigned long net_random(void);
|
||||
extern void net_srandom(unsigned long);
|
||||
extern void net_random_init(void);
|
||||
|
||||
#define net_random() random32()
|
||||
#define net_srandom(seed) srandom32((__force u32)seed)
|
||||
|
||||
extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg,
|
||||
struct kvec *vec, size_t num, size_t len);
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/dmaengine.h>
|
||||
|
||||
struct divert_blk;
|
||||
struct vlan_group;
|
||||
struct ethtool_ops;
|
||||
struct netpoll_info;
|
||||
@@ -67,6 +66,10 @@ struct netpoll_info;
|
||||
#define NET_RX_CN_HIGH 4 /* The storm is here */
|
||||
#define NET_RX_BAD 5 /* packet dropped due to kernel error */
|
||||
|
||||
/* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It
|
||||
* indicates that the device will soon be dropping packets, or already drops
|
||||
* some packets of the same priority; prompting us to send less aggressively. */
|
||||
#define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e))
|
||||
#define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0)
|
||||
|
||||
#endif
|
||||
@@ -93,8 +96,10 @@ struct netpoll_info;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NET_IPIP) && \
|
||||
!defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE)
|
||||
#if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \
|
||||
!defined(CONFIG_NET_IPGRE) && !defined(CONFIG_NET_IPGRE_MODULE) && \
|
||||
!defined(CONFIG_IPV6_SIT) && !defined(CONFIG_IPV6_SIT_MODULE) && \
|
||||
!defined(CONFIG_IPV6_TUNNEL) && !defined(CONFIG_IPV6_TUNNEL_MODULE)
|
||||
#define MAX_HEADER LL_MAX_HEADER
|
||||
#else
|
||||
#define MAX_HEADER (LL_MAX_HEADER + 48)
|
||||
@@ -191,7 +196,7 @@ struct hh_cache
|
||||
* NOTE: For VLANs, this will be the
|
||||
* encapuslated type. --BLG
|
||||
*/
|
||||
int hh_len; /* length of header */
|
||||
u16 hh_len; /* length of header */
|
||||
int (*hh_output)(struct sk_buff *skb);
|
||||
rwlock_t hh_lock;
|
||||
|
||||
@@ -515,11 +520,6 @@ struct net_device
|
||||
/* bridge stuff */
|
||||
struct net_bridge_port *br_port;
|
||||
|
||||
#ifdef CONFIG_NET_DIVERT
|
||||
/* this will get initialized at each interface type init routine */
|
||||
struct divert_blk *divert;
|
||||
#endif /* CONFIG_NET_DIVERT */
|
||||
|
||||
/* class/net/name entry */
|
||||
struct class_device class_dev;
|
||||
/* space for optional statistics and wireless sysfs groups */
|
||||
|
||||
@@ -117,6 +117,16 @@ void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n);
|
||||
int nf_register_sockopt(struct nf_sockopt_ops *reg);
|
||||
void nf_unregister_sockopt(struct nf_sockopt_ops *reg);
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
/* Sysctl registration */
|
||||
struct ctl_table_header *nf_register_sysctl_table(struct ctl_table *path,
|
||||
struct ctl_table *table);
|
||||
void nf_unregister_sysctl_table(struct ctl_table_header *header,
|
||||
struct ctl_table *table);
|
||||
extern struct ctl_table nf_net_netfilter_sysctl_path[];
|
||||
extern struct ctl_table nf_net_ipv4_netfilter_sysctl_path[];
|
||||
#endif /* CONFIG_SYSCTL */
|
||||
|
||||
extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS];
|
||||
|
||||
/* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will
|
||||
@@ -282,15 +292,31 @@ extern void nf_invalidate_cache(int pf);
|
||||
Returns true or false. */
|
||||
extern int skb_make_writable(struct sk_buff **pskb, unsigned int writable_len);
|
||||
|
||||
extern u_int16_t nf_csum_update(u_int32_t oldval, u_int32_t newval,
|
||||
u_int32_t csum);
|
||||
extern u_int16_t nf_proto_csum_update(struct sk_buff *skb,
|
||||
u_int32_t oldval, u_int32_t newval,
|
||||
u_int16_t csum, int pseudohdr);
|
||||
static inline void nf_csum_replace4(__sum16 *sum, __be32 from, __be32 to)
|
||||
{
|
||||
__be32 diff[] = { ~from, to };
|
||||
|
||||
*sum = csum_fold(csum_partial((char *)diff, sizeof(diff), ~csum_unfold(*sum)));
|
||||
}
|
||||
|
||||
static inline void nf_csum_replace2(__sum16 *sum, __be16 from, __be16 to)
|
||||
{
|
||||
nf_csum_replace4(sum, (__force __be32)from, (__force __be32)to);
|
||||
}
|
||||
|
||||
extern void nf_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb,
|
||||
__be32 from, __be32 to, int pseudohdr);
|
||||
|
||||
static inline void nf_proto_csum_replace2(__sum16 *sum, struct sk_buff *skb,
|
||||
__be16 from, __be16 to, int pseudohdr)
|
||||
{
|
||||
nf_proto_csum_replace4(sum, skb, (__force __be32)from,
|
||||
(__force __be32)to, pseudohdr);
|
||||
}
|
||||
|
||||
struct nf_afinfo {
|
||||
unsigned short family;
|
||||
unsigned int (*checksum)(struct sk_buff *skb, unsigned int hook,
|
||||
__sum16 (*checksum)(struct sk_buff *skb, unsigned int hook,
|
||||
unsigned int dataoff, u_int8_t protocol);
|
||||
void (*saveroute)(const struct sk_buff *skb,
|
||||
struct nf_info *info);
|
||||
@@ -305,12 +331,12 @@ static inline struct nf_afinfo *nf_get_afinfo(unsigned short family)
|
||||
return rcu_dereference(nf_afinfo[family]);
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
static inline __sum16
|
||||
nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff,
|
||||
u_int8_t protocol, unsigned short family)
|
||||
{
|
||||
struct nf_afinfo *afinfo;
|
||||
unsigned int csum = 0;
|
||||
__sum16 csum = 0;
|
||||
|
||||
rcu_read_lock();
|
||||
afinfo = nf_get_afinfo(family);
|
||||
@@ -331,7 +357,7 @@ extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);
|
||||
static inline void
|
||||
nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family)
|
||||
{
|
||||
#ifdef CONFIG_IP_NF_NAT_NEEDED
|
||||
#if defined(CONFIG_IP_NF_NAT_NEEDED) || defined(CONFIG_NF_NAT_NEEDED)
|
||||
void (*decodefn)(struct sk_buff *, struct flowi *);
|
||||
|
||||
if (family == AF_INET && (decodefn = ip_nat_decode_session) != NULL)
|
||||
|
||||
@@ -14,6 +14,7 @@ header-y += xt_dscp.h
|
||||
header-y += xt_DSCP.h
|
||||
header-y += xt_esp.h
|
||||
header-y += xt_helper.h
|
||||
header-y += xt_hashlimit.h
|
||||
header-y += xt_length.h
|
||||
header-y += xt_limit.h
|
||||
header-y += xt_mac.h
|
||||
@@ -21,6 +22,7 @@ header-y += xt_mark.h
|
||||
header-y += xt_MARK.h
|
||||
header-y += xt_multiport.h
|
||||
header-y += xt_NFQUEUE.h
|
||||
header-y += xt_NFLOG.h
|
||||
header-y += xt_pkttype.h
|
||||
header-y += xt_policy.h
|
||||
header-y += xt_realm.h
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef _NF_CONNTRACK_AMANDA_H
|
||||
#define _NF_CONNTRACK_AMANDA_H
|
||||
/* AMANDA tracking. */
|
||||
|
||||
extern unsigned int (*nf_nat_amanda_hook)(struct sk_buff **pskb,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned int matchoff,
|
||||
unsigned int matchlen,
|
||||
struct nf_conntrack_expect *exp);
|
||||
#endif /* _NF_CONNTRACK_AMANDA_H */
|
||||
@@ -3,16 +3,16 @@
|
||||
/* FTP tracking. */
|
||||
|
||||
/* This enum is exposed to userspace */
|
||||
enum ip_ct_ftp_type
|
||||
enum nf_ct_ftp_type
|
||||
{
|
||||
/* PORT command from client */
|
||||
IP_CT_FTP_PORT,
|
||||
NF_CT_FTP_PORT,
|
||||
/* PASV response from server */
|
||||
IP_CT_FTP_PASV,
|
||||
NF_CT_FTP_PASV,
|
||||
/* EPRT command from client */
|
||||
IP_CT_FTP_EPRT,
|
||||
NF_CT_FTP_EPRT,
|
||||
/* EPSV response from server */
|
||||
IP_CT_FTP_EPSV,
|
||||
NF_CT_FTP_EPSV,
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
@@ -21,23 +21,23 @@ enum ip_ct_ftp_type
|
||||
|
||||
#define NUM_SEQ_TO_REMEMBER 2
|
||||
/* This structure exists only once per master */
|
||||
struct ip_ct_ftp_master {
|
||||
struct nf_ct_ftp_master {
|
||||
/* Valid seq positions for cmd matching after newline */
|
||||
u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER];
|
||||
/* 0 means seq_match_aft_nl not set */
|
||||
int seq_aft_nl_num[IP_CT_DIR_MAX];
|
||||
};
|
||||
|
||||
struct ip_conntrack_expect;
|
||||
struct nf_conntrack_expect;
|
||||
|
||||
/* For NAT to hook in when we find a packet which describes what other
|
||||
* connection we should expect. */
|
||||
extern unsigned int (*ip_nat_ftp_hook)(struct sk_buff **pskb,
|
||||
extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff **pskb,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
enum ip_ct_ftp_type type,
|
||||
enum nf_ct_ftp_type type,
|
||||
unsigned int matchoff,
|
||||
unsigned int matchlen,
|
||||
struct ip_conntrack_expect *exp,
|
||||
struct nf_conntrack_expect *exp,
|
||||
u32 *seq);
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
#ifndef _NF_CONNTRACK_H323_H
|
||||
#define _NF_CONNTRACK_H323_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/netfilter/nf_conntrack_h323_asn1.h>
|
||||
|
||||
#define RAS_PORT 1719
|
||||
#define Q931_PORT 1720
|
||||
#define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */
|
||||
|
||||
/* This structure exists only once per master */
|
||||
struct nf_ct_h323_master {
|
||||
|
||||
/* Original and NATed Q.931 or H.245 signal ports */
|
||||
__be16 sig_port[IP_CT_DIR_MAX];
|
||||
|
||||
/* Original and NATed RTP ports */
|
||||
__be16 rtp_port[H323_RTP_CHANNEL_MAX][IP_CT_DIR_MAX];
|
||||
|
||||
union {
|
||||
/* RAS connection timeout */
|
||||
u_int32_t timeout;
|
||||
|
||||
/* Next TPKT length (for separate TPKT header and data) */
|
||||
u_int16_t tpkt_len[IP_CT_DIR_MAX];
|
||||
};
|
||||
};
|
||||
|
||||
struct nf_conn;
|
||||
|
||||
extern int get_h225_addr(struct nf_conn *ct, unsigned char *data,
|
||||
TransportAddress *taddr,
|
||||
union nf_conntrack_address *addr, __be16 *port);
|
||||
extern void nf_conntrack_h245_expect(struct nf_conn *new,
|
||||
struct nf_conntrack_expect *this);
|
||||
extern void nf_conntrack_q931_expect(struct nf_conn *new,
|
||||
struct nf_conntrack_expect *this);
|
||||
extern int (*set_h245_addr_hook) (struct sk_buff **pskb,
|
||||
unsigned char **data, int dataoff,
|
||||
H245_TransportAddress *taddr,
|
||||
union nf_conntrack_address *addr,
|
||||
__be16 port);
|
||||
extern int (*set_h225_addr_hook) (struct sk_buff **pskb,
|
||||
unsigned char **data, int dataoff,
|
||||
TransportAddress *taddr,
|
||||
union nf_conntrack_address *addr,
|
||||
__be16 port);
|
||||
extern int (*set_sig_addr_hook) (struct sk_buff **pskb,
|
||||
struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned char **data,
|
||||
TransportAddress *taddr, int count);
|
||||
extern int (*set_ras_addr_hook) (struct sk_buff **pskb,
|
||||
struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned char **data,
|
||||
TransportAddress *taddr, int count);
|
||||
extern int (*nat_rtp_rtcp_hook) (struct sk_buff **pskb,
|
||||
struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned char **data, int dataoff,
|
||||
H245_TransportAddress *taddr,
|
||||
__be16 port, __be16 rtp_port,
|
||||
struct nf_conntrack_expect *rtp_exp,
|
||||
struct nf_conntrack_expect *rtcp_exp);
|
||||
extern int (*nat_t120_hook) (struct sk_buff **pskb, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned char **data, int dataoff,
|
||||
H245_TransportAddress *taddr, __be16 port,
|
||||
struct nf_conntrack_expect *exp);
|
||||
extern int (*nat_h245_hook) (struct sk_buff **pskb, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned char **data, int dataoff,
|
||||
TransportAddress *taddr, __be16 port,
|
||||
struct nf_conntrack_expect *exp);
|
||||
extern int (*nat_callforwarding_hook) (struct sk_buff **pskb,
|
||||
struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned char **data, int dataoff,
|
||||
TransportAddress *taddr,
|
||||
__be16 port,
|
||||
struct nf_conntrack_expect *exp);
|
||||
extern int (*nat_q931_hook) (struct sk_buff **pskb, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned char **data, TransportAddress *taddr,
|
||||
int idx, __be16 port,
|
||||
struct nf_conntrack_expect *exp);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
* ip_conntrack_helper_h323_asn1.h - BER and PER decoding library for H.323
|
||||
* conntrack/NAT module.
|
||||
* ip_conntrack_h323_asn1.h - BER and PER decoding library for H.323
|
||||
* conntrack/NAT module.
|
||||
*
|
||||
* Copyright (c) 2006 by Jing Min Zhao <zhaojingmin@users.sourceforge.net>
|
||||
*
|
||||
@@ -34,13 +34,13 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _IP_CONNTRACK_HELPER_H323_ASN1_H_
|
||||
#define _IP_CONNTRACK_HELPER_H323_ASN1_H_
|
||||
#ifndef _NF_CONNTRACK_HELPER_H323_ASN1_H_
|
||||
#define _NF_CONNTRACK_HELPER_H323_ASN1_H_
|
||||
|
||||
/*****************************************************************************
|
||||
* H.323 Types
|
||||
****************************************************************************/
|
||||
#include "ip_conntrack_helper_h323_types.h"
|
||||
#include "nf_conntrack_h323_types.h"
|
||||
|
||||
typedef struct {
|
||||
enum {
|
||||
+12
@@ -10,6 +10,11 @@ typedef struct TransportAddress_ipAddress { /* SEQUENCE */
|
||||
unsigned ip;
|
||||
} TransportAddress_ipAddress;
|
||||
|
||||
typedef struct TransportAddress_ip6Address { /* SEQUENCE */
|
||||
int options; /* No use */
|
||||
unsigned ip6;
|
||||
} TransportAddress_ip6Address;
|
||||
|
||||
typedef struct TransportAddress { /* CHOICE */
|
||||
enum {
|
||||
eTransportAddress_ipAddress,
|
||||
@@ -22,6 +27,7 @@ typedef struct TransportAddress { /* CHOICE */
|
||||
} choice;
|
||||
union {
|
||||
TransportAddress_ipAddress ipAddress;
|
||||
TransportAddress_ip6Address ip6Address;
|
||||
};
|
||||
} TransportAddress;
|
||||
|
||||
@@ -93,6 +99,11 @@ typedef struct UnicastAddress_iPAddress { /* SEQUENCE */
|
||||
unsigned network;
|
||||
} UnicastAddress_iPAddress;
|
||||
|
||||
typedef struct UnicastAddress_iP6Address { /* SEQUENCE */
|
||||
int options; /* No use */
|
||||
unsigned network;
|
||||
} UnicastAddress_iP6Address;
|
||||
|
||||
typedef struct UnicastAddress { /* CHOICE */
|
||||
enum {
|
||||
eUnicastAddress_iPAddress,
|
||||
@@ -105,6 +116,7 @@ typedef struct UnicastAddress { /* CHOICE */
|
||||
} choice;
|
||||
union {
|
||||
UnicastAddress_iPAddress iPAddress;
|
||||
UnicastAddress_iP6Address iP6Address;
|
||||
};
|
||||
} UnicastAddress;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef _NF_CONNTRACK_IRC_H
|
||||
#define _NF_CONNTRACK_IRC_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define IRC_PORT 6667
|
||||
|
||||
extern unsigned int (*nf_nat_irc_hook)(struct sk_buff **pskb,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned int matchoff,
|
||||
unsigned int matchlen,
|
||||
struct nf_conntrack_expect *exp);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _NF_CONNTRACK_IRC_H */
|
||||
@@ -0,0 +1,321 @@
|
||||
/* PPTP constants and structs */
|
||||
#ifndef _NF_CONNTRACK_PPTP_H
|
||||
#define _NF_CONNTRACK_PPTP_H
|
||||
|
||||
/* state of the control session */
|
||||
enum pptp_ctrlsess_state {
|
||||
PPTP_SESSION_NONE, /* no session present */
|
||||
PPTP_SESSION_ERROR, /* some session error */
|
||||
PPTP_SESSION_STOPREQ, /* stop_sess request seen */
|
||||
PPTP_SESSION_REQUESTED, /* start_sess request seen */
|
||||
PPTP_SESSION_CONFIRMED, /* session established */
|
||||
};
|
||||
|
||||
/* state of the call inside the control session */
|
||||
enum pptp_ctrlcall_state {
|
||||
PPTP_CALL_NONE,
|
||||
PPTP_CALL_ERROR,
|
||||
PPTP_CALL_OUT_REQ,
|
||||
PPTP_CALL_OUT_CONF,
|
||||
PPTP_CALL_IN_REQ,
|
||||
PPTP_CALL_IN_REP,
|
||||
PPTP_CALL_IN_CONF,
|
||||
PPTP_CALL_CLEAR_REQ,
|
||||
};
|
||||
|
||||
/* conntrack private data */
|
||||
struct nf_ct_pptp_master {
|
||||
enum pptp_ctrlsess_state sstate; /* session state */
|
||||
enum pptp_ctrlcall_state cstate; /* call state */
|
||||
__be16 pac_call_id; /* call id of PAC */
|
||||
__be16 pns_call_id; /* call id of PNS */
|
||||
|
||||
/* in pre-2.6.11 this used to be per-expect. Now it is per-conntrack
|
||||
* and therefore imposes a fixed limit on the number of maps */
|
||||
struct nf_ct_gre_keymap *keymap[IP_CT_DIR_MAX];
|
||||
};
|
||||
|
||||
struct nf_nat_pptp {
|
||||
__be16 pns_call_id; /* NAT'ed PNS call id */
|
||||
__be16 pac_call_id; /* NAT'ed PAC call id */
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define PPTP_CONTROL_PORT 1723
|
||||
|
||||
#define PPTP_PACKET_CONTROL 1
|
||||
#define PPTP_PACKET_MGMT 2
|
||||
|
||||
#define PPTP_MAGIC_COOKIE 0x1a2b3c4d
|
||||
|
||||
struct pptp_pkt_hdr {
|
||||
__u16 packetLength;
|
||||
__be16 packetType;
|
||||
__be32 magicCookie;
|
||||
};
|
||||
|
||||
/* PptpControlMessageType values */
|
||||
#define PPTP_START_SESSION_REQUEST 1
|
||||
#define PPTP_START_SESSION_REPLY 2
|
||||
#define PPTP_STOP_SESSION_REQUEST 3
|
||||
#define PPTP_STOP_SESSION_REPLY 4
|
||||
#define PPTP_ECHO_REQUEST 5
|
||||
#define PPTP_ECHO_REPLY 6
|
||||
#define PPTP_OUT_CALL_REQUEST 7
|
||||
#define PPTP_OUT_CALL_REPLY 8
|
||||
#define PPTP_IN_CALL_REQUEST 9
|
||||
#define PPTP_IN_CALL_REPLY 10
|
||||
#define PPTP_IN_CALL_CONNECT 11
|
||||
#define PPTP_CALL_CLEAR_REQUEST 12
|
||||
#define PPTP_CALL_DISCONNECT_NOTIFY 13
|
||||
#define PPTP_WAN_ERROR_NOTIFY 14
|
||||
#define PPTP_SET_LINK_INFO 15
|
||||
|
||||
#define PPTP_MSG_MAX 15
|
||||
|
||||
/* PptpGeneralError values */
|
||||
#define PPTP_ERROR_CODE_NONE 0
|
||||
#define PPTP_NOT_CONNECTED 1
|
||||
#define PPTP_BAD_FORMAT 2
|
||||
#define PPTP_BAD_VALUE 3
|
||||
#define PPTP_NO_RESOURCE 4
|
||||
#define PPTP_BAD_CALLID 5
|
||||
#define PPTP_REMOVE_DEVICE_ERROR 6
|
||||
|
||||
struct PptpControlHeader {
|
||||
__be16 messageType;
|
||||
__u16 reserved;
|
||||
};
|
||||
|
||||
/* FramingCapability Bitmap Values */
|
||||
#define PPTP_FRAME_CAP_ASYNC 0x1
|
||||
#define PPTP_FRAME_CAP_SYNC 0x2
|
||||
|
||||
/* BearerCapability Bitmap Values */
|
||||
#define PPTP_BEARER_CAP_ANALOG 0x1
|
||||
#define PPTP_BEARER_CAP_DIGITAL 0x2
|
||||
|
||||
struct PptpStartSessionRequest {
|
||||
__be16 protocolVersion;
|
||||
__u16 reserved1;
|
||||
__be32 framingCapability;
|
||||
__be32 bearerCapability;
|
||||
__be16 maxChannels;
|
||||
__be16 firmwareRevision;
|
||||
__u8 hostName[64];
|
||||
__u8 vendorString[64];
|
||||
};
|
||||
|
||||
/* PptpStartSessionResultCode Values */
|
||||
#define PPTP_START_OK 1
|
||||
#define PPTP_START_GENERAL_ERROR 2
|
||||
#define PPTP_START_ALREADY_CONNECTED 3
|
||||
#define PPTP_START_NOT_AUTHORIZED 4
|
||||
#define PPTP_START_UNKNOWN_PROTOCOL 5
|
||||
|
||||
struct PptpStartSessionReply {
|
||||
__be16 protocolVersion;
|
||||
__u8 resultCode;
|
||||
__u8 generalErrorCode;
|
||||
__be32 framingCapability;
|
||||
__be32 bearerCapability;
|
||||
__be16 maxChannels;
|
||||
__be16 firmwareRevision;
|
||||
__u8 hostName[64];
|
||||
__u8 vendorString[64];
|
||||
};
|
||||
|
||||
/* PptpStopReasons */
|
||||
#define PPTP_STOP_NONE 1
|
||||
#define PPTP_STOP_PROTOCOL 2
|
||||
#define PPTP_STOP_LOCAL_SHUTDOWN 3
|
||||
|
||||
struct PptpStopSessionRequest {
|
||||
__u8 reason;
|
||||
__u8 reserved1;
|
||||
__u16 reserved2;
|
||||
};
|
||||
|
||||
/* PptpStopSessionResultCode */
|
||||
#define PPTP_STOP_OK 1
|
||||
#define PPTP_STOP_GENERAL_ERROR 2
|
||||
|
||||
struct PptpStopSessionReply {
|
||||
__u8 resultCode;
|
||||
__u8 generalErrorCode;
|
||||
__u16 reserved1;
|
||||
};
|
||||
|
||||
struct PptpEchoRequest {
|
||||
__be32 identNumber;
|
||||
};
|
||||
|
||||
/* PptpEchoReplyResultCode */
|
||||
#define PPTP_ECHO_OK 1
|
||||
#define PPTP_ECHO_GENERAL_ERROR 2
|
||||
|
||||
struct PptpEchoReply {
|
||||
__be32 identNumber;
|
||||
__u8 resultCode;
|
||||
__u8 generalErrorCode;
|
||||
__u16 reserved;
|
||||
};
|
||||
|
||||
/* PptpFramingType */
|
||||
#define PPTP_ASYNC_FRAMING 1
|
||||
#define PPTP_SYNC_FRAMING 2
|
||||
#define PPTP_DONT_CARE_FRAMING 3
|
||||
|
||||
/* PptpCallBearerType */
|
||||
#define PPTP_ANALOG_TYPE 1
|
||||
#define PPTP_DIGITAL_TYPE 2
|
||||
#define PPTP_DONT_CARE_BEARER_TYPE 3
|
||||
|
||||
struct PptpOutCallRequest {
|
||||
__be16 callID;
|
||||
__be16 callSerialNumber;
|
||||
__be32 minBPS;
|
||||
__be32 maxBPS;
|
||||
__be32 bearerType;
|
||||
__be32 framingType;
|
||||
__be16 packetWindow;
|
||||
__be16 packetProcDelay;
|
||||
__be16 phoneNumberLength;
|
||||
__u16 reserved1;
|
||||
__u8 phoneNumber[64];
|
||||
__u8 subAddress[64];
|
||||
};
|
||||
|
||||
/* PptpCallResultCode */
|
||||
#define PPTP_OUTCALL_CONNECT 1
|
||||
#define PPTP_OUTCALL_GENERAL_ERROR 2
|
||||
#define PPTP_OUTCALL_NO_CARRIER 3
|
||||
#define PPTP_OUTCALL_BUSY 4
|
||||
#define PPTP_OUTCALL_NO_DIAL_TONE 5
|
||||
#define PPTP_OUTCALL_TIMEOUT 6
|
||||
#define PPTP_OUTCALL_DONT_ACCEPT 7
|
||||
|
||||
struct PptpOutCallReply {
|
||||
__be16 callID;
|
||||
__be16 peersCallID;
|
||||
__u8 resultCode;
|
||||
__u8 generalErrorCode;
|
||||
__be16 causeCode;
|
||||
__be32 connectSpeed;
|
||||
__be16 packetWindow;
|
||||
__be16 packetProcDelay;
|
||||
__be32 physChannelID;
|
||||
};
|
||||
|
||||
struct PptpInCallRequest {
|
||||
__be16 callID;
|
||||
__be16 callSerialNumber;
|
||||
__be32 callBearerType;
|
||||
__be32 physChannelID;
|
||||
__be16 dialedNumberLength;
|
||||
__be16 dialingNumberLength;
|
||||
__u8 dialedNumber[64];
|
||||
__u8 dialingNumber[64];
|
||||
__u8 subAddress[64];
|
||||
};
|
||||
|
||||
/* PptpInCallResultCode */
|
||||
#define PPTP_INCALL_ACCEPT 1
|
||||
#define PPTP_INCALL_GENERAL_ERROR 2
|
||||
#define PPTP_INCALL_DONT_ACCEPT 3
|
||||
|
||||
struct PptpInCallReply {
|
||||
__be16 callID;
|
||||
__be16 peersCallID;
|
||||
__u8 resultCode;
|
||||
__u8 generalErrorCode;
|
||||
__be16 packetWindow;
|
||||
__be16 packetProcDelay;
|
||||
__u16 reserved;
|
||||
};
|
||||
|
||||
struct PptpInCallConnected {
|
||||
__be16 peersCallID;
|
||||
__u16 reserved;
|
||||
__be32 connectSpeed;
|
||||
__be16 packetWindow;
|
||||
__be16 packetProcDelay;
|
||||
__be32 callFramingType;
|
||||
};
|
||||
|
||||
struct PptpClearCallRequest {
|
||||
__be16 callID;
|
||||
__u16 reserved;
|
||||
};
|
||||
|
||||
struct PptpCallDisconnectNotify {
|
||||
__be16 callID;
|
||||
__u8 resultCode;
|
||||
__u8 generalErrorCode;
|
||||
__be16 causeCode;
|
||||
__u16 reserved;
|
||||
__u8 callStatistics[128];
|
||||
};
|
||||
|
||||
struct PptpWanErrorNotify {
|
||||
__be16 peersCallID;
|
||||
__u16 reserved;
|
||||
__be32 crcErrors;
|
||||
__be32 framingErrors;
|
||||
__be32 hardwareOverRuns;
|
||||
__be32 bufferOverRuns;
|
||||
__be32 timeoutErrors;
|
||||
__be32 alignmentErrors;
|
||||
};
|
||||
|
||||
struct PptpSetLinkInfo {
|
||||
__be16 peersCallID;
|
||||
__u16 reserved;
|
||||
__be32 sendAccm;
|
||||
__be32 recvAccm;
|
||||
};
|
||||
|
||||
union pptp_ctrl_union {
|
||||
struct PptpStartSessionRequest sreq;
|
||||
struct PptpStartSessionReply srep;
|
||||
struct PptpStopSessionRequest streq;
|
||||
struct PptpStopSessionReply strep;
|
||||
struct PptpOutCallRequest ocreq;
|
||||
struct PptpOutCallReply ocack;
|
||||
struct PptpInCallRequest icreq;
|
||||
struct PptpInCallReply icack;
|
||||
struct PptpInCallConnected iccon;
|
||||
struct PptpClearCallRequest clrreq;
|
||||
struct PptpCallDisconnectNotify disc;
|
||||
struct PptpWanErrorNotify wanerr;
|
||||
struct PptpSetLinkInfo setlink;
|
||||
};
|
||||
|
||||
/* crap needed for nf_conntrack_compat.h */
|
||||
struct nf_conn;
|
||||
struct nf_conntrack_expect;
|
||||
enum ip_conntrack_info;
|
||||
|
||||
extern int
|
||||
(*nf_nat_pptp_hook_outbound)(struct sk_buff **pskb,
|
||||
struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
||||
struct PptpControlHeader *ctlh,
|
||||
union pptp_ctrl_union *pptpReq);
|
||||
|
||||
extern int
|
||||
(*nf_nat_pptp_hook_inbound)(struct sk_buff **pskb,
|
||||
struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
||||
struct PptpControlHeader *ctlh,
|
||||
union pptp_ctrl_union *pptpReq);
|
||||
|
||||
extern void
|
||||
(*nf_nat_pptp_hook_exp_gre)(struct nf_conntrack_expect *exp_orig,
|
||||
struct nf_conntrack_expect *exp_reply);
|
||||
|
||||
extern void
|
||||
(*nf_nat_pptp_hook_expectfn)(struct nf_conn *ct,
|
||||
struct nf_conntrack_expect *exp);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _NF_CONNTRACK_PPTP_H */
|
||||
@@ -0,0 +1,112 @@
|
||||
#ifndef _CONNTRACK_PROTO_GRE_H
|
||||
#define _CONNTRACK_PROTO_GRE_H
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
/* GRE PROTOCOL HEADER */
|
||||
|
||||
/* GRE Version field */
|
||||
#define GRE_VERSION_1701 0x0
|
||||
#define GRE_VERSION_PPTP 0x1
|
||||
|
||||
/* GRE Protocol field */
|
||||
#define GRE_PROTOCOL_PPTP 0x880B
|
||||
|
||||
/* GRE Flags */
|
||||
#define GRE_FLAG_C 0x80
|
||||
#define GRE_FLAG_R 0x40
|
||||
#define GRE_FLAG_K 0x20
|
||||
#define GRE_FLAG_S 0x10
|
||||
#define GRE_FLAG_A 0x80
|
||||
|
||||
#define GRE_IS_C(f) ((f)&GRE_FLAG_C)
|
||||
#define GRE_IS_R(f) ((f)&GRE_FLAG_R)
|
||||
#define GRE_IS_K(f) ((f)&GRE_FLAG_K)
|
||||
#define GRE_IS_S(f) ((f)&GRE_FLAG_S)
|
||||
#define GRE_IS_A(f) ((f)&GRE_FLAG_A)
|
||||
|
||||
/* GRE is a mess: Four different standards */
|
||||
struct gre_hdr {
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
__u16 rec:3,
|
||||
srr:1,
|
||||
seq:1,
|
||||
key:1,
|
||||
routing:1,
|
||||
csum:1,
|
||||
version:3,
|
||||
reserved:4,
|
||||
ack:1;
|
||||
#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
__u16 csum:1,
|
||||
routing:1,
|
||||
key:1,
|
||||
seq:1,
|
||||
srr:1,
|
||||
rec:3,
|
||||
ack:1,
|
||||
reserved:4,
|
||||
version:3;
|
||||
#else
|
||||
#error "Adjust your <asm/byteorder.h> defines"
|
||||
#endif
|
||||
__be16 protocol;
|
||||
};
|
||||
|
||||
/* modified GRE header for PPTP */
|
||||
struct gre_hdr_pptp {
|
||||
__u8 flags; /* bitfield */
|
||||
__u8 version; /* should be GRE_VERSION_PPTP */
|
||||
__be16 protocol; /* should be GRE_PROTOCOL_PPTP */
|
||||
__be16 payload_len; /* size of ppp payload, not inc. gre header */
|
||||
__be16 call_id; /* peer's call_id for this session */
|
||||
__be32 seq; /* sequence number. Present if S==1 */
|
||||
__be32 ack; /* seq number of highest packet recieved by */
|
||||
/* sender in this session */
|
||||
};
|
||||
|
||||
struct nf_ct_gre {
|
||||
unsigned int stream_timeout;
|
||||
unsigned int timeout;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <net/netfilter/nf_conntrack_tuple.h>
|
||||
|
||||
struct nf_conn;
|
||||
|
||||
/* structure for original <-> reply keymap */
|
||||
struct nf_ct_gre_keymap {
|
||||
struct list_head list;
|
||||
struct nf_conntrack_tuple tuple;
|
||||
};
|
||||
|
||||
/* add new tuple->key_reply pair to keymap */
|
||||
int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir,
|
||||
struct nf_conntrack_tuple *t);
|
||||
|
||||
/* delete keymap entries */
|
||||
void nf_ct_gre_keymap_destroy(struct nf_conn *ct);
|
||||
|
||||
/* get pointer to gre key, if present */
|
||||
static inline __be32 *gre_key(struct gre_hdr *greh)
|
||||
{
|
||||
if (!greh->key)
|
||||
return NULL;
|
||||
if (greh->csum || greh->routing)
|
||||
return (__be32 *)(greh+sizeof(*greh)+4);
|
||||
return (__be32 *)(greh+sizeof(*greh));
|
||||
}
|
||||
|
||||
/* get pointer ot gre csum, if present */
|
||||
static inline __sum16 *gre_csum(struct gre_hdr *greh)
|
||||
{
|
||||
if (!greh->csum)
|
||||
return NULL;
|
||||
return (__sum16 *)(greh+sizeof(*greh));
|
||||
}
|
||||
|
||||
extern void nf_ct_gre_keymap_flush(void);
|
||||
extern void nf_nat_need_gre(void);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _CONNTRACK_PROTO_GRE_H */
|
||||
@@ -20,7 +20,7 @@ struct ip_ct_sctp
|
||||
{
|
||||
enum sctp_conntrack state;
|
||||
|
||||
u_int32_t vtag[IP_CT_DIR_MAX];
|
||||
__be32 vtag[IP_CT_DIR_MAX];
|
||||
u_int32_t ttag[IP_CT_DIR_MAX];
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#ifndef __NF_CONNTRACK_SIP_H__
|
||||
#define __NF_CONNTRACK_SIP_H__
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define SIP_PORT 5060
|
||||
#define SIP_TIMEOUT 3600
|
||||
|
||||
enum sip_header_pos {
|
||||
POS_REG_REQ_URI,
|
||||
POS_REQ_URI,
|
||||
POS_FROM,
|
||||
POS_TO,
|
||||
POS_VIA,
|
||||
POS_CONTACT,
|
||||
POS_CONTENT,
|
||||
POS_MEDIA,
|
||||
POS_OWNER_IP4,
|
||||
POS_CONNECTION_IP4,
|
||||
POS_OWNER_IP6,
|
||||
POS_CONNECTION_IP6,
|
||||
POS_SDP_HEADER,
|
||||
};
|
||||
|
||||
extern unsigned int (*nf_nat_sip_hook)(struct sk_buff **pskb,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
struct nf_conn *ct,
|
||||
const char **dptr);
|
||||
extern unsigned int (*nf_nat_sdp_hook)(struct sk_buff **pskb,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
struct nf_conntrack_expect *exp,
|
||||
const char *dptr);
|
||||
|
||||
extern int ct_sip_get_info(struct nf_conn *ct, const char *dptr, size_t dlen,
|
||||
unsigned int *matchoff, unsigned int *matchlen,
|
||||
enum sip_header_pos pos);
|
||||
extern int ct_sip_lnlen(const char *line, const char *limit);
|
||||
extern const char *ct_sip_search(const char *needle, const char *haystack,
|
||||
size_t needle_len, size_t haystack_len,
|
||||
int case_sensitive);
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __NF_CONNTRACK_SIP_H__ */
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef _NF_CONNTRACK_TFTP_H
|
||||
#define _NF_CONNTRACK_TFTP_H
|
||||
|
||||
#define TFTP_PORT 69
|
||||
|
||||
struct tftphdr {
|
||||
__be16 opcode;
|
||||
};
|
||||
|
||||
#define TFTP_OPCODE_READ 1
|
||||
#define TFTP_OPCODE_WRITE 2
|
||||
#define TFTP_OPCODE_DATA 3
|
||||
#define TFTP_OPCODE_ACK 4
|
||||
#define TFTP_OPCODE_ERROR 5
|
||||
|
||||
extern unsigned int (*nf_nat_tftp_hook)(struct sk_buff **pskb,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
struct nf_conntrack_expect *exp);
|
||||
|
||||
#endif /* _NF_CONNTRACK_TFTP_H */
|
||||
@@ -78,7 +78,7 @@ struct nfattr
|
||||
struct nfgenmsg {
|
||||
u_int8_t nfgen_family; /* AF_xxx */
|
||||
u_int8_t version; /* nfnetlink version */
|
||||
u_int16_t res_id; /* resource id */
|
||||
__be16 res_id; /* resource id */
|
||||
};
|
||||
|
||||
#define NFNETLINK_V0 0
|
||||
|
||||
@@ -16,24 +16,22 @@ enum nfulnl_msg_types {
|
||||
};
|
||||
|
||||
struct nfulnl_msg_packet_hdr {
|
||||
u_int16_t hw_protocol; /* hw protocol (network order) */
|
||||
__be16 hw_protocol; /* hw protocol (network order) */
|
||||
u_int8_t hook; /* netfilter hook */
|
||||
u_int8_t _pad;
|
||||
};
|
||||
|
||||
struct nfulnl_msg_packet_hw {
|
||||
u_int16_t hw_addrlen;
|
||||
__be16 hw_addrlen;
|
||||
u_int16_t _pad;
|
||||
u_int8_t hw_addr[8];
|
||||
};
|
||||
|
||||
struct nfulnl_msg_packet_timestamp {
|
||||
aligned_u64 sec;
|
||||
aligned_u64 usec;
|
||||
aligned_be64 sec;
|
||||
aligned_be64 usec;
|
||||
};
|
||||
|
||||
#define NFULNL_PREFIXLEN 30 /* just like old log target */
|
||||
|
||||
enum nfulnl_attr_type {
|
||||
NFULA_UNSPEC,
|
||||
NFULA_PACKET_HDR,
|
||||
@@ -67,7 +65,7 @@ struct nfulnl_msg_config_cmd {
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct nfulnl_msg_config_mode {
|
||||
u_int32_t copy_range;
|
||||
__be32 copy_range;
|
||||
u_int8_t copy_mode;
|
||||
u_int8_t _pad;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
@@ -13,20 +13,20 @@ enum nfqnl_msg_types {
|
||||
};
|
||||
|
||||
struct nfqnl_msg_packet_hdr {
|
||||
u_int32_t packet_id; /* unique ID of packet in queue */
|
||||
u_int16_t hw_protocol; /* hw protocol (network order) */
|
||||
__be32 packet_id; /* unique ID of packet in queue */
|
||||
__be16 hw_protocol; /* hw protocol (network order) */
|
||||
u_int8_t hook; /* netfilter hook */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct nfqnl_msg_packet_hw {
|
||||
u_int16_t hw_addrlen;
|
||||
__be16 hw_addrlen;
|
||||
u_int16_t _pad;
|
||||
u_int8_t hw_addr[8];
|
||||
};
|
||||
|
||||
struct nfqnl_msg_packet_timestamp {
|
||||
aligned_u64 sec;
|
||||
aligned_u64 usec;
|
||||
aligned_be64 sec;
|
||||
aligned_be64 usec;
|
||||
};
|
||||
|
||||
enum nfqnl_attr_type {
|
||||
@@ -47,8 +47,8 @@ enum nfqnl_attr_type {
|
||||
#define NFQA_MAX (__NFQA_MAX - 1)
|
||||
|
||||
struct nfqnl_msg_verdict_hdr {
|
||||
u_int32_t verdict;
|
||||
u_int32_t id;
|
||||
__be32 verdict;
|
||||
__be32 id;
|
||||
};
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ enum nfqnl_msg_config_cmds {
|
||||
struct nfqnl_msg_config_cmd {
|
||||
u_int8_t command; /* nfqnl_msg_config_cmds */
|
||||
u_int8_t _pad;
|
||||
u_int16_t pf; /* AF_xxx for PF_[UN]BIND */
|
||||
__be16 pf; /* AF_xxx for PF_[UN]BIND */
|
||||
};
|
||||
|
||||
enum nfqnl_config_mode {
|
||||
@@ -73,7 +73,7 @@ enum nfqnl_config_mode {
|
||||
};
|
||||
|
||||
struct nfqnl_msg_config_params {
|
||||
u_int32_t copy_range;
|
||||
__be32 copy_range;
|
||||
u_int8_t copy_mode; /* enum nfqnl_config_mode */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
@@ -82,6 +82,7 @@ enum nfqnl_attr_config {
|
||||
NFQA_CFG_UNSPEC,
|
||||
NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */
|
||||
NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */
|
||||
NFQA_CFG_QUEUE_MAXLEN, /* u_int32_t */
|
||||
__NFQA_CFG_MAX
|
||||
};
|
||||
#define NFQA_CFG_MAX (__NFQA_CFG_MAX-1)
|
||||
|
||||
@@ -96,22 +96,6 @@ struct _xt_align
|
||||
/* Error verdict. */
|
||||
#define XT_ERROR_TARGET "ERROR"
|
||||
|
||||
/*
|
||||
* New IP firewall options for [gs]etsockopt at the RAW IP level.
|
||||
* Unlike BSD Linux inherits IP options so you don't have to use a raw
|
||||
* socket for this. Instead we check rights in the calls. */
|
||||
#define XT_BASE_CTL 64 /* base for firewall socket options */
|
||||
|
||||
#define XT_SO_SET_REPLACE (XT_BASE_CTL)
|
||||
#define XT_SO_SET_ADD_COUNTERS (XT_BASE_CTL + 1)
|
||||
#define XT_SO_SET_MAX XT_SO_SET_ADD_COUNTERS
|
||||
|
||||
#define XT_SO_GET_INFO (XT_BASE_CTL)
|
||||
#define XT_SO_GET_ENTRIES (XT_BASE_CTL + 1)
|
||||
#define XT_SO_GET_REVISION_MATCH (XT_BASE_CTL + 2)
|
||||
#define XT_SO_GET_REVISION_TARGET (XT_BASE_CTL + 3)
|
||||
#define XT_SO_GET_MAX XT_SO_GET_REVISION_TARGET
|
||||
|
||||
#define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0)
|
||||
#define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0)
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef _XT_NFLOG_TARGET
|
||||
#define _XT_NFLOG_TARGET
|
||||
|
||||
#define XT_NFLOG_DEFAULT_GROUP 0x1
|
||||
#define XT_NFLOG_DEFAULT_THRESHOLD 1
|
||||
|
||||
#define XT_NFLOG_MASK 0x0
|
||||
|
||||
struct xt_nflog_info {
|
||||
u_int32_t len;
|
||||
u_int16_t group;
|
||||
u_int16_t threshold;
|
||||
u_int16_t flags;
|
||||
u_int16_t pad;
|
||||
char prefix[64];
|
||||
};
|
||||
|
||||
#endif /* _XT_NFLOG_TARGET */
|
||||
@@ -29,14 +29,14 @@
|
||||
struct ip_conntrack_old_tuple
|
||||
{
|
||||
struct {
|
||||
__u32 ip;
|
||||
__be32 ip;
|
||||
union {
|
||||
__u16 all;
|
||||
} u;
|
||||
} src;
|
||||
|
||||
struct {
|
||||
__u32 ip;
|
||||
__be32 ip;
|
||||
union {
|
||||
__u16 all;
|
||||
} u;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef _XT_HASHLIMIT_H
|
||||
#define _XT_HASHLIMIT_H
|
||||
|
||||
/* timings are in milliseconds. */
|
||||
#define XT_HASHLIMIT_SCALE 10000
|
||||
/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490
|
||||
seconds, or one every 59 hours. */
|
||||
|
||||
/* details of this structure hidden by the implementation */
|
||||
struct xt_hashlimit_htable;
|
||||
|
||||
#define XT_HASHLIMIT_HASH_DIP 0x0001
|
||||
#define XT_HASHLIMIT_HASH_DPT 0x0002
|
||||
#define XT_HASHLIMIT_HASH_SIP 0x0004
|
||||
#define XT_HASHLIMIT_HASH_SPT 0x0008
|
||||
|
||||
struct hashlimit_cfg {
|
||||
u_int32_t mode; /* bitmask of IPT_HASHLIMIT_HASH_* */
|
||||
u_int32_t avg; /* Average secs between packets * scale */
|
||||
u_int32_t burst; /* Period multiplier for upper limit. */
|
||||
|
||||
/* user specified */
|
||||
u_int32_t size; /* how many buckets */
|
||||
u_int32_t max; /* max number of entries */
|
||||
u_int32_t gc_interval; /* gc interval */
|
||||
u_int32_t expire; /* when do entries expire? */
|
||||
};
|
||||
|
||||
struct xt_hashlimit_info {
|
||||
char name [IFNAMSIZ]; /* name */
|
||||
struct hashlimit_cfg cfg;
|
||||
struct xt_hashlimit_htable *hinfo;
|
||||
|
||||
/* Used internally by the kernel */
|
||||
union {
|
||||
void *ptr;
|
||||
struct xt_hashlimit_info *master;
|
||||
} u;
|
||||
};
|
||||
#endif /*_XT_HASHLIMIT_H*/
|
||||
@@ -39,7 +39,7 @@ struct xt_policy_elem
|
||||
union xt_policy_addr smask;
|
||||
union xt_policy_addr daddr;
|
||||
union xt_policy_addr dmask;
|
||||
u_int32_t spi;
|
||||
__be32 spi;
|
||||
u_int32_t reqid;
|
||||
u_int8_t proto;
|
||||
u_int8_t mode;
|
||||
|
||||
@@ -112,19 +112,20 @@ struct arpt_entry
|
||||
* New IP firewall options for [gs]etsockopt at the RAW IP level.
|
||||
* Unlike BSD Linux inherits IP options so you don't have to use a raw
|
||||
* socket for this. Instead we check rights in the calls.
|
||||
*
|
||||
* ATTENTION: check linux/in.h before adding new number here.
|
||||
*/
|
||||
#define ARPT_CTL_OFFSET 32
|
||||
#define ARPT_BASE_CTL (XT_BASE_CTL+ARPT_CTL_OFFSET)
|
||||
#define ARPT_BASE_CTL 96
|
||||
|
||||
#define ARPT_SO_SET_REPLACE (XT_SO_SET_REPLACE+ARPT_CTL_OFFSET)
|
||||
#define ARPT_SO_SET_ADD_COUNTERS (XT_SO_SET_ADD_COUNTERS+ARPT_CTL_OFFSET)
|
||||
#define ARPT_SO_SET_MAX (XT_SO_SET_MAX+ARPT_CTL_OFFSET)
|
||||
#define ARPT_SO_SET_REPLACE (ARPT_BASE_CTL)
|
||||
#define ARPT_SO_SET_ADD_COUNTERS (ARPT_BASE_CTL + 1)
|
||||
#define ARPT_SO_SET_MAX ARPT_SO_SET_ADD_COUNTERS
|
||||
|
||||
#define ARPT_SO_GET_INFO (XT_SO_GET_INFO+ARPT_CTL_OFFSET)
|
||||
#define ARPT_SO_GET_ENTRIES (XT_SO_GET_ENTRIES+ARPT_CTL_OFFSET)
|
||||
/* #define ARPT_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH */
|
||||
#define ARPT_SO_GET_REVISION_TARGET (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
|
||||
#define ARPT_SO_GET_MAX (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
|
||||
#define ARPT_SO_GET_INFO (ARPT_BASE_CTL)
|
||||
#define ARPT_SO_GET_ENTRIES (ARPT_BASE_CTL + 1)
|
||||
/* #define ARPT_SO_GET_REVISION_MATCH (APRT_BASE_CTL + 2) */
|
||||
#define ARPT_SO_GET_REVISION_TARGET (ARPT_BASE_CTL + 3)
|
||||
#define ARPT_SO_GET_MAX (ARPT_SO_GET_REVISION_TARGET)
|
||||
|
||||
/* CONTINUE verdict for targets */
|
||||
#define ARPT_CONTINUE XT_CONTINUE
|
||||
|
||||
@@ -64,7 +64,7 @@ static inline int nf_bridge_pad(const struct sk_buff *skb)
|
||||
|
||||
struct bridge_skb_cb {
|
||||
union {
|
||||
__u32 ipv4;
|
||||
__be32 ipv4;
|
||||
} daddr;
|
||||
};
|
||||
|
||||
|
||||
@@ -28,21 +28,21 @@ struct hdr_ui {
|
||||
uint8_t ssap;
|
||||
uint8_t ctrl;
|
||||
uint8_t orig[3];
|
||||
uint16_t type;
|
||||
__be16 type;
|
||||
};
|
||||
|
||||
struct hdr_ni {
|
||||
uint8_t dsap;
|
||||
uint8_t ssap;
|
||||
uint16_t ctrl;
|
||||
__be16 ctrl;
|
||||
uint8_t orig[3];
|
||||
uint16_t type;
|
||||
__be16 type;
|
||||
};
|
||||
|
||||
struct ebt_802_3_hdr {
|
||||
uint8_t daddr[6];
|
||||
uint8_t saddr[6];
|
||||
uint16_t len;
|
||||
__be16 len;
|
||||
union {
|
||||
struct hdr_ui ui;
|
||||
struct hdr_ni ni;
|
||||
@@ -61,7 +61,7 @@ static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb)
|
||||
struct ebt_802_3_info
|
||||
{
|
||||
uint8_t sap;
|
||||
uint16_t type;
|
||||
__be16 type;
|
||||
uint8_t bitmask;
|
||||
uint8_t invflags;
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
struct ebt_mac_wormhash_tuple
|
||||
{
|
||||
uint32_t cmp[2];
|
||||
uint32_t ip;
|
||||
__be32 ip;
|
||||
};
|
||||
|
||||
struct ebt_mac_wormhash
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
|
||||
struct ebt_arp_info
|
||||
{
|
||||
uint16_t htype;
|
||||
uint16_t ptype;
|
||||
uint16_t opcode;
|
||||
uint32_t saddr;
|
||||
uint32_t smsk;
|
||||
uint32_t daddr;
|
||||
uint32_t dmsk;
|
||||
__be16 htype;
|
||||
__be16 ptype;
|
||||
__be16 opcode;
|
||||
__be32 saddr;
|
||||
__be32 smsk;
|
||||
__be32 daddr;
|
||||
__be32 dmsk;
|
||||
unsigned char smaddr[ETH_ALEN];
|
||||
unsigned char smmsk[ETH_ALEN];
|
||||
unsigned char dmaddr[ETH_ALEN];
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
/* the same values are used for the invflags */
|
||||
struct ebt_ip_info
|
||||
{
|
||||
uint32_t saddr;
|
||||
uint32_t daddr;
|
||||
uint32_t smsk;
|
||||
uint32_t dmsk;
|
||||
__be32 saddr;
|
||||
__be32 daddr;
|
||||
__be32 smsk;
|
||||
__be32 dmsk;
|
||||
uint8_t tos;
|
||||
uint8_t protocol;
|
||||
uint8_t bitmask;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef __LINUX_BRIDGE_EBT_NAT_H
|
||||
#define __LINUX_BRIDGE_EBT_NAT_H
|
||||
|
||||
#define NAT_ARP_BIT (0x00000010)
|
||||
struct ebt_nat_info
|
||||
{
|
||||
unsigned char mac[ETH_ALEN];
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
struct ebt_vlan_info {
|
||||
uint16_t id; /* VLAN ID {1-4095} */
|
||||
uint8_t prio; /* VLAN User Priority {0-7} */
|
||||
uint16_t encap; /* VLAN Encapsulated frame code {0-65535} */
|
||||
__be16 encap; /* VLAN Encapsulated frame code {0-65535} */
|
||||
uint8_t bitmask; /* Args bitmask bit 1=1 - ID arg,
|
||||
bit 2=1 User-Priority arg, bit 3=1 encap*/
|
||||
uint8_t invflags; /* Inverse bitmask bit 1=1 - inversed ID arg,
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
#define EBT_CONTINUE -3
|
||||
#define EBT_RETURN -4
|
||||
#define NUM_STANDARD_TARGETS 4
|
||||
/* ebtables target modules store the verdict inside an int. We can
|
||||
* reclaim a part of this int for backwards compatible extensions.
|
||||
* The 4 lsb are more than enough to store the verdict. */
|
||||
#define EBT_VERDICT_BITS 0x0000000F
|
||||
|
||||
struct ebt_counter
|
||||
{
|
||||
@@ -34,6 +38,23 @@ struct ebt_counter
|
||||
};
|
||||
|
||||
struct ebt_replace
|
||||
{
|
||||
char name[EBT_TABLE_MAXNAMELEN];
|
||||
unsigned int valid_hooks;
|
||||
/* nr of rules in the table */
|
||||
unsigned int nentries;
|
||||
/* total size of the entries */
|
||||
unsigned int entries_size;
|
||||
/* start of the chains */
|
||||
struct ebt_entries __user *hook_entry[NF_BR_NUMHOOKS];
|
||||
/* nr of counters userspace expects back */
|
||||
unsigned int num_counters;
|
||||
/* where the kernel will put the old counters */
|
||||
struct ebt_counter __user *counters;
|
||||
char __user *entries;
|
||||
};
|
||||
|
||||
struct ebt_replace_kernel
|
||||
{
|
||||
char name[EBT_TABLE_MAXNAMELEN];
|
||||
unsigned int valid_hooks;
|
||||
@@ -141,7 +162,7 @@ struct ebt_entry {
|
||||
/* this needs to be the first field */
|
||||
unsigned int bitmask;
|
||||
unsigned int invflags;
|
||||
uint16_t ethproto;
|
||||
__be16 ethproto;
|
||||
/* the physical in-dev */
|
||||
char in[IFNAMSIZ];
|
||||
/* the logical in-dev */
|
||||
@@ -251,7 +272,7 @@ struct ebt_table
|
||||
{
|
||||
struct list_head list;
|
||||
char name[EBT_TABLE_MAXNAMELEN];
|
||||
struct ebt_replace *table;
|
||||
struct ebt_replace_kernel *table;
|
||||
unsigned int valid_hooks;
|
||||
rwlock_t lock;
|
||||
/* e.g. could be the table explicitly only allows certain
|
||||
|
||||
@@ -79,7 +79,7 @@ enum nf_ip_hook_priorities {
|
||||
#ifdef __KERNEL__
|
||||
extern int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type);
|
||||
extern int ip_xfrm_me_harder(struct sk_buff **pskb);
|
||||
extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
|
||||
extern __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
|
||||
unsigned int dataoff, u_int8_t protocol);
|
||||
#endif /*__KERNEL__*/
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
header-y += ip_conntrack_helper.h
|
||||
header-y += ip_conntrack_helper_h323_asn1.h
|
||||
header-y += ip_conntrack_helper_h323_types.h
|
||||
header-y += ip_conntrack_protocol.h
|
||||
header-y += ip_conntrack_sctp.h
|
||||
header-y += ip_conntrack_tcp.h
|
||||
|
||||
@@ -277,7 +277,7 @@ extern struct ip_conntrack_expect *
|
||||
__ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple);
|
||||
|
||||
extern struct ip_conntrack_expect *
|
||||
ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple);
|
||||
ip_conntrack_expect_find_get(const struct ip_conntrack_tuple *tuple);
|
||||
|
||||
extern struct ip_conntrack_tuple_hash *
|
||||
__ip_conntrack_find(const struct ip_conntrack_tuple *tuple,
|
||||
|
||||
@@ -1,6 +1,44 @@
|
||||
#ifndef _IP_CONNTRACK_FTP_H
|
||||
#define _IP_CONNTRACK_FTP_H
|
||||
/* FTP tracking. */
|
||||
|
||||
#include <linux/netfilter/nf_conntrack_ftp.h>
|
||||
/* This enum is exposed to userspace */
|
||||
enum ip_ct_ftp_type
|
||||
{
|
||||
/* PORT command from client */
|
||||
IP_CT_FTP_PORT,
|
||||
/* PASV response from server */
|
||||
IP_CT_FTP_PASV,
|
||||
/* EPRT command from client */
|
||||
IP_CT_FTP_EPRT,
|
||||
/* EPSV response from server */
|
||||
IP_CT_FTP_EPSV,
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define FTP_PORT 21
|
||||
|
||||
#define NUM_SEQ_TO_REMEMBER 2
|
||||
/* This structure exists only once per master */
|
||||
struct ip_ct_ftp_master {
|
||||
/* Valid seq positions for cmd matching after newline */
|
||||
u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER];
|
||||
/* 0 means seq_match_aft_nl not set */
|
||||
int seq_aft_nl_num[IP_CT_DIR_MAX];
|
||||
};
|
||||
|
||||
struct ip_conntrack_expect;
|
||||
|
||||
/* For NAT to hook in when we find a packet which describes what other
|
||||
* connection we should expect. */
|
||||
extern unsigned int (*ip_nat_ftp_hook)(struct sk_buff **pskb,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
enum ip_ct_ftp_type type,
|
||||
unsigned int matchoff,
|
||||
unsigned int matchlen,
|
||||
struct ip_conntrack_expect *exp,
|
||||
u32 *seq);
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _IP_CONNTRACK_FTP_H */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h>
|
||||
#include <linux/netfilter/nf_conntrack_h323_asn1.h>
|
||||
|
||||
#define RAS_PORT 1719
|
||||
#define Q931_PORT 1720
|
||||
|
||||
@@ -102,11 +102,11 @@ static inline __be32 *gre_key(struct gre_hdr *greh)
|
||||
}
|
||||
|
||||
/* get pointer ot gre csum, if present */
|
||||
static inline u_int16_t *gre_csum(struct gre_hdr *greh)
|
||||
static inline __sum16 *gre_csum(struct gre_hdr *greh)
|
||||
{
|
||||
if (!greh->csum)
|
||||
return NULL;
|
||||
return (u_int16_t *) (greh+sizeof(*greh));
|
||||
return (__sum16 *) (greh+sizeof(*greh));
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user