003 File Manager
Current Path:
/usr/src/usr.sbin/ppp
usr
/
src
/
usr.sbin
/
ppp
/
📁
..
📄
Makefile
(1.66 KB)
📄
Makefile.depend
(435 B)
📄
README.changes
(7.26 KB)
📄
README.nat
(14.85 KB)
📄
acf.c
(3.51 KB)
📄
acf.h
(1.5 KB)
📄
arp.c
(8.24 KB)
📄
arp.h
(1.76 KB)
📄
async.c
(5.39 KB)
📄
async.h
(1.9 KB)
📄
auth.c
(12.02 KB)
📄
auth.h
(2.69 KB)
📄
bundle.c
(56.37 KB)
📄
bundle.h
(7.7 KB)
📄
cbcp.c
(22.53 KB)
📄
cbcp.h
(2.51 KB)
📄
ccp.c
(23.33 KB)
📄
ccp.h
(5.53 KB)
📄
chap.c
(27 KB)
📄
chap.h
(2.69 KB)
📄
chap_ms.c
(12.22 KB)
📄
chap_ms.h
(2.48 KB)
📄
chat.c
(20.41 KB)
📄
chat.h
(2.92 KB)
📄
command.c
(101.76 KB)
📄
command.h
(3.02 KB)
📄
datalink.c
(42.89 KB)
📄
datalink.h
(6.11 KB)
📄
deflate.c
(15.89 KB)
📄
deflate.h
(1.52 KB)
📄
defs.c
(8.61 KB)
📄
defs.h
(5.41 KB)
📄
descriptor.h
(2.24 KB)
📄
ether.c
(20.81 KB)
📄
ether.h
(1.73 KB)
📄
exec.c
(11.47 KB)
📄
exec.h
(1.67 KB)
📄
filter.c
(15.76 KB)
📄
filter.h
(3.8 KB)
📄
fsm.c
(31.01 KB)
📄
fsm.h
(7.02 KB)
📄
hdlc.c
(15.17 KB)
📄
hdlc.h
(3.9 KB)
📄
i4b.h
(1.73 KB)
📄
id.c
(6.05 KB)
📄
id.h
(3.01 KB)
📄
iface.c
(22.41 KB)
📄
iface.h
(2.97 KB)
📄
ip.c
(30.21 KB)
📄
ip.h
(2.09 KB)
📄
ipcp.c
(42.99 KB)
📄
ipcp.h
(5.14 KB)
📄
iplist.c
(5.54 KB)
📄
iplist.h
(1.99 KB)
📄
ipv6cp.c
(21.9 KB)
📄
ipv6cp.h
(3.26 KB)
📄
layer.h
(1.97 KB)
📄
lcp.c
(39.22 KB)
📄
lcp.h
(6.3 KB)
📄
link.c
(10.36 KB)
📄
link.h
(3.42 KB)
📄
log.c
(11.33 KB)
📄
log.h
(4.14 KB)
📄
lqr.c
(17.5 KB)
📄
lqr.h
(3.31 KB)
📄
main.c
(17.93 KB)
📄
main.h
(1.6 KB)
📄
mbuf.c
(10.02 KB)
📄
mbuf.h
(4 KB)
📄
mp.c
(33.66 KB)
📄
mp.h
(4.87 KB)
📄
mppe.c
(20.27 KB)
📄
mppe.h
(1.57 KB)
📄
nat_cmd.c
(15.37 KB)
📄
nat_cmd.h
(1.88 KB)
📄
ncp.c
(13.17 KB)
📄
ncp.h
(4.36 KB)
📄
ncpaddr.c
(23.06 KB)
📄
ncpaddr.h
(4.63 KB)
📄
netgraph.c
(20.65 KB)
📄
netgraph.h
(1.72 KB)
📄
pap.c
(8.83 KB)
📄
pap.h
(1.78 KB)
📄
physical.c
(29.01 KB)
📄
physical.h
(6.5 KB)
📄
ppp.8
(149.48 KB)
📄
ppp.conf
(1.23 KB)
📄
pred.c
(8.83 KB)
📄
pred.h
(1.59 KB)
📄
probe.c
(2.29 KB)
📄
probe.h
(1.57 KB)
📄
prompt.c
(12.92 KB)
📄
prompt.h
(3.87 KB)
📄
proto.c
(3.22 KB)
📄
proto.h
(2.4 KB)
📄
radius.c
(39.38 KB)
📄
radius.h
(4.6 KB)
📄
route.c
(25.91 KB)
📄
route.h
(3.3 KB)
📄
server.c
(10.9 KB)
📄
server.h
(2.26 KB)
📄
sig.c
(3.45 KB)
📄
sig.h
(1.6 KB)
📄
slcompress.c
(17.2 KB)
📄
slcompress.h
(6.48 KB)
📄
sync.c
(2.7 KB)
📄
sync.h
(1.44 KB)
📄
systems.c
(11.45 KB)
📄
systems.h
(2.02 KB)
📄
tcp.c
(5.63 KB)
📄
tcp.h
(1.66 KB)
📄
tcpmss.c
(5.06 KB)
📄
tcpmss.h
(1.44 KB)
📄
throughput.c
(8.84 KB)
📄
throughput.h
(2.91 KB)
📄
timer.c
(8.14 KB)
📄
timer.h
(2.31 KB)
📄
tty.c
(20.63 KB)
📄
tty.h
(1.73 KB)
📄
tun.c
(3.27 KB)
📄
tun.h
(1.58 KB)
📄
ua.h
(2.98 KB)
📄
udp.c
(8.7 KB)
📄
udp.h
(1.67 KB)
📄
vjcomp.c
(5.68 KB)
📄
vjcomp.h
(1.53 KB)
Editing: physical.h
/* * Written by Eivind Eklund <eivind@yes.no> * for Yes Interactive * * Copyright (C) 1998, Yes Interactive. All rights reserved. * * Redistribution and use in any form is permitted. Redistribution in * source form should include the above copyright and this set of * conditions, because large sections american law seems to have been * created by a bunch of jerks on drugs that are now illegal, forcing * me to include this copyright-stuff instead of placing this in the * public domain. The name of of 'Yes Interactive' or 'Eivind Eklund' * may not be used to endorse or promote products derived from this * software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * $FreeBSD$ * */ struct datalink; struct bundle; struct iovec; struct physical; struct bundle; struct ccp; struct cmdargs; /* Device types (don't use zero, it'll be confused with NULL in physical2iov */ #define I4B_DEVICE 1 #define TTY_DEVICE 2 #define TCP_DEVICE 3 #define UDP_DEVICE 4 #define ETHER_DEVICE 5 #define EXEC_DEVICE 6 #define ATM_DEVICE 7 #define NG_DEVICE 8 /* Returns from awaitcarrier() */ #define CARRIER_PENDING 1 #define CARRIER_OK 2 #define CARRIER_LOST 3 /* A cd ``necessity'' value */ #define CD_VARIABLE 0 #define CD_REQUIRED 1 #define CD_NOTREQUIRED 2 #define CD_DEFAULT 3 struct cd { unsigned necessity : 2; /* A CD_ value */ int delay; /* Wait this many seconds after login script */ }; struct device { int type; const char *name; u_short mtu; struct cd cd; int (*awaitcarrier)(struct physical *); int (*removefromset)(struct physical *, fd_set *, fd_set *, fd_set *); int (*raw)(struct physical *); void (*offline)(struct physical *); void (*cooked)(struct physical *); void (*setasyncparams)(struct physical *, u_int32_t, u_int32_t); void (*stoptimer)(struct physical *); void (*destroy)(struct physical *); ssize_t (*read)(struct physical *, void *, size_t); ssize_t (*write)(struct physical *, const void *, size_t); void (*device2iov)(struct device *, struct iovec *, int *, int, int *, int *); unsigned (*speed)(struct physical *); const char *(*openinfo)(struct physical *); int (*slot)(struct physical *); }; struct physical { struct link link; struct fdescriptor desc; int type; /* What sort of PHYS_* link are we ? */ struct async async; /* Our async state */ struct hdlc hdlc; /* Our hdlc state */ int fd; /* File descriptor for this device */ struct mbuf *out; /* mbuf that suffered a short write */ int connect_count; struct datalink *dl; /* my owner */ struct { u_char buf[MAX_MRU]; /* Our input data buffer */ size_t sz; } input; struct { char full[DEVICE_LEN]; /* Our current device name */ char *base; } name; int Utmp; /* Are we in utmp ? */ pid_t session_owner; /* HUP this when closing the link */ struct device *handler; /* device specific handler */ struct { unsigned rts_cts : 1; /* Is rts/cts enabled ? */ unsigned nonstandard_pppoe : 1; /* Is PPPoE mode nonstandard */ unsigned pppoe_configured : 1; /* temporary hack */ unsigned parity; /* What parity is enabled? (tty flags) */ unsigned speed; /* tty speed */ char devlist[LINE_LEN]; /* NUL separated list of devices */ int ndev; /* number of devices in list */ struct cd cd; } cfg; }; #define field2phys(fp, name) \ ((struct physical *)((char *)fp - (uintptr_t)(&((struct physical *)0)->name))) #define link2physical(l) \ ((l)->type == PHYSICAL_LINK ? field2phys(l, link) : NULL) #define descriptor2physical(d) \ ((d)->type == PHYSICAL_DESCRIPTOR ? field2phys(d, desc) : NULL) #define PHYSICAL_NOFORCE 1 #define PHYSICAL_FORCE_ASYNC 2 #define PHYSICAL_FORCE_SYNC 3 #define PHYSICAL_FORCE_SYNCNOACF 4 extern struct physical *physical_Create(struct datalink *, int); extern int physical_Open(struct physical *); extern int physical_Raw(struct physical *); extern unsigned physical_GetSpeed(struct physical *); extern int physical_SetSpeed(struct physical *, unsigned); extern int physical_SetParity(struct physical *, const char *); extern int physical_SetRtsCts(struct physical *, int); extern void physical_SetSync(struct physical *); extern int physical_ShowStatus(struct cmdargs const *); extern void physical_Offline(struct physical *); extern void physical_Close(struct physical *); extern void physical_Destroy(struct physical *); extern struct physical *iov2physical(struct datalink *, struct iovec *, int *, int, int, int *, int *); extern int physical2iov(struct physical *, struct iovec *, int *, int, int *, int *); extern const char *physical_LockedDevice(struct physical *); extern void physical_ChangedPid(struct physical *, pid_t); extern int physical_IsSync(struct physical *); extern u_short physical_DeviceMTU(struct physical *); extern const char *physical_GetDevice(struct physical *); extern void physical_SetDeviceList(struct physical *, int, const char *const *); extern void physical_SetDevice(struct physical *, const char *); extern ssize_t physical_Read(struct physical *, void *, size_t); extern ssize_t physical_Write(struct physical *, const void *, size_t); extern int physical_doUpdateSet(struct fdescriptor *, fd_set *, fd_set *, fd_set *, int *, int); extern int physical_IsSet(struct fdescriptor *, const fd_set *); extern void physical_DescriptorRead(struct fdescriptor *, struct bundle *, const fd_set *); extern void physical_Login(struct physical *, const char *); extern int physical_RemoveFromSet(struct physical *, fd_set *, fd_set *, fd_set *); extern int physical_SetMode(struct physical *, int); extern void physical_DeleteQueue(struct physical *); extern void physical_SetupStack(struct physical *, const char *, int); extern void physical_StopDeviceTimer(struct physical *); extern unsigned physical_MaxDeviceSize(void); extern int physical_AwaitCarrier(struct physical *); extern void physical_SetDescriptor(struct physical *); extern void physical_SetAsyncParams(struct physical *, u_int32_t, u_int32_t); extern int physical_Slot(struct physical *); extern int physical_SetPPPoEnonstandard(struct physical *, int);
Upload File
Create Folder