ppp: add more pppol2tpv3 related structs from the kernel headers to fix compile issue...
[librecmc/librecmc.git] / package / network / services / ppp / patches / 430-pppol2tpv3-struct.patch
1 pppol2tp: Provide struct pppol2tpv3_addr to align with Linux
2
3 The struct pppol2tpv3_addr is referenced in the current Linux kernel sources
4 but not provided by the shipped kernel headers, add it.
5
6 Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
7
8 --- a/include/linux/if_pppol2tp.h
9 +++ b/include/linux/if_pppol2tp.h
10 @@ -32,6 +32,46 @@ struct pppol2tp_addr
11         __u16 d_tunnel, d_session;      /* For sending outgoing packets */
12  };
13  
14 +/* Structure used to connect() the socket to a particular tunnel UDP
15 + * socket over IPv6.
16 + */
17 +struct pppol2tpin6_addr
18 +{
19 +       pid_t   pid;            /* pid that owns the fd.
20 +                                        * 0 => current */
21 +       int     fd;                     /* FD of UDP socket to use */
22 +
23 +       __u16 s_tunnel, s_session;      /* For matching incoming packets */
24 +       __u16 d_tunnel, d_session;      /* For sending outgoing packets */
25 +
26 +       struct sockaddr_in6 addr;       /* IP address and port to send to */
27 +};
28 +
29 +/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
30 + * bits. So we need a different sockaddr structure.
31 + */
32 +struct pppol2tpv3_addr {
33 +       pid_t   pid;                    /* pid that owns the fd.
34 +                                        * 0 => current */
35 +       int     fd;                     /* FD of UDP or IP socket to use */
36 +
37 +       struct sockaddr_in addr;        /* IP address and port to send to */
38 +
39 +       __u32 s_tunnel, s_session;      /* For matching incoming packets */
40 +       __u32 d_tunnel, d_session;      /* For sending outgoing packets */
41 +};
42 +
43 +struct pppol2tpv3in6_addr {
44 +       pid_t   pid;            /* pid that owns the fd.
45 +                                        * 0 => current */
46 +       int     fd;                     /* FD of UDP or IP socket to use */
47 +
48 +       __u32 s_tunnel, s_session;      /* For matching incoming packets */
49 +       __u32 d_tunnel, d_session;      /* For sending outgoing packets */
50 +
51 +       struct sockaddr_in6 addr;       /* IP address and port to send to */
52 +};
53 +
54  /* Socket options:
55   * DEBUG       - bitmask of debug message categories
56   * SENDSEQ     - 0 => don't send packets with sequence numbers