Lines Matching refs:to

12 * the interface to the networking code
15 * the interface to pppd, via a /dev/ppp character device
23 mechanism for transporting PPP frames from one machine to another. A
26 to be able to send PPP frames, receive PPP frames, and optionally
31 This architecture makes it possible to implement PPP multilink in a
32 natural and straightforward way, by allowing more than one channel to
33 be linked to each ppp network interface unit. The generic layer is
42 functions used to communicate between the generic PPP layer and PPP
45 Each channel has to provide two functions to the generic PPP layer,
48 * start_xmit() is called by the generic layer when it has a frame to
53 will then attempt to retransmit the rejected frame(s). If the frame
57 program to control aspects of the channel's behaviour. This
59 system call on an instance of /dev/ppp which is bound to the
62 The generic PPP layer provides seven functions to channels:
64 * ppp_register_channel() is called when a channel has been created, to
66 a serial port to the PPPDISC line discipline causes the ppp_async
67 channel code to call this function.
69 * ppp_unregister_channel() is called when a channel is to be
74 rejected a call to its start_xmit function, and can now accept more
85 generic layer to this channel. The channel should provide some way
86 (e.g. an ioctl) to transmit this back to user-space, as user-space
87 will need it to attach an instance of /dev/ppp to this channel.
90 interface to which this channel is connected, or -1 if the channel
93 Connecting a channel to the ppp generic layer is initiated from the
95 expected to have some way for a user-level process to control it
97 ppp_async channel, this is provided by the file descriptor to the
101 communications medium and prepare it to do PPP. For example, with an
104 remote system to invoke PPP service there. We refer to this process
105 as `discovery'. Then the user-level process tells the medium to
107 The channel then has to report the channel number assigned to it back
108 to the user-level process. From that point, the PPP negotiation code
112 At the interface to the PPP generic layer, PPP frames are stored in
119 presented to the start_xmit() function contain only the 2-byte
120 protocol number and the data, and the skbuffs presented to ppp_input()
123 The channel must provide an instance of a ppp_channel struct to
124 represent the channel. The channel is free to use the `private' field
131 If the channel needs some headroom in the skbuffs presented to it for
134 ppp_channel struct to the amount of headroom required. The generic
135 PPP layer will attempt to provide that much headroom but the channel
140 headroom in the skbuffs presented to ppp_input(). The generic PPP
147 The generic PPP layer has been designed to minimize the amount of data
152 exceptions are when pppd sends packets by writing to /dev/ppp, and
157 is asked to transmit.
160 then subjected to TCP/IP header compression and packet compression
166 If multilink is not in use, this packet is then passed to the attached
167 channel's start_xmit() function. If the channel refuses to take
177 decides how many fragments to use based on the length of the packet
178 and the number of channels which are potentially able to accept a
179 fragment at the moment. A channel is potentially able to accept a
181 to transmit. The channel may still refuse a fragment; in this case
182 the fragment is queued up for the channel to transmit later. This
183 scheme has the effect that more fragments are given to higher-
185 layer will tend to fragment large packets across all the channels,
186 thus reducing latency, while under heavy load, packets will tend to be
194 The PPP generic layer has been designed to be SMP-safe. Locks are
195 used around accesses to the internal data structures where necessary
196 to ensure their integrity. As part of this, the generic layer
197 requires that the channels adhere to certain requirements and in turn
198 provides certain guarantees to the channels. Essentially the channels
199 are required to provide the appropriate locking on the ppp_channel
203 required to provide the guarantee that this storage exists and is
209 ppp_register_channel() is called until after the call to
212 * No thread may be in a call to any of ppp_input(), ppp_input_error(),
230 The generic layer provides these guarantees to the channels:
240 * By the time a call to ppp_unregister_channel() returns, no thread
241 will be executing in a call from the generic layer to that channel's
246 Interface to pppd
250 /dev/ppp. This is used by pppd to control PPP interface units and
252 /dev/ppp acts independently and can be attached either to a PPP unit
254 to point to a separate object for each open instance of /dev/ppp. In
255 this way an effect similar to Solaris' clone open is obtained,
256 allowing us to control an arbitrary number of PPP interfaces and
257 channels without having to fill up /dev with hundreds of device names.
260 unattached. Using an ioctl call, it can then be attached to an
261 existing unit, attached to a newly-created unit, or attached to an
262 existing channel. An instance attached to a unit can be used to send
265 attached to a channel can be used to send and receive PPP frames on
270 write to the unit (i.e., to an instance of /dev/ppp attached to the
271 unit) will be subject to bundle-level compression and to fragmentation
273 PPP frame sent by a write to the channel will be sent as-is on that
276 A channel is not initially attached to any unit. In this state it can
278 It can then be connected to a PPP unit with an ioctl call, which
279 makes it available to send and receive data packets for that unit.
282 on whether it is unattached, attached to a PPP interface, or attached
283 to a PPP channel. The ioctl calls which are available on an
287 instance the "owner" of the interface. The argument should point to
288 an int which is the desired unit number if >= 0, or -1 to assign the
293 * PPPIOCATTACH attaches this instance to an existing PPP interface.
294 The argument should point to an int containing the unit number.
297 * PPPIOCATTCHAN attaches this instance to an existing PPP channel.
298 The argument should point to an int containing the channel number.
300 The ioctl calls available on an instance of /dev/ppp attached to a
305 instance. In order to prevent possible races this ioctl will fail
306 with an EINVAL error if more than one file descriptor refers to this
309 * PPPIOCCONNECT connects this channel to a PPP interface. The
310 argument should point to an int containing the interface unit
312 connected to an interface, or ENXIO if the requested interface does
316 it is connected to. It will return an EINVAL error if the channel
317 is not connected to an interface.
319 * All other ioctl commands are passed to the channel ioctl() function.
321 The ioctl calls that are available on an instance that is attached to
325 The argument should point to an int containing the new MRU value.
328 interface. The argument should be a pointer to an int containing
338 SC_LOOP_TRAFFIC send IP traffic to pppd
351 interface unit. The argument should point to an int where the ioctl
360 decompression. The argument should point to a ppp_option_data
368 * PPPIOCGUNIT returns, in the int pointed to by the argument, the unit
371 * PPPIOCSDEBUG sets the debug flags for the interface to the value in
372 the int pointed to by the argument. Only the least significant bit
379 pointed to by the argument.
382 packets were sent and received. The argument should point to a
385 the transmit and receive idle timers is restricted to those which
390 decompressor. The lower 16 bits of the int pointed to by the
394 maximum connection-ID is set to 15.
397 protocol. The argument should point to an npioctl struct (defined
399 number for the protocol to be affected, and the `mode' field
400 specifies what to do with packets for that protocol:
412 protocol. The argument should point to an npioctl struct with the
413 `protocol' field set to the PPP protocol number for the protocol of
414 interest. On return the `mode' field will be set to the network-
419 option is selected. The argument should point to a sock_fprog
427 unit). The argument should point to an int containing the new MRRU