| 1 | #ifndef _PPP_CHANNEL_H_ |
|---|
| 2 | #define _PPP_CHANNEL_H_ |
|---|
| 3 | /* |
|---|
| 4 | * Definitions for the interface between the generic PPP code |
|---|
| 5 | * and a PPP channel. |
|---|
| 6 | * |
|---|
| 7 | * A PPP channel provides a way for the generic PPP code to send |
|---|
| 8 | * and receive packets over some sort of communications medium. |
|---|
| 9 | * Packets are stored in sk_buffs and have the 2-byte PPP protocol |
|---|
| 10 | * number at the start, but not the address and control bytes. |
|---|
| 11 | * |
|---|
| 12 | * Copyright 1999 Paul Mackerras. |
|---|
| 13 | * |
|---|
| 14 | * This program is free software; you can redistribute it and/or |
|---|
| 15 | * modify it under the terms of the GNU General Public License |
|---|
| 16 | * as published by the Free Software Foundation; either version |
|---|
| 17 | * 2 of the License, or (at your option) any later version. |
|---|
| 18 | * |
|---|
| 19 | * ==FILEVERSION 20000322== |
|---|
| 20 | */ |
|---|
| 21 | |
|---|
| 22 | #include <linux/skbuff.h> |
|---|
| 23 | #include <linux/poll.h> |
|---|
| 24 | |
|---|
| 25 | struct ppp_channel; |
|---|
| 26 | |
|---|
| 27 | struct ppp_channel_ops { |
|---|
| 28 | /* Send a packet (or multilink fragment) on this channel. |
|---|
| 29 | Returns 1 if it was accepted, 0 if not. */ |
|---|
| 30 | int (*start_xmit)(struct ppp_channel *, struct sk_buff *); |
|---|
| 31 | /* Handle an ioctl call that has come in via /dev/ppp. */ |
|---|
| 32 | int (*ioctl)(struct ppp_channel *, unsigned int, unsigned long); |
|---|
| 33 | }; |
|---|
| 34 | |
|---|
| 35 | struct ppp_channel { |
|---|
| 36 | void *private; /* channel private data */ |
|---|
| 37 | struct ppp_channel_ops *ops; /* operations for this channel */ |
|---|
| 38 | int mtu; /* max transmit packet size */ |
|---|
| 39 | int hdrlen; /* amount of headroom channel needs */ |
|---|
| 40 | void *ppp; /* opaque to channel */ |
|---|
| 41 | /* the following are not used at present */ |
|---|
| 42 | int speed; /* transfer rate (bytes/second) */ |
|---|
| 43 | int latency; /* overhead time in milliseconds */ |
|---|
| 44 | }; |
|---|
| 45 | |
|---|
| 46 | #endif |
|---|