diff options
author | brian <brian@FreeBSD.org> | 1999-11-06 22:50:59 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-11-06 22:50:59 +0000 |
commit | cac81ba45e2e673e229f5ea7773bab9d5a35b735 (patch) | |
tree | 05464cda97fbc141305fb350e1211787d0b945dc /usr.sbin/ppp/physical.h | |
parent | 5e8870e5439ac382bd1d3732b119bf5cf81405b6 (diff) | |
download | FreeBSD-src-cac81ba45e2e673e229f5ea7773bab9d5a35b735.zip FreeBSD-src-cac81ba45e2e673e229f5ea7773bab9d5a35b735.tar.gz |
Support PPPoE
Help (lots) from: julian, archie
Facilities from: ahebert@pubnix.net
Diffstat (limited to 'usr.sbin/ppp/physical.h')
-rw-r--r-- | usr.sbin/ppp/physical.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/usr.sbin/ppp/physical.h b/usr.sbin/ppp/physical.h index 083ee91..0ff589a 100644 --- a/usr.sbin/ppp/physical.h +++ b/usr.sbin/ppp/physical.h @@ -33,7 +33,8 @@ struct cmdargs; #define TTY_DEVICE 2 #define TCP_DEVICE 3 #define UDP_DEVICE 4 -#define EXEC_DEVICE 5 +#define ETHER_DEVICE 5 +#define EXEC_DEVICE 6 /* Returns from awaitcarrier() */ #define CARRIER_PENDING 1 @@ -50,6 +51,7 @@ struct device { const char *name; 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 *); @@ -57,7 +59,8 @@ struct device { 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, pid_t); + void (*device2iov)(struct device *, struct iovec *, int *, int, int *, + int *, pid_t); int (*speed)(struct physical *); const char *(*openinfo)(struct physical *); }; @@ -111,9 +114,10 @@ struct physical { #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_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 *, struct bundle *); @@ -128,8 +132,9 @@ 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); -extern int physical2iov(struct physical *, struct iovec *, int *, int, pid_t); + int, int, int *, int *); +extern int physical2iov(struct physical *, struct iovec *, int *, int, int *, + int *, pid_t); extern void physical_ChangedPid(struct physical *, pid_t); extern int physical_IsSync(struct physical *); @@ -142,6 +147,8 @@ extern ssize_t physical_Write(struct physical *, const void *, size_t); extern int physical_doUpdateSet(struct descriptor *, fd_set *, fd_set *, fd_set *, int *, int); extern int physical_IsSet(struct descriptor *, const fd_set *); +extern void physical_DescriptorRead(struct descriptor *, 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 *); @@ -151,3 +158,4 @@ extern void physical_SetupStack(struct physical *, const char *, int); extern void physical_StopDeviceTimer(struct physical *); extern int physical_MaxDeviceSize(void); extern int physical_AwaitCarrier(struct physical *); +extern void physical_SetDescriptor(struct physical *); |