-static void
-PPPOESendConfig(int mtu,
- u_int32_t asyncmap,
- int pcomp,
- int accomp)
-{
- int sock;
- struct ifreq ifr;
-
- if (mtu > MAX_PPPOE_MTU) {
- warn("Couldn't increase MTU to %d", mtu);
- mtu = MAX_PPPOE_MTU;
- }
- sock = socket(AF_INET, SOCK_DGRAM, 0);
- if (sock < 0) {
- error("Couldn't create IP socket: %m");
- return;
- }
- strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
- ifr.ifr_mtu = mtu;
- if (ioctl(sock, SIOCSIFMTU, &ifr) < 0) {
- error("Couldn't set interface MTU to %d: %m", mtu);
- return;
- }
- (void) close (sock);
-}
-
-