diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-10-30 04:43:08 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-10-30 04:43:08 -0400 |
| commit | 169ed55bd30305b933f52bfab32a58671d44ab68 (patch) | |
| tree | 32e280957474f458901abfce16fa2a1687ef7497 /include/linux/if_pppox.h | |
| parent | 3d7851b3cdd43a734e5cc4c643fd886ab28ad4d5 (diff) | |
| parent | 45f81b1c96d9793e47ce925d257ea693ce0b193e (diff) | |
Merge branch 'tip/perf/jump-label-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent
Diffstat (limited to 'include/linux/if_pppox.h')
| -rw-r--r-- | include/linux/if_pppox.h | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 27741e05446f..397921b09ef9 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
| @@ -40,25 +40,35 @@ | |||
| 40 | * PPPoE addressing definition | 40 | * PPPoE addressing definition |
| 41 | */ | 41 | */ |
| 42 | typedef __be16 sid_t; | 42 | typedef __be16 sid_t; |
| 43 | struct pppoe_addr{ | 43 | struct pppoe_addr { |
| 44 | sid_t sid; /* Session identifier */ | 44 | sid_t sid; /* Session identifier */ |
| 45 | unsigned char remote[ETH_ALEN]; /* Remote address */ | 45 | unsigned char remote[ETH_ALEN]; /* Remote address */ |
| 46 | char dev[IFNAMSIZ]; /* Local device to use */ | 46 | char dev[IFNAMSIZ]; /* Local device to use */ |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | /************************************************************************ | 49 | /************************************************************************ |
| 50 | * Protocols supported by AF_PPPOX | 50 | * PPTP addressing definition |
| 51 | */ | 51 | */ |
| 52 | struct pptp_addr { | ||
| 53 | __be16 call_id; | ||
| 54 | struct in_addr sin_addr; | ||
| 55 | }; | ||
| 56 | |||
| 57 | /************************************************************************ | ||
| 58 | * Protocols supported by AF_PPPOX | ||
| 59 | */ | ||
| 52 | #define PX_PROTO_OE 0 /* Currently just PPPoE */ | 60 | #define PX_PROTO_OE 0 /* Currently just PPPoE */ |
| 53 | #define PX_PROTO_OL2TP 1 /* Now L2TP also */ | 61 | #define PX_PROTO_OL2TP 1 /* Now L2TP also */ |
| 54 | #define PX_MAX_PROTO 2 | 62 | #define PX_PROTO_PPTP 2 |
| 55 | 63 | #define PX_MAX_PROTO 3 | |
| 56 | struct sockaddr_pppox { | 64 | |
| 57 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 65 | struct sockaddr_pppox { |
| 58 | unsigned int sa_protocol; /* protocol identifier */ | 66 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 59 | union{ | 67 | unsigned int sa_protocol; /* protocol identifier */ |
| 60 | struct pppoe_addr pppoe; | 68 | union { |
| 61 | }sa_addr; | 69 | struct pppoe_addr pppoe; |
| 70 | struct pptp_addr pptp; | ||
| 71 | } sa_addr; | ||
| 62 | } __attribute__((packed)); | 72 | } __attribute__((packed)); |
| 63 | 73 | ||
| 64 | /* The use of the above union isn't viable because the size of this | 74 | /* The use of the above union isn't viable because the size of this |
| @@ -150,15 +160,23 @@ struct pppoe_opt { | |||
| 150 | relayed to (PPPoE relaying) */ | 160 | relayed to (PPPoE relaying) */ |
| 151 | }; | 161 | }; |
| 152 | 162 | ||
| 163 | struct pptp_opt { | ||
| 164 | struct pptp_addr src_addr; | ||
| 165 | struct pptp_addr dst_addr; | ||
| 166 | u32 ack_sent, ack_recv; | ||
| 167 | u32 seq_sent, seq_recv; | ||
| 168 | int ppp_flags; | ||
| 169 | }; | ||
| 153 | #include <net/sock.h> | 170 | #include <net/sock.h> |
| 154 | 171 | ||
| 155 | struct pppox_sock { | 172 | struct pppox_sock { |
| 156 | /* struct sock must be the first member of pppox_sock */ | 173 | /* struct sock must be the first member of pppox_sock */ |
| 157 | struct sock sk; | 174 | struct sock sk; |
| 158 | struct ppp_channel chan; | 175 | struct ppp_channel chan; |
| 159 | struct pppox_sock *next; /* for hash table */ | 176 | struct pppox_sock *next; /* for hash table */ |
| 160 | union { | 177 | union { |
| 161 | struct pppoe_opt pppoe; | 178 | struct pppoe_opt pppoe; |
| 179 | struct pptp_opt pptp; | ||
| 162 | } proto; | 180 | } proto; |
| 163 | __be16 num; | 181 | __be16 num; |
| 164 | }; | 182 | }; |
| @@ -186,7 +204,7 @@ struct pppox_proto { | |||
| 186 | struct module *owner; | 204 | struct module *owner; |
| 187 | }; | 205 | }; |
| 188 | 206 | ||
| 189 | extern int register_pppox_proto(int proto_num, struct pppox_proto *pp); | 207 | extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp); |
| 190 | extern void unregister_pppox_proto(int proto_num); | 208 | extern void unregister_pppox_proto(int proto_num); |
| 191 | extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */ | 209 | extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */ |
| 192 | extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | 210 | extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); |
