Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Mar 1997 14:02:14 +0300 (MSK)
From:      "Andrew L.Davydov" <davydov@okbmei.msk.su>
To:        freebsd-questions@freebsd.org
Subject:   about ppp in 2.2-RELEASE
Message-ID:  <199703241102.OAA01751@ns.okbmei.msk.su>

next in thread | raw e-mail | index | archive | help
Hi all.

	Please tell me, what is the sux in pppd?

I can't set netmask larger than netmask on ethernet.
If I set netmask in option file smaller than netmask on ethernet, 
it works fine.

What is the use of this stuff? 

sys-bsd.c:
----
	/*
	 * Check that the interface is up, and not point-to-point or loopback.
	 */
	strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name));
	if (ioctl(sockfd, SIOCGIFFLAGS, &ifreq) < 0)
	    continue;
	if ((ifreq.ifr_flags & (IFF_UP|IFF_POINTOPOINT|IFF_LOOPBACK))
	    != IFF_UP)
	    continue;

	/*
	 * Get its netmask and OR it into our mask.
	 */
	if (ioctl(sockfd, SIOCGIFNETMASK, &ifreq) < 0)
	    continue;
	mask |= ((struct sockaddr_in *)&ifreq.ifr_addr)->sin_addr.s_addr;
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
----


---------------------
Mr. Andrew L.Davydov
Network Manager   - UniForum Member



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703241102.OAA01751>