Deleted Added
full compact
physical.c (81634) physical.c (93418)
1/*
2 * Written by Eivind Eklund <eivind@yes.no>
3 * for Yes Interactive
4 *
5 * Copyright (C) 1998, Yes Interactive. All rights reserved.
6 *
7 * Redistribution and use in any form is permitted. Redistribution in
8 * source form should include the above copyright and this set of
9 * conditions, because large sections american law seems to have been
10 * created by a bunch of jerks on drugs that are now illegal, forcing
11 * me to include this copyright-stuff instead of placing this in the
12 * public domain. The name of of 'Yes Interactive' or 'Eivind Eklund'
13 * may not be used to endorse or promote products derived from this
14 * software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 *
1/*
2 * Written by Eivind Eklund <eivind@yes.no>
3 * for Yes Interactive
4 *
5 * Copyright (C) 1998, Yes Interactive. All rights reserved.
6 *
7 * Redistribution and use in any form is permitted. Redistribution in
8 * source form should include the above copyright and this set of
9 * conditions, because large sections american law seems to have been
10 * created by a bunch of jerks on drugs that are now illegal, forcing
11 * me to include this copyright-stuff instead of placing this in the
12 * public domain. The name of of 'Yes Interactive' or 'Eivind Eklund'
13 * may not be used to endorse or promote products derived from this
14 * software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 *
19 * $FreeBSD: head/usr.sbin/ppp/physical.c 81634 2001-08-14 16:05:52Z brian $
19 * $FreeBSD: head/usr.sbin/ppp/physical.c 93418 2002-03-30 12:30:09Z brian $
20 *
21 */
22
23#include <sys/param.h>
24#include <netinet/in.h>
25#include <netinet/in_systm.h>
26#include <netinet/ip.h>
27#include <sys/socket.h>

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

95#include "udp.h"
96#include "exec.h"
97#include "tty.h"
98#ifndef NOI4B
99#include "i4b.h"
100#endif
101#ifndef NONETGRAPH
102#include "ether.h"
20 *
21 */
22
23#include <sys/param.h>
24#include <netinet/in.h>
25#include <netinet/in_systm.h>
26#include <netinet/ip.h>
27#include <sys/socket.h>

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

95#include "udp.h"
96#include "exec.h"
97#include "tty.h"
98#ifndef NOI4B
99#include "i4b.h"
100#endif
101#ifndef NONETGRAPH
102#include "ether.h"
103#include "netgraph.h"
103#endif
104#ifndef NOATM
105#include "atm.h"
106#endif
107#include "tcpmss.h"
108
109#define PPPOTCPLINE "ppp"
110

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

132#endif
133 { tty_Create, tty_iov2device, tty_DeviceSize },
134#ifndef NONETGRAPH
135 /*
136 * This must come before ``udp'' so that the probe routine is
137 * able to identify it as a more specific type of SOCK_DGRAM.
138 */
139 { ether_Create, ether_iov2device, ether_DeviceSize },
104#endif
105#ifndef NOATM
106#include "atm.h"
107#endif
108#include "tcpmss.h"
109
110#define PPPOTCPLINE "ppp"
111

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

133#endif
134 { tty_Create, tty_iov2device, tty_DeviceSize },
135#ifndef NONETGRAPH
136 /*
137 * This must come before ``udp'' so that the probe routine is
138 * able to identify it as a more specific type of SOCK_DGRAM.
139 */
140 { ether_Create, ether_iov2device, ether_DeviceSize },
141#ifdef EXPERIMENTAL_NETGRAPH
142 { ng_Create, ng_iov2device, ng_DeviceSize },
140#endif
143#endif
144#endif
141#ifndef NOATM
142 /* Ditto for ATM devices */
143 { atm_Create, atm_iov2device, atm_DeviceSize },
144#endif
145 { tcp_Create, tcp_iov2device, tcp_DeviceSize },
146 { udp_Create, udp_iov2device, udp_DeviceSize },
147 { exec_Create, exec_iov2device, exec_DeviceSize }
148};

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

1095int
1096physical_AwaitCarrier(struct physical *p)
1097{
1098 if (p->handler && p->handler->awaitcarrier)
1099 return (*p->handler->awaitcarrier)(p);
1100
1101 return CARRIER_OK;
1102}
145#ifndef NOATM
146 /* Ditto for ATM devices */
147 { atm_Create, atm_iov2device, atm_DeviceSize },
148#endif
149 { tcp_Create, tcp_iov2device, tcp_DeviceSize },
150 { udp_Create, udp_iov2device, udp_DeviceSize },
151 { exec_Create, exec_iov2device, exec_DeviceSize }
152};

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

1099int
1100physical_AwaitCarrier(struct physical *p)
1101{
1102 if (p->handler && p->handler->awaitcarrier)
1103 return (*p->handler->awaitcarrier)(p);
1104
1105 return CARRIER_OK;
1106}
1107
1108
1109void
1110physical_SetAsyncParams(struct physical *p, u_int32_t mymap, u_int32_t hismap)
1111{
1112 if (p->handler && p->handler->setasyncparams)
1113 return (*p->handler->setasyncparams)(p, mymap, hismap);
1114
1115 async_SetLinkParams(&p->async, mymap, hismap);
1116}