2
#include <netinet/in.h>
3
#include <linux/if_pppol2tp.h>
6
#include "utils.h" // ARRAY_SIZE
8
#define SOL_PPPOL2TP 273
10
#define NR_SOL_PPPOL2TP_OPTS ARRAY_SIZE(pppol2tp_opts)
11
static const unsigned int pppol2tp_opts[] = {
12
PPPOL2TP_SO_DEBUG, PPPOL2TP_SO_RECVSEQ, PPPOL2TP_SO_SENDSEQ, PPPOL2TP_SO_LNSMODE,
13
PPPOL2TP_SO_REORDERTO };
15
void pppol2tp_setsockopt(struct sockopt *so)
19
so->level = SOL_PPPOL2TP;
21
val = rand() % NR_SOL_PPPOL2TP_OPTS;
22
so->optname = pppol2tp_opts[val];
24
so->optval = sizeof(int);