Deleted Added
full compact
ether.c (75376) ether.c (78410)
1/*-
2 * Copyright (c) 1999 Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999 Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/usr.sbin/ppp/ether.c 75376 2001-04-10 08:31:13Z brian $
26 * $FreeBSD: head/usr.sbin/ppp/ether.c 78410 2001-06-18 14:59:36Z brian $
27 */
28
29#include <sys/param.h>
30#include <sys/socket.h>
31#include <sys/un.h>
32#include <netinet/in.h>
33#include <arpa/inet.h>
34#include <netdb.h>

--- 245 unchanged lines hidden (view full) ---

280 ether_MessageIn(dev);
281
282 return dev->connected;
283}
284
285static const struct device baseetherdevice = {
286 ETHER_DEVICE,
287 "ether",
27 */
28
29#include <sys/param.h>
30#include <sys/socket.h>
31#include <sys/un.h>
32#include <netinet/in.h>
33#include <arpa/inet.h>
34#include <netdb.h>

--- 245 unchanged lines hidden (view full) ---

280 ether_MessageIn(dev);
281
282 return dev->connected;
283}
284
285static const struct device baseetherdevice = {
286 ETHER_DEVICE,
287 "ether",
288 1492,
288 { CD_REQUIRED, DEF_ETHERCDDELAY },
289 ether_AwaitCarrier,
290 ether_RemoveFromSet,
291 NULL,
292 NULL,
293 NULL,
294 NULL,
295 ether_Free,

--- 374 unchanged lines hidden (view full) ---

670 *dev->hook = '\0';
671 }
672 }
673 }
674
675 if (dev) {
676 physical_SetupStack(p, dev->dev.name, PHYSICAL_FORCE_SYNCNOACF);
677
289 { CD_REQUIRED, DEF_ETHERCDDELAY },
290 ether_AwaitCarrier,
291 ether_RemoveFromSet,
292 NULL,
293 NULL,
294 NULL,
295 NULL,
296 ether_Free,

--- 374 unchanged lines hidden (view full) ---

671 *dev->hook = '\0';
672 }
673 }
674 }
675
676 if (dev) {
677 physical_SetupStack(p, dev->dev.name, PHYSICAL_FORCE_SYNCNOACF);
678
678 /* Moan about (and fix) invalid LCP configurations */
679 if (p->link.lcp.cfg.mru > 1492) {
680 log_Printf(LogWARN, "%s: Reducing MRU to 1492\n", p->link.name);
681 p->link.lcp.cfg.mru = 1492;
682 }
683 if (p->dl->bundle->cfg.mtu > 1492) {
684 log_Printf(LogWARN, "%s: Reducing MTU to 1492\n", p->link.name);
685 p->dl->bundle->cfg.mtu = 1492;
686 }
687
688 if (path != NULL) {
689 /* Mark the interface as UP if it's not already */
690
691 path[ifacelen] = '\0'; /* Remove the trailing ':' */
692 if (!iface_SetFlags(path, IFF_UP))
693 log_Printf(LogWARN, "%s: Failed to set the IFF_UP flag on %s\n",
694 p->link.name, path);
695 }
696
697 return &dev->dev;
698 }
699
700 return NULL;
701}
679 if (path != NULL) {
680 /* Mark the interface as UP if it's not already */
681
682 path[ifacelen] = '\0'; /* Remove the trailing ':' */
683 if (!iface_SetFlags(path, IFF_UP))
684 log_Printf(LogWARN, "%s: Failed to set the IFF_UP flag on %s\n",
685 p->link.name, path);
686 }
687
688 return &dev->dev;
689 }
690
691 return NULL;
692}