diff options
Diffstat (limited to 'include/linux/if_pppox.h')
| -rw-r--r-- | include/linux/if_pppox.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 90b5fae5d714..27741e05446f 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
| @@ -59,7 +59,7 @@ struct sockaddr_pppox { | |||
| 59 | union{ | 59 | union{ |
| 60 | struct pppoe_addr pppoe; | 60 | struct pppoe_addr pppoe; |
| 61 | }sa_addr; | 61 | }sa_addr; |
| 62 | }__attribute__ ((packed)); | 62 | } __attribute__((packed)); |
| 63 | 63 | ||
| 64 | /* The use of the above union isn't viable because the size of this | 64 | /* The use of the above union isn't viable because the size of this |
| 65 | * struct must stay fixed over time -- applications use sizeof(struct | 65 | * struct must stay fixed over time -- applications use sizeof(struct |
| @@ -70,7 +70,16 @@ struct sockaddr_pppol2tp { | |||
| 70 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 70 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 71 | unsigned int sa_protocol; /* protocol identifier */ | 71 | unsigned int sa_protocol; /* protocol identifier */ |
| 72 | struct pppol2tp_addr pppol2tp; | 72 | struct pppol2tp_addr pppol2tp; |
| 73 | }__attribute__ ((packed)); | 73 | } __attribute__((packed)); |
| 74 | |||
| 75 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 | ||
| 76 | * bits. So we need a different sockaddr structure. | ||
| 77 | */ | ||
| 78 | struct sockaddr_pppol2tpv3 { | ||
| 79 | sa_family_t sa_family; /* address family, AF_PPPOX */ | ||
| 80 | unsigned int sa_protocol; /* protocol identifier */ | ||
| 81 | struct pppol2tpv3_addr pppol2tp; | ||
| 82 | } __attribute__((packed)); | ||
| 74 | 83 | ||
| 75 | /********************************************************************* | 84 | /********************************************************************* |
| 76 | * | 85 | * |
| @@ -92,7 +101,7 @@ struct pppoe_tag { | |||
| 92 | __be16 tag_type; | 101 | __be16 tag_type; |
| 93 | __be16 tag_len; | 102 | __be16 tag_len; |
| 94 | char tag_data[0]; | 103 | char tag_data[0]; |
| 95 | } __attribute ((packed)); | 104 | } __attribute__ ((packed)); |
| 96 | 105 | ||
| 97 | /* Tag identifiers */ | 106 | /* Tag identifiers */ |
| 98 | #define PTT_EOL __cpu_to_be16(0x0000) | 107 | #define PTT_EOL __cpu_to_be16(0x0000) |
| @@ -120,7 +129,7 @@ struct pppoe_hdr { | |||
| 120 | __be16 sid; | 129 | __be16 sid; |
| 121 | __be16 length; | 130 | __be16 length; |
| 122 | struct pppoe_tag tag[0]; | 131 | struct pppoe_tag tag[0]; |
| 123 | } __attribute__ ((packed)); | 132 | } __attribute__((packed)); |
| 124 | 133 | ||
| 125 | /* Length of entire PPPoE + PPP header */ | 134 | /* Length of entire PPPoE + PPP header */ |
| 126 | #define PPPOE_SES_HLEN 8 | 135 | #define PPPOE_SES_HLEN 8 |
