* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
-#include "pppd.h"
-#include "pathnames.h"
-#include "fsm.h"
-#include "lcp.h"
-#include "ccp.h"
-#include "ipcp.h"
#include <sys/stat.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <signal.h>
#include <linux/version.h>
#include <linux/sockios.h>
+
#ifndef aligned_u64
/* should be defined in sys/types.h */
#define aligned_u64 unsigned long long __attribute__((aligned(8)))
#endif
+
#include <linux/types.h>
#include <linux/if_ether.h>
#include <linux/ppp_defs.h>
#include <linux/if_pppox.h>
#include <linux/if_pppol2tp.h>
+#include <pppd/pppd.h>
+#include <pppd/pathnames.h>
+#include <pppd/fsm.h>
+#include <pppd/lcp.h>
+#include <pppd/ccp.h>
+#include <pppd/ipcp.h>
+
+
/* should be added to system's socket.h... */
#ifndef SOL_PPPOL2TP
#define SOL_PPPOL2TP 273
#endif
-const char pppd_version[] = VERSION;
+const char pppd_version[] = PPPD_VERSION;
static int setdevname_pppol2tp(char **argv);
char buffer[128];
struct sockaddr pppol2tp;
} s;
- int len = sizeof(s);
+ socklen_t len = sizeof(s);
char **a;
int tmp;
- int tmp_len = sizeof(tmp);
+ socklen_t tmp_len = sizeof(tmp);
if (device_got_set)
return 0;
int on = 1;
int fd;
char reorderto[16];
- char tid[8];
- char sid[8];
+ char tid[12];
+ char sid[12];
if (pppol2tp_ifname[0]) {
struct ifreq ifr;
sprintf(&reorderto[0], "%d ", pppol2tp_reorder_timeout);
tid[0] = '\0';
if (pppol2tp_tunnel_id > 0)
- sprintf(&tid[0], "%hu ", pppol2tp_tunnel_id);
+ sprintf(&tid[0], "%u ", pppol2tp_tunnel_id);
sid[0] = '\0';
if (pppol2tp_session_id > 0)
- sprintf(&sid[0], "%hu ", pppol2tp_session_id);
+ sprintf(&sid[0], "%u ", pppol2tp_session_id);
dbglog("PPPoL2TP options: %s%s%s%s%s%s%s%s%sdebugmask %d",
pppol2tp_recv_seq ? "recvseq " : "",
*/
add_notifier(&ip_up_notifier, pppol2tp_ip_up, NULL);
add_notifier(&ip_down_notifier, pppol2tp_ip_down, NULL);
+#ifdef INET6
add_notifier(&ipv6_up_notifier, pppol2tp_ip_up, NULL);
add_notifier(&ipv6_down_notifier, pppol2tp_ip_down, NULL);
+#endif
}
struct channel pppol2tp_channel = {