]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/pppd.h
Use systemd's sd_notify with option up_sdnotify
[ppp.git] / pppd / pppd.h
index 936cc606f318f959dc21c135f5cab30f2a45a537..6e3743fd9c97de74caf9638e717aa60525bebabb 100644 (file)
 #define MAXARGS                1       /* max # args to a command */
 #define MAXNAMELEN     256     /* max length of hostname or name for auth */
 #define MAXSECRETLEN   256     /* max length of password or secret */
+#define MAXIFNAMELEN   32      /* max length of interface name; or use IFNAMSIZ, can we
+                                  always include net/if.h? */
+
+/*
+ * If PPP_DRV_NAME is not defined, use the default "ppp" as the device name.
+ * Where should PPP_DRV_NAME come from? Do we include it here?
+ */
+#if !defined(PPP_DRV_NAME)
+#define PPP_DRV_NAME   "ppp"
+#endif /* !defined(PPP_DRV_NAME) */
 
 /*
  * Option descriptor structure.
@@ -258,8 +268,10 @@ extern struct notifier *pidchange;   /* for notifications of pid changing */
 extern struct notifier *phasechange; /* for notifications of phase changes */
 extern struct notifier *exitnotify;  /* for notification that we're exiting */
 extern struct notifier *sigreceived; /* notification of received signal */
-extern struct notifier *ip_up_notifier; /* IPCP has come up */
-extern struct notifier *ip_down_notifier; /* IPCP has gone down */
+extern struct notifier *ip_up_notifier;     /* IPCP has come up */
+extern struct notifier *ip_down_notifier;   /* IPCP has gone down */
+extern struct notifier *ipv6_up_notifier;   /* IPV6CP has come up */
+extern struct notifier *ipv6_down_notifier; /* IPV6CP has gone down */
 extern struct notifier *auth_up_notifier; /* peer has authenticated */
 extern struct notifier *link_down_notifier; /* link has gone down */
 extern struct notifier *fork_notifier; /* we are a new child process */
@@ -277,12 +289,17 @@ extern int        kdebugflag;     /* Tell kernel to print debug messages */
 extern int     default_device; /* Using /dev/tty or equivalent */
 extern char    devnam[MAXPATHLEN];     /* Device name */
 extern int     crtscts;        /* Use hardware flow control */
+extern int     stop_bits;      /* Number of serial port stop bits */
 extern bool    modem;          /* Use modem control lines */
 extern int     inspeed;        /* Input/Output speed requested */
 extern u_int32_t netmask;      /* IP netmask to set on interface */
 extern bool    lockflag;       /* Create lock file to lock the serial dev */
 extern bool    nodetach;       /* Don't detach from controlling tty */
+#ifdef SYSTEMD
+extern bool    up_sdnotify;    /* Notify systemd once link is up (implies nodetach) */
+#endif
 extern bool    updetach;       /* Detach from controlling tty when link up */
+extern bool    master_detach;  /* Detach when multilink master without link */
 extern char    *initializer;   /* Script to initialize physical link */
 extern char    *connect_script; /* Script to establish physical link */
 extern char    *disconnect_script; /* Script to disestablish physical link */
@@ -314,6 +331,7 @@ extern bool tune_kernel;    /* May alter kernel settings as necessary */
 extern int     connect_delay;  /* Time to delay after connect script */
 extern int     max_data_rate;  /* max bytes/sec through charshunt */
 extern int     req_unit;       /* interface unit number to use */
+extern char    req_ifname[MAXIFNAMELEN]; /* interface name to use */
 extern bool    multilink;      /* enable multilink operation */
 extern bool    noendpoint;     /* don't send or accept endpt. discrim. */
 extern char    *bundle_name;   /* bundle name for multilink */
@@ -653,6 +671,9 @@ int  sifaddr __P((int, u_int32_t, u_int32_t, u_int32_t));
 int  cifaddr __P((int, u_int32_t, u_int32_t));
                                /* Reset i/f IP addresses */
 #ifdef INET6
+int  ether_to_eui64(eui64_t *p_eui64); /* convert eth0 hw address to EUI64 */
+int  sif6up __P((int));                /* Configure i/f up for IPv6 */
+int  sif6down __P((int));      /* Configure i/f down for IPv6 */
 int  sif6addr __P((int, eui64_t, eui64_t));
                                /* Configure IPv6 addresses for i/f */
 int  cif6addr __P((int, eui64_t, eui64_t));
@@ -727,6 +748,8 @@ extern int (*allowed_address_hook) __P((u_int32_t addr));
 extern void (*ip_up_hook) __P((void));
 extern void (*ip_down_hook) __P((void));
 extern void (*ip_choose_hook) __P((u_int32_t *));
+extern void (*ipv6_up_hook) __P((void));
+extern void (*ipv6_down_hook) __P((void));
 
 extern int (*chap_check_hook) __P((void));
 extern int (*chap_passwd_hook) __P((char *user, char *passwd));