diff options
| author | Tom Rini <trini@kernel.crashing.org> | 2004-07-28 18:17:53 -0700 |
|---|---|---|
| committer | Tom Rini <trini@kernel.crashing.org> | 2004-07-28 18:17:53 -0700 |
| commit | 4f449b971af367c8f5f19302a7464fbe734d7926 (patch) | |
| tree | 4d10df5e1f8a4cbc7e786c4b6cc6d1a7cf389045 /include/linux | |
| parent | 1992179f54d7e9ef74515eb4260ec2693129ccb6 (diff) | |
| parent | 14f010997ce934ca34acff0410fff5895a16b300 (diff) | |
[PPC32] Merge MPC52xx changes with recent CPM changes.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ata.h | 4 | ||||
| -rw-r--r-- | include/linux/atmdev.h | 2 | ||||
| -rw-r--r-- | include/linux/atmlec.h | 2 | ||||
| -rw-r--r-- | include/linux/elf.h | 7 | ||||
| -rw-r--r-- | include/linux/fs.h | 1 | ||||
| -rw-r--r-- | include/linux/genhd.h | 3 | ||||
| -rw-r--r-- | include/linux/ipmi.h | 18 | ||||
| -rw-r--r-- | include/linux/list.h | 3 | ||||
| -rw-r--r-- | include/linux/mmzone.h | 13 | ||||
| -rw-r--r-- | include/linux/net.h | 7 | ||||
| -rw-r--r-- | include/linux/nfsd/cache.h | 2 | ||||
| -rw-r--r-- | include/linux/nfsd/nfsd.h | 4 | ||||
| -rw-r--r-- | include/linux/nfsd/xdr.h | 4 | ||||
| -rw-r--r-- | include/linux/nfsd/xdr3.h | 4 | ||||
| -rw-r--r-- | include/linux/nfsd/xdr4.h | 4 | ||||
| -rw-r--r-- | include/linux/personality.h | 7 | ||||
| -rw-r--r-- | include/linux/reiserfs_fs.h | 8 | ||||
| -rw-r--r-- | include/linux/sched.h | 8 | ||||
| -rw-r--r-- | include/linux/serial_core.h | 3 | ||||
| -rw-r--r-- | include/linux/snmp.h | 266 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc.h | 10 | ||||
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 14 |
22 files changed, 355 insertions, 39 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 7a99d7ee2f89..4b6d0e417c4e 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -209,8 +209,8 @@ struct ata_taskfile { #define ata_id_has_lba48(dev) ((dev)->id[83] & (1 << 10)) #define ata_id_has_wcache(dev) ((dev)->id[82] & (1 << 5)) #define ata_id_has_pm(dev) ((dev)->id[82] & (1 << 3)) -#define ata_id_has_lba(dev) ((dev)->id[49] & (1 << 8)) -#define ata_id_has_dma(dev) ((dev)->id[49] & (1 << 9)) +#define ata_id_has_lba(dev) ((dev)->id[49] & (1 << 9)) +#define ata_id_has_dma(dev) ((dev)->id[49] & (1 << 8)) #define ata_id_removeable(dev) ((dev)->id[0] & (1 << 7)) #define ata_id_u32(dev,n) \ (((u32) (dev)->id[(n) + 1] << 16) | ((u32) (dev)->id[(n)])) diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index b19303d3fa6b..ad454dadd221 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h @@ -147,7 +147,7 @@ struct atm_dev_stats { struct atm_iobuf { int length; - void *buffer; + void __user *buffer; }; /* for ATM_GETCIRANGE / ATM_SETCIRANGE */ diff --git a/include/linux/atmlec.h b/include/linux/atmlec.h index dd6b349a040a..f267f2442766 100644 --- a/include/linux/atmlec.h +++ b/include/linux/atmlec.h @@ -2,7 +2,7 @@ * * ATM Lan Emulation Daemon vs. driver interface * - * carnil@cs.tut.fi + * mkiiskila@yahoo.com * */ diff --git a/include/linux/elf.h b/include/linux/elf.h index f8115ac02b51..8d0dd82cc392 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h @@ -4,6 +4,13 @@ #include <linux/types.h> #include <asm/elf.h> +#ifndef elf_read_implies_exec + /* Executables for which elf_read_implies_exec() returns TRUE will + have the READ_IMPLIES_EXEC personality flag set automatically. + Override in asm/elf.h as needed. */ +# define elf_read_implies_exec(ex, have_pt_gnu_stack) 0 +#endif + /* 32-bit ELF base types. */ typedef __u32 Elf32_Addr; typedef __u16 Elf32_Half; diff --git a/include/linux/fs.h b/include/linux/fs.h index 819e67e3a95b..7f64f2b2cada 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -356,6 +356,7 @@ struct block_device { struct block_device * bd_contains; unsigned bd_block_size; struct hd_struct * bd_part; + /* number of times partitions within this device have been opened. */ unsigned bd_part_count; int bd_invalidated; struct gendisk * bd_disk; diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 91443522b9d8..884d18df6716 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -82,7 +82,8 @@ struct disk_stats { struct gendisk { int major; /* major number of driver */ int first_minor; - int minors; + int minors; /* maximum number of minors, =1 for + * disks that can't be partitioned. */ char disk_name[32]; /* name of major driver */ struct hd_struct **part; /* [indexed by minor] */ struct block_device_operations *fops; diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 91e49f83268c..4a448922be5b 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h @@ -159,6 +159,14 @@ struct ipmi_msg unsigned char netfn; unsigned char cmd; unsigned short data_len; + unsigned char __user *data; +}; + +struct kernel_ipmi_msg +{ + unsigned char netfn; + unsigned char cmd; + unsigned short data_len; unsigned char *data; }; @@ -223,7 +231,7 @@ struct ipmi_recv_msg ipmi_user_t user; struct ipmi_addr addr; long msgid; - struct ipmi_msg msg; + struct kernel_ipmi_msg msg; /* The user_msg_data is the data supplied when a message was sent, if this is a response to a sent message. If this is @@ -316,7 +324,7 @@ unsigned char ipmi_get_my_LUN(ipmi_user_t user); int ipmi_request(ipmi_user_t user, struct ipmi_addr *addr, long msgid, - struct ipmi_msg *msg, + struct kernel_ipmi_msg *msg, void *user_msg_data, int priority); @@ -336,7 +344,7 @@ int ipmi_request(ipmi_user_t user, int ipmi_request_settime(ipmi_user_t user, struct ipmi_addr *addr, long msgid, - struct ipmi_msg *msg, + struct kernel_ipmi_msg *msg, void *user_msg_data, int priority, int max_retries, @@ -348,7 +356,7 @@ int ipmi_request_settime(ipmi_user_t user, int ipmi_request_with_source(ipmi_user_t user, struct ipmi_addr *addr, long msgid, - struct ipmi_msg *msg, + struct kernel_ipmi_msg *msg, void *user_msg_data, int priority, unsigned char source_address, @@ -366,7 +374,7 @@ int ipmi_request_with_source(ipmi_user_t user, int ipmi_request_supply_msgs(ipmi_user_t user, struct ipmi_addr *addr, long msgid, - struct ipmi_msg *msg, + struct kernel_ipmi_msg *msg, void *user_msg_data, void *supplied_smi, struct ipmi_recv_msg *supplied_recv, diff --git a/include/linux/list.h b/include/linux/list.h index 9e0c971ded6f..92127ae0e995 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -620,13 +620,12 @@ static inline void hlist_add_after(struct hlist_node *n, #define hlist_entry(ptr, type, member) container_of(ptr,type,member) -/* Cannot easily do prefetch unfortunately */ #define hlist_for_each(pos, head) \ for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \ pos = pos->next) #define hlist_for_each_safe(pos, n, head) \ - for (pos = (head)->first; n = pos ? pos->next : 0, pos; \ + for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \ pos = n) /** diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 2cbfea5dd5e5..8958b0e6af06 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -345,6 +345,15 @@ static inline struct zone *next_zone(struct zone *zone) #define for_each_zone(zone) \ for (zone = pgdat_list->node_zones; zone; zone = next_zone(zone)) +static inline int is_highmem_idx(int idx) +{ + return (idx == ZONE_HIGHMEM); +} + +static inline int is_normal_idx(int idx) +{ + return (idx == ZONE_NORMAL); +} /** * is_highmem - helper function to quickly check if a struct zone is a * highmem zone or not. This is an attempt to keep references @@ -353,12 +362,12 @@ static inline struct zone *next_zone(struct zone *zone) */ static inline int is_highmem(struct zone *zone) { - return (zone - zone->zone_pgdat->node_zones == ZONE_HIGHMEM); + return (is_highmem_idx(zone - zone->zone_pgdat->node_zones)); } static inline int is_normal(struct zone *zone) { - return (zone - zone->zone_pgdat->node_zones == ZONE_NORMAL); + return (is_normal_idx(zone - zone->zone_pgdat->node_zones)); } /* These two functions are used to setup the per zone pages min values */ diff --git a/include/linux/net.h b/include/linux/net.h index a4684166dc0c..cec1482f28e2 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -142,6 +142,7 @@ struct net_proto_family { }; struct iovec; +struct kvec; extern int sock_wake_async(struct socket *sk, int how, int band); extern int sock_register(struct net_proto_family *fam); @@ -169,6 +170,12 @@ extern int net_ratelimit(void); extern unsigned long net_random(void); extern void net_srandom(unsigned long); +extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, + struct kvec *vec, size_t num, size_t len); +extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg, + struct kvec *vec, size_t num, + size_t len, int flags); + #ifndef CONFIG_SMP #define SOCKOPS_WRAPPED(name) name #define SOCKOPS_WRAP(name, fam) diff --git a/include/linux/nfsd/cache.h b/include/linux/nfsd/cache.h index 25d2c099e51e..cfffc76fc1e1 100644 --- a/include/linux/nfsd/cache.h +++ b/include/linux/nfsd/cache.h @@ -33,7 +33,7 @@ struct svc_cacherep { u32 c_vers; unsigned long c_timestamp; union { - struct iovec u_vec; + struct kvec u_vec; u32 u_status; } c_u; }; diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 520f00b1e8c3..5757370b0a23 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h @@ -92,9 +92,9 @@ int nfsd_open(struct svc_rqst *, struct svc_fh *, int, int, struct file *); void nfsd_close(struct file *); int nfsd_read(struct svc_rqst *, struct svc_fh *, - loff_t, struct iovec *,int, unsigned long *); + loff_t, struct kvec *,int, unsigned long *); int nfsd_write(struct svc_rqst *, struct svc_fh *, - loff_t, struct iovec *,int, unsigned long, int *); + loff_t, struct kvec *,int, unsigned long, int *); int nfsd_readlink(struct svc_rqst *, struct svc_fh *, char *, int *); int nfsd_symlink(struct svc_rqst *, struct svc_fh *, diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h index 0164bd1fc109..ecccef777dae 100644 --- a/include/linux/nfsd/xdr.h +++ b/include/linux/nfsd/xdr.h @@ -30,7 +30,7 @@ struct nfsd_readargs { struct svc_fh fh; __u32 offset; __u32 count; - struct iovec vec[RPCSVC_MAXPAGES]; + struct kvec vec[RPCSVC_MAXPAGES]; int vlen; }; @@ -38,7 +38,7 @@ struct nfsd_writeargs { svc_fh fh; __u32 offset; int len; - struct iovec vec[RPCSVC_MAXPAGES]; + struct kvec vec[RPCSVC_MAXPAGES]; int vlen; }; diff --git a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h index 13afff34607f..0ae9e0ef5f68 100644 --- a/include/linux/nfsd/xdr3.h +++ b/include/linux/nfsd/xdr3.h @@ -33,7 +33,7 @@ struct nfsd3_readargs { struct svc_fh fh; __u64 offset; __u32 count; - struct iovec vec[RPCSVC_MAXPAGES]; + struct kvec vec[RPCSVC_MAXPAGES]; int vlen; }; @@ -43,7 +43,7 @@ struct nfsd3_writeargs { __u32 count; int stable; int len; - struct iovec vec[RPCSVC_MAXPAGES]; + struct kvec vec[RPCSVC_MAXPAGES]; int vlen; }; diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 9201a4763d17..ff18ed764958 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h @@ -241,7 +241,7 @@ struct nfsd4_read { stateid_t rd_stateid; /* request */ u64 rd_offset; /* request */ u32 rd_length; /* request */ - struct iovec rd_iov[RPCSVC_MAXPAGES]; + struct kvec rd_iov[RPCSVC_MAXPAGES]; int rd_vlen; struct svc_rqst *rd_rqstp; /* response */ @@ -324,7 +324,7 @@ struct nfsd4_write { u64 wr_offset; /* request */ u32 wr_stable_how; /* request */ u32 wr_buflen; /* request */ - struct iovec wr_vec[RPCSVC_MAXPAGES]; /* request */ + struct kvec wr_vec[RPCSVC_MAXPAGES]; /* request */ int wr_vlen; u32 wr_bytes_written; /* response */ diff --git a/include/linux/personality.h b/include/linux/personality.h index 14b91221d3e8..9b009b6754f6 100644 --- a/include/linux/personality.h +++ b/include/linux/personality.h @@ -30,6 +30,7 @@ extern int abi_fake_utsname; */ enum { MMAP_PAGE_ZERO = 0x0100000, + READ_IMPLIES_EXEC = 0x0400000, ADDR_LIMIT_32BIT = 0x0800000, SHORT_INODE = 0x1000000, WHOLE_SECONDS = 0x2000000, @@ -38,6 +39,12 @@ enum { }; /* + * Security-relevant compatibility flags that must be + * cleared upon setuid or setgid exec: + */ +#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC) + +/* * Personality types. * * These go in the low byte. Avoid using the top bit, it will diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index ad6b8bd97822..1784fb0a9369 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h @@ -630,8 +630,8 @@ static inline loff_t le_ih_k_type (const struct item_head * ih) static inline void set_le_key_k_offset (int version, struct key * key, loff_t offset) { (version == KEY_FORMAT_3_5) ? - (key->u.k_offset_v1.k_offset = cpu_to_le32 (offset)) : /* jdm check */ - (set_offset_v2_k_offset( &(key->u.k_offset_v2), offset )); + (void)(key->u.k_offset_v1.k_offset = cpu_to_le32 (offset)) : /* jdm check */ + (void)(set_offset_v2_k_offset( &(key->u.k_offset_v2), offset )); } @@ -644,8 +644,8 @@ static inline void set_le_ih_k_offset (struct item_head * ih, loff_t offset) static inline void set_le_key_k_type (int version, struct key * key, int type) { (version == KEY_FORMAT_3_5) ? - (key->u.k_offset_v1.k_uniqueness = cpu_to_le32(type2uniqueness(type))): - (set_offset_v2_k_type( &(key->u.k_offset_v2), type )); + (void)(key->u.k_offset_v1.k_uniqueness = cpu_to_le32(type2uniqueness(type))): + (void)(set_offset_v2_k_type( &(key->u.k_offset_v2), type )); } static inline void set_le_ih_k_type (struct item_head * ih, int type) { diff --git a/include/linux/sched.h b/include/linux/sched.h index 4dcbe972d5b5..e752fed52204 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -410,6 +410,10 @@ struct task_struct { unsigned int time_slice, first_time_slice; struct list_head tasks; + /* + * ptrace_list/ptrace_children forms the list of my children + * that were stolen by a ptracer. + */ struct list_head ptrace_children; struct list_head ptrace_list; @@ -431,6 +435,10 @@ struct task_struct { */ struct task_struct *real_parent; /* real parent process (when being debugged) */ struct task_struct *parent; /* parent process */ + /* + * children/sibling forms the list of my children plus the + * tasks I'm ptracing. + */ struct list_head children; /* list of my children */ struct list_head sibling; /* linkage in my parent's children list */ struct task_struct *group_leader; /* threadgroup leader */ diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 1ad37531b7ad..e7e8bb92aa32 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -86,6 +86,9 @@ /* PPC CPM type number */ #define PORT_CPM 58 +/* MPC52xx type numbers */ +#define PORT_MPC52xx 59 + #ifdef __KERNEL__ #include <linux/config.h> diff --git a/include/linux/snmp.h b/include/linux/snmp.h new file mode 100644 index 000000000000..4db25d5c7cd1 --- /dev/null +++ b/include/linux/snmp.h @@ -0,0 +1,266 @@ +/* + * Definitions for MIBs + * + * Author: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> + */ + +#ifndef _LINUX_SNMP_H +#define _LINUX_SNMP_H + +/* ipstats mib definitions */ +/* + * RFC 1213: MIB-II + * RFC 2011 (updates 1213): SNMPv2-MIB-IP + * RFC 2863: Interfaces Group MIB + * RFC 2465: IPv6 MIB: General Group + * draft-ietf-ipv6-rfc2011-update-10.txt: MIB for IP: IP Statistics Tables + */ +enum +{ + IPSTATS_MIB_NUM = 0, + IPSTATS_MIB_INRECEIVES, /* InReceives */ + IPSTATS_MIB_INHDRERRORS, /* InHdrErrors */ + IPSTATS_MIB_INTOOBIGERRORS, /* InTooBigErrors */ + IPSTATS_MIB_INNOROUTES, /* InNoRoutes */ + IPSTATS_MIB_INADDRERRORS, /* InAddrErrors */ + IPSTATS_MIB_INUNKNOWNPROTOS, /* InUnknownProtos */ + IPSTATS_MIB_INTRUNCATEDPKTS, /* InTruncatedPkts */ + IPSTATS_MIB_INDISCARDS, /* InDiscards */ + IPSTATS_MIB_INDELIVERS, /* InDelivers */ + IPSTATS_MIB_OUTFORWDATAGRAMS, /* OutForwDatagrams */ + IPSTATS_MIB_OUTREQUESTS, /* OutRequests */ + IPSTATS_MIB_OUTDISCARDS, /* OutDiscards */ + IPSTATS_MIB_OUTNOROUTES, /* OutNoRoutes */ + IPSTATS_MIB_REASMTIMEOUT, /* ReasmTimeout */ + IPSTATS_MIB_REASMREQDS, /* ReasmReqds */ + IPSTATS_MIB_REASMOKS, /* ReasmOKs */ + IPSTATS_MIB_REASMFAILS, /* ReasmFails */ + IPSTATS_MIB_FRAGOKS, /* FragOKs */ + IPSTATS_MIB_FRAGFAILS, /* FragFails */ + IPSTATS_MIB_FRAGCREATES, /* FragCreates */ + IPSTATS_MIB_INMCASTPKTS, /* InMcastPkts */ + IPSTATS_MIB_OUTMCASTPKTS, /* OutMcastPkts */ + __IPSTATS_MIB_MAX +}; + +/* icmp mib definitions */ +/* + * RFC 1213: MIB-II ICMP Group + * RFC 2011 (updates 1213): SNMPv2 MIB for IP: ICMP group + */ +enum +{ + ICMP_MIB_NUM = 0, + ICMP_MIB_INMSGS, /* InMsgs */ + ICMP_MIB_INERRORS, /* InErrors */ + ICMP_MIB_INDESTUNREACHS, /* InDestUnreachs */ + ICMP_MIB_INTIMEEXCDS, /* InTimeExcds */ + ICMP_MIB_INPARMPROBS, /* InParmProbs */ + ICMP_MIB_INSRCQUENCHS, /* InSrcQuenchs */ + ICMP_MIB_INREDIRECTS, /* InRedirects */ + ICMP_MIB_INECHOS, /* InEchos */ + ICMP_MIB_INECHOREPS, /* InEchoReps */ + ICMP_MIB_INTIMESTAMPS, /* InTimestamps */ + ICMP_MIB_INTIMESTAMPREPS, /* InTimestampReps */ + ICMP_MIB_INADDRMASKS, /* InAddrMasks */ + ICMP_MIB_INADDRMASKREPS, /* InAddrMaskReps */ + ICMP_MIB_OUTMSGS, /* OutMsgs */ + ICMP_MIB_OUTERRORS, /* OutErrors */ + ICMP_MIB_OUTDESTUNREACHS, /* OutDestUnreachs */ + ICMP_MIB_OUTTIMEEXCDS, /* OutTimeExcds */ + ICMP_MIB_OUTPARMPROBS, /* OutParmProbs */ + ICMP_MIB_OUTSRCQUENCHS, /* OutSrcQuenchs */ + ICMP_MIB_OUTREDIRECTS, /* OutRedirects */ + ICMP_MIB_OUTECHOS, /* OutEchos */ + ICMP_MIB_OUTECHOREPS, /* OutEchoReps */ + ICMP_MIB_OUTTIMESTAMPS, /* OutTimestamps */ + ICMP_MIB_OUTTIMESTAMPREPS, /* OutTimestampReps */ + ICMP_MIB_OUTADDRMASKS, /* OutAddrMasks */ + ICMP_MIB_OUTADDRMASKREPS, /* OutAddrMaskReps */ + __ICMP_MIB_MAX +}; + +/* icmp6 mib definitions */ +/* + * RFC 2466: ICMPv6-MIB + */ +enum +{ + ICMP6_MIB_NUM = 0, + ICMP6_MIB_INMSGS, /* InMsgs */ + ICMP6_MIB_INERRORS, /* InErrors */ + ICMP6_MIB_INDESTUNREACHS, /* InDestUnreachs */ + ICMP6_MIB_INPKTTOOBIGS, /* InPktTooBigs */ + ICMP6_MIB_INTIMEEXCDS, /* InTimeExcds */ + ICMP6_MIB_INPARMPROBLEMS, /* InParmProblems */ + ICMP6_MIB_INECHOS, /* InEchos */ + ICMP6_MIB_INECHOREPLIES, /* InEchoReplies */ + ICMP6_MIB_INGROUPMEMBQUERIES, /* InGroupMembQueries */ + ICMP6_MIB_INGROUPMEMBRESPONSES, /* InGroupMembResponses */ + ICMP6_MIB_INGROUPMEMBREDUCTIONS, /* InGroupMembReductions */ + ICMP6_MIB_INROUTERSOLICITS, /* InRouterSolicits */ + ICMP6_MIB_INROUTERADVERTISEMENTS, /* InRouterAdvertisements */ + ICMP6_MIB_INNEIGHBORSOLICITS, /* InNeighborSolicits */ + ICMP6_MIB_INNEIGHBORADVERTISEMENTS, /* InNeighborAdvertisements */ + ICMP6_MIB_INREDIRECTS, /* InRedirects */ + ICMP6_MIB_OUTMSGS, /* OutMsgs */ + ICMP6_MIB_OUTDESTUNREACHS, /* OutDestUnreachs */ + ICMP6_MIB_OUTPKTTOOBIGS, /* OutPktTooBigs */ + ICMP6_MIB_OUTTIMEEXCDS, /* OutTimeExcds */ + ICMP6_MIB_OUTPARMPROBLEMS, /* OutParmProblems */ + ICMP6_MIB_OUTECHOREPLIES, /* OutEchoReplies */ + ICMP6_MIB_OUTROUTERSOLICITS, /* OutRouterSolicits */ + ICMP6_MIB_OUTNEIGHBORSOLICITS, /* OutNeighborSolicits */ + ICMP6_MIB_OUTNEIGHBORADVERTISEMENTS, /* OutNeighborAdvertisements */ + ICMP6_MIB_OUTREDIRECTS, /* OutRedirects */ + ICMP6_MIB_OUTGROUPMEMBRESPONSES, /* OutGroupMembResponses */ + ICMP6_MIB_OUTGROUPMEMBREDUCTIONS, /* OutGroupMembReductions */ + __ICMP6_MIB_MAX +}; + +/* tcp mib definitions */ +/* + * RFC 1213: MIB-II TCP group + * RFC 2012 (updates 1213): SNMPv2-MIB-TCP + */ +enum +{ + TCP_MIB_NUM = 0, + TCP_MIB_RTOALGORITHM, /* RtoAlgorithm */ + TCP_MIB_RTOMIN, /* RtoMin */ + TCP_MIB_RTOMAX, /* RtoMax */ + TCP_MIB_MAXCONN, /* MaxConn */ + TCP_MIB_ACTIVEOPENS, /* ActiveOpens */ + TCP_MIB_PASSIVEOPENS, /* PassiveOpens */ + TCP_MIB_ATTEMPTFAILS, /* AttemptFails */ + TCP_MIB_ESTABRESETS, /* EstabResets */ + TCP_MIB_CURRESTAB, /* CurrEstab */ + TCP_MIB_INSEGS, /* InSegs */ + TCP_MIB_OUTSEGS, /* OutSegs */ + TCP_MIB_RETRANSSEGS, /* RetransSegs */ + TCP_MIB_INERRS, /* InErrs */ + TCP_MIB_OUTRSTS, /* OutRsts */ + __TCP_MIB_MAX +}; + +/* udp mib definitions */ +/* + * RFC 1213: MIB-II UDP group + * RFC 2013 (updates 1213): SNMPv2-MIB-UDP + */ +enum +{ + UDP_MIB_NUM = 0, + UDP_MIB_INDATAGRAMS, /* InDatagrams */ + UDP_MIB_NOPORTS, /* NoPorts */ + UDP_MIB_INERRORS, /* InErrors */ + UDP_MIB_OUTDATAGRAMS, /* OutDatagrams */ + __UDP_MIB_MAX +}; + +/* sctp mib definitions */ +/* + * draft-ietf-sigtran-sctp-mib-07.txt + */ +enum +{ + SCTP_MIB_NUM = 0, + SCTP_MIB_CURRESTAB, /* CurrEstab */ + SCTP_MIB_ACTIVEESTABS, /* ActiveEstabs */ + SCTP_MIB_PASSIVEESTABS, /* PassiveEstabs */ + SCTP_MIB_ABORTEDS, /* Aborteds */ + SCTP_MIB_SHUTDOWNS, /* Shutdowns */ + SCTP_MIB_OUTOFBLUES, /* OutOfBlues */ + SCTP_MIB_CHECKSUMERRORS, /* ChecksumErrors */ + SCTP_MIB_OUTCTRLCHUNKS, /* OutCtrlChunks */ + SCTP_MIB_OUTORDERCHUNKS, /* OutOrderChunks */ + SCTP_MIB_OUTUNORDERCHUNKS, /* OutUnorderChunks */ + SCTP_MIB_INCTRLCHUNKS, /* InCtrlChunks */ + SCTP_MIB_INORDERCHUNKS, /* InOrderChunks */ + SCTP_MIB_INUNORDERCHUNKS, /* InUnorderChunks */ + SCTP_MIB_FRAGUSRMSGS, /* FragUsrMsgs */ + SCTP_MIB_REASMUSRMSGS, /* ReasmUsrMsgs */ + SCTP_MIB_OUTSCTPPACKS, /* OutSCTPPacks */ + SCTP_MIB_INSCTPPACKS, /* InSCTPPacks */ + SCTP_MIB_RTOALGORITHM, /* RtoAlgorithm */ + SCTP_MIB_RTOMIN, /* RtoMin */ + SCTP_MIB_RTOMAX, /* RtoMax */ + SCTP_MIB_RTOINITIAL, /* RtoInitial */ + SCTP_MIB_VALCOOKIELIFE, /* ValCookieLife */ + SCTP_MIB_MAXINITRETR, /* MaxInitRetr */ + __SCTP_MIB_MAX +}; + +/* linux mib definitions */ +enum +{ + LINUX_MIB_NUM = 0, + LINUX_MIB_SYNCOOKIESSENT, /* SyncookiesSent */ + LINUX_MIB_SYNCOOKIESRECV, /* SyncookiesRecv */ + LINUX_MIB_SYNCOOKIESFAILED, /* SyncookiesFailed */ + LINUX_MIB_EMBRYONICRSTS, /* EmbryonicRsts */ + LINUX_MIB_PRUNECALLED, /* PruneCalled */ + LINUX_MIB_RCVPRUNED, /* RcvPruned */ + LINUX_MIB_OFOPRUNED, /* OfoPruned */ + LINUX_MIB_OUTOFWINDOWICMPS, /* OutOfWindowIcmps */ + LINUX_MIB_LOCKDROPPEDICMPS, /* LockDroppedIcmps */ + LINUX_MIB_ARPFILTER, /* ArpFilter */ + LINUX_MIB_TIMEWAITED, /* TimeWaited */ + LINUX_MIB_TIMEWAITRECYCLED, /* TimeWaitRecycled */ + LINUX_MIB_TIMEWAITKILLED, /* TimeWaitKilled */ + LINUX_MIB_PAWSPASSIVEREJECTED, /* PAWSPassiveRejected */ + LINUX_MIB_PAWSACTIVEREJECTED, /* PAWSActiveRejected */ + LINUX_MIB_PAWSESTABREJECTED, /* PAWSEstabRejected */ + LINUX_MIB_DELAYEDACKS, /* DelayedACKs */ + LINUX_MIB_DELAYEDACKLOCKED, /* DelayedACKLocked */ + LINUX_MIB_DELAYEDACKLOST, /* DelayedACKLost */ + LINUX_MIB_LISTENOVERFLOWS, /* ListenOverflows */ + LINUX_MIB_LISTENDROPS, /* ListenDrops */ + LINUX_MIB_TCPPREQUEUED, /* TCPPrequeued */ + LINUX_MIB_TCPDIRECTCOPYFROMBACKLOG, /* TCPDirectCopyFromBacklog */ + LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE, /* TCPDirectCopyFromPrequeue */ + LINUX_MIB_TCPPREQUEUEDROPPED, /* TCPPrequeueDropped */ + LINUX_MIB_TCPHPHITS, /* TCPHPHits */ + LINUX_MIB_TCPHPHITSTOUSER, /* TCPHPHitsToUser */ + LINUX_MIB_TCPPUREACKS, /* TCPPureAcks */ + LINUX_MIB_TCPHPACKS, /* TCPHPAcks */ + LINUX_MIB_TCPRENORECOVERY, /* TCPRenoRecovery */ + LINUX_MIB_TCPSACKRECOVERY, /* TCPSackRecovery */ + LINUX_MIB_TCPSACKRENEGING, /* TCPSACKReneging */ + LINUX_MIB_TCPFACKREORDER, /* TCPFACKReorder */ + LINUX_MIB_TCPSACKREORDER, /* TCPSACKReorder */ + LINUX_MIB_TCPRENOREORDER, /* TCPRenoReorder */ + LINUX_MIB_TCPTSREORDER, /* TCPTSReorder */ + LINUX_MIB_TCPFULLUNDO, /* TCPFullUndo */ + LINUX_MIB_TCPPARTIALUNDO, /* TCPPartialUndo */ + LINUX_MIB_TCPDSACKUNDO, /* TCPDSACKUndo */ + LINUX_MIB_TCPLOSSUNDO, /* TCPLossUndo */ + LINUX_MIB_TCPLOSS, /* TCPLoss */ + LINUX_MIB_TCPLOSTRETRANSMIT, /* TCPLostRetransmit */ + LINUX_MIB_TCPRENOFAILURES, /* TCPRenoFailures */ + LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */ + LINUX_MIB_TCPLOSSFAILURES, /* TCPLossFailures */ + LINUX_MIB_TCPFASTRETRANS, /* TCPFastRetrans */ + LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */ + LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */ + LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */ + LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */ + LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */ + LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */ + LINUX_MIB_TCPRCVCOLLAPSED, /* TCPRcvCollapsed */ + LINUX_MIB_TCPDSACKOLDSENT, /* TCPDSACKOldSent */ + LINUX_MIB_TCPDSACKOFOSENT, /* TCPDSACKOfoSent */ + LINUX_MIB_TCPDSACKRECV, /* TCPDSACKRecv */ + LINUX_MIB_TCPDSACKOFORECV, /* TCPDSACKOfoRecv */ + LINUX_MIB_TCPABORTONSYN, /* TCPAbortOnSyn */ + LINUX_MIB_TCPABORTONDATA, /* TCPAbortOnData */ + LINUX_MIB_TCPABORTONCLOSE, /* TCPAbortOnClose */ + LINUX_MIB_TCPABORTONMEMORY, /* TCPAbortOnMemory */ + LINUX_MIB_TCPABORTONTIMEOUT, /* TCPAbortOnTimeout */ + LINUX_MIB_TCPABORTONLINGER, /* TCPAbortOnLinger */ + LINUX_MIB_TCPABORTFAILED, /* TCPAbortFailed */ + LINUX_MIB_TCPMEMORYPRESSURES, /* TCPMemoryPressures */ + __LINUX_MIB_MAX +}; + +#endif /* _LINUX_SNMP_H */ diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 980f2a4e4899..7abde582f9db 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -67,7 +67,7 @@ struct svc_serv { * read responses (that have a header, and some data pages, and possibly * a tail) and means we can share some client side routines. * - * The xdr_buf.head iovec always points to the first page in the rq_*pages + * The xdr_buf.head kvec always points to the first page in the rq_*pages * list. The xdr_buf.pages pointer points to the second page on that * list. xdr_buf.tail points to the end of the first page. * This assumes that the non-page part of an rpc reply will fit @@ -78,7 +78,7 @@ struct svc_serv { */ #define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 2) -static inline u32 svc_getu32(struct iovec *iov) +static inline u32 svc_getu32(struct kvec *iov) { u32 val, *vp; vp = iov->iov_base; @@ -87,7 +87,7 @@ static inline u32 svc_getu32(struct iovec *iov) iov->iov_len -= sizeof(u32); return val; } -static inline void svc_putu32(struct iovec *iov, u32 val) +static inline void svc_putu32(struct kvec *iov, u32 val) { u32 *vp = iov->iov_base + iov->iov_len; *vp = val; @@ -162,14 +162,14 @@ static inline int xdr_argsize_check(struct svc_rqst *rqstp, u32 *p) { char *cp = (char *)p; - struct iovec *vec = &rqstp->rq_arg.head[0]; + struct kvec *vec = &rqstp->rq_arg.head[0]; return cp - (char*)vec->iov_base <= vec->iov_len; } static inline int xdr_ressize_check(struct svc_rqst *rqstp, u32 *p) { - struct iovec *vec = &rqstp->rq_res.head[0]; + struct kvec *vec = &rqstp->rq_res.head[0]; char *cp = (char*)p; vec->iov_len = cp - (char*)vec->iov_base; diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 0b9aecd9b8c3..112738cca4e1 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h @@ -48,7 +48,7 @@ typedef int (*kxdrproc_t)(void *rqstp, u32 *data, void *obj); * operations and/or has a need for scatter/gather involving pages. */ struct xdr_buf { - struct iovec head[1], /* RPC header + non-page data */ + struct kvec head[1], /* RPC header + non-page data */ tail[1]; /* Appended after page data */ struct page ** pages; /* Array of contiguous pages */ @@ -127,15 +127,15 @@ xdr_decode_hyper(u32 *p, __u64 *valp) } /* - * Adjust iovec to reflect end of xdr'ed data (RPC client XDR) + * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) */ static inline int -xdr_adjust_iovec(struct iovec *iov, u32 *p) +xdr_adjust_iovec(struct kvec *iov, u32 *p) { return iov->iov_len = ((u8 *) p - (u8 *) iov->iov_base); } -void xdr_shift_iovec(struct iovec *, int, size_t); +void xdr_shift_iovec(struct kvec *, int, size_t); /* * Maximum number of iov's we use. @@ -145,11 +145,11 @@ void xdr_shift_iovec(struct iovec *, int, size_t); /* * XDR buffer helper functions */ -extern int xdr_kmap(struct iovec *, struct xdr_buf *, size_t); +extern int xdr_kmap(struct kvec *, struct xdr_buf *, size_t); extern void xdr_kunmap(struct xdr_buf *, size_t); extern void xdr_shift_buf(struct xdr_buf *, size_t); extern void _copy_from_pages(char *, struct page **, size_t, size_t); -extern void xdr_buf_from_iov(struct iovec *, struct xdr_buf *); +extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *); extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, int, int); extern int xdr_buf_read_netobj(struct xdr_buf *, struct xdr_netobj *, int); extern int read_bytes_from_xdr_buf(struct xdr_buf *buf, int base, void *obj, int len); @@ -182,7 +182,7 @@ struct xdr_stream { struct xdr_buf *buf; /* XDR buffer to read/write */ uint32_t *end; /* end of available buffer space */ - struct iovec *iov; /* pointer to the current iovec */ + struct kvec *iov; /* pointer to the current kvec */ }; extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p); |
