diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-09-18 03:17:10 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-09-18 03:17:10 -0400 |
commit | 21f130a2370ba837cdfc5204ebe52e7c664fec3d (patch) | |
tree | 7f8a30088d8d39eab9350c59b6638661309ffe89 /include | |
parent | bc5e8fdfc622b03acf5ac974a1b8b26da6511c99 (diff) | |
parent | c58ec93245a1fb7354f9e331960380827b9f41db (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dccp.h | 40 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 1 |
2 files changed, 30 insertions, 11 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 8bf4bacb5051..0e72708677e4 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -4,16 +4,6 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
6 | 6 | ||
7 | /* Structure describing an Internet (DCCP) socket address. */ | ||
8 | struct sockaddr_dccp { | ||
9 | __u16 sdccp_family; /* Address family */ | ||
10 | __u16 sdccp_port; /* Port number */ | ||
11 | __u32 sdccp_addr; /* Internet address */ | ||
12 | __u32 sdccp_service; /* Service */ | ||
13 | /* Pad to size of `struct sockaddr': 16 bytes . */ | ||
14 | __u32 sdccp_pad; | ||
15 | }; | ||
16 | |||
17 | /** | 7 | /** |
18 | * struct dccp_hdr - generic part of DCCP packet header | 8 | * struct dccp_hdr - generic part of DCCP packet header |
19 | * | 9 | * |
@@ -188,6 +178,9 @@ enum { | |||
188 | 178 | ||
189 | /* DCCP socket options */ | 179 | /* DCCP socket options */ |
190 | #define DCCP_SOCKOPT_PACKET_SIZE 1 | 180 | #define DCCP_SOCKOPT_PACKET_SIZE 1 |
181 | #define DCCP_SOCKOPT_SERVICE 2 | ||
182 | |||
183 | #define DCCP_SERVICE_LIST_MAX_LEN 32 | ||
191 | 184 | ||
192 | #ifdef __KERNEL__ | 185 | #ifdef __KERNEL__ |
193 | 186 | ||
@@ -382,6 +375,25 @@ enum dccp_role { | |||
382 | DCCP_ROLE_SERVER, | 375 | DCCP_ROLE_SERVER, |
383 | }; | 376 | }; |
384 | 377 | ||
378 | struct dccp_service_list { | ||
379 | __u32 dccpsl_nr; | ||
380 | __u32 dccpsl_list[0]; | ||
381 | }; | ||
382 | |||
383 | #define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1) | ||
384 | |||
385 | static inline int dccp_list_has_service(const struct dccp_service_list *sl, | ||
386 | const u32 service) | ||
387 | { | ||
388 | if (likely(sl != NULL)) { | ||
389 | u32 i = sl->dccpsl_nr; | ||
390 | while (i--) | ||
391 | if (sl->dccpsl_list[i] == service) | ||
392 | return 1; | ||
393 | } | ||
394 | return 0; | ||
395 | } | ||
396 | |||
385 | /** | 397 | /** |
386 | * struct dccp_sock - DCCP socket state | 398 | * struct dccp_sock - DCCP socket state |
387 | * | 399 | * |
@@ -417,7 +429,8 @@ struct dccp_sock { | |||
417 | __u64 dccps_gss; | 429 | __u64 dccps_gss; |
418 | __u64 dccps_gsr; | 430 | __u64 dccps_gsr; |
419 | __u64 dccps_gar; | 431 | __u64 dccps_gar; |
420 | unsigned long dccps_service; | 432 | __u32 dccps_service; |
433 | struct dccp_service_list *dccps_service_list; | ||
421 | struct timeval dccps_timestamp_time; | 434 | struct timeval dccps_timestamp_time; |
422 | __u32 dccps_timestamp_echo; | 435 | __u32 dccps_timestamp_echo; |
423 | __u32 dccps_packet_size; | 436 | __u32 dccps_packet_size; |
@@ -443,6 +456,11 @@ static inline struct dccp_sock *dccp_sk(const struct sock *sk) | |||
443 | return (struct dccp_sock *)sk; | 456 | return (struct dccp_sock *)sk; |
444 | } | 457 | } |
445 | 458 | ||
459 | static inline int dccp_service_not_initialized(const struct sock *sk) | ||
460 | { | ||
461 | return dccp_sk(sk)->dccps_service == DCCP_SERVICE_INVALID_VALUE; | ||
462 | } | ||
463 | |||
446 | static inline const char *dccp_role(const struct sock *sk) | 464 | static inline const char *dccp_role(const struct sock *sk) |
447 | { | 465 | { |
448 | switch (dccp_sk(sk)->dccps_role) { | 466 | switch (dccp_sk(sk)->dccps_role) { |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 486d1c1676bd..c49d28eca561 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -491,6 +491,7 @@ | |||
491 | #define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060 | 491 | #define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060 |
492 | 492 | ||
493 | #define PCI_VENDOR_ID_AMD 0x1022 | 493 | #define PCI_VENDOR_ID_AMD 0x1022 |
494 | #define PCI_DEVICE_ID_AMD_K8_NB 0x1100 | ||
494 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 495 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
495 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 496 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
496 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 | 497 | #define PCI_DEVICE_ID_AMD_SCSI 0x2020 |