* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
+
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
-#include "pppd.h"
-#include "pathnames.h"
-#include "fsm.h" /* Needed for lcp.h to include cleanly */
-#include "lcp.h"
#include <atm.h>
#include <linux/atmdev.h>
#include <linux/atmppp.h>
#include <sys/stat.h>
#include <net/if.h>
#include <sys/ioctl.h>
+#include <sys/param.h>
+
+#include <pppd/pppd.h>
+#include <pppd/pathnames.h>
+#include <pppd/fsm.h> /* Needed for lcp.h to include cleanly */
+#include <pppd/lcp.h>
+
-const char pppd_version[] = VERSION;
+const char pppd_version[] = PPPD_VERSION;
static struct sockaddr_atmpvc pvcaddr;
static char *qosstr = NULL;
memset(&addr, 0, sizeof addr);
if (text2atm(cp, (struct sockaddr *) &addr, sizeof(addr),
- T2A_PVC | T2A_NAME) < 0) {
+ T2A_PVC | T2A_NAME | T2A_WILDCARD) < 0) {
if (doit)
info("cannot parse the ATM address: %s", cp);
return 0;
return 1;
memcpy(&pvcaddr, &addr, sizeof pvcaddr);
- strlcpy(devnam, cp, sizeof devnam);
+ strlcpy(devnam, cp, MAXPATHLEN);
devstat.st_mode = S_IFSOCK;
if (the_channel != &pppoa_channel) {
the_channel = &pppoa_channel;
pppoatm_max_mtu = lcp_allowoptions[0].mru;
pppoatm_max_mru = lcp_wantoptions[0].mru;
set_line_discipline_pppoatm(fd);
- strlcpy(ppp_devnam, devnam, sizeof(ppp_devnam));
+ strlcpy(ppp_devnam, devnam, MAXPATHLEN);
pppoa_fd = fd;
return fd;
}
}
struct channel pppoa_channel = {
- options: pppoa_options,
- process_extra_options: NULL,
- check_options: NULL,
- connect: &connect_pppoatm,
- disconnect: &disconnect_pppoatm,
- establish_ppp: &generic_establish_ppp,
- disestablish_ppp: &generic_disestablish_ppp,
- send_config: NULL,
- recv_config: NULL,
- close: NULL,
- cleanup: NULL
+ .options = pppoa_options,
+ .process_extra_options = NULL,
+ .check_options = NULL,
+ .connect = &connect_pppoatm,
+ .disconnect = &disconnect_pppoatm,
+ .establish_ppp = &generic_establish_ppp,
+ .disestablish_ppp = &generic_disestablish_ppp,
+ .send_config = NULL,
+ .recv_config = NULL,
+ .close = NULL,
+ .cleanup = NULL
};