usphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/networking/ppp_genericmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/networking/ppp_genericmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/networking/ppp_genericmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/networking/ppp_genericmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/networking/ppp_genericmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/networking/ppp_genericmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/networking/ppp_generic.rsthKubhsection)}(hhh](htitle)}(h(PPP Generic Driver and Channel Interfaceh]h(PPP Generic Driver and Channel Interface}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh block_quote)}(h/Paul Mackerras paulus@samba.org 7 Feb 2002 h](h paragraph)}(hPaul Mackerras paulus@samba.orgh](hPaul Mackerras }(hhhhhNhNubh reference)}(hpaulus@samba.orgh]hpaulus@samba.org}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:paulus@samba.orguh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubh)}(h 7 Feb 2002 h]h)}(h 7 Feb 2002h]h 7 Feb 2002}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhK hhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThe generic PPP driver in linux-2.4 provides an implementation of the functionality which is of use in any PPP implementation, including:h]hThe generic PPP driver in linux-2.4 provides an implementation of the functionality which is of use in any PPP implementation, including:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh bullet_list)}(hhh](h list_item)}(h&the network interface unit (ppp0 etc.)h]h)}(hj&h]h&the network interface unit (ppp0 etc.)}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj$ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(h$the interface to the networking codeh]h)}(hj=h]h$the interface to the networking code}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hhPPP multilink: splitting datagrams between multiple links, and ordering and combining received fragmentsh]h)}(hhPPP multilink: splitting datagrams between multiple links, and ordering and combining received fragmentsh]hhPPP multilink: splitting datagrams between multiple links, and ordering and combining received fragments}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjRubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(h6the interface to pppd, via a /dev/ppp character deviceh]h)}(hjlh]h6the interface to pppd, via a /dev/ppp character device}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(h$packet compression and decompressionh]h)}(hjh]h$packet compression and decompression}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(h+TCP/IP header compression and decompressionh]h)}(hjh]h+TCP/IP header compression and decompression}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hCdetecting network traffic for demand dialling and for idle timeoutsh]h)}(hjh]hCdetecting network traffic for demand dialling and for idle timeouts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hsimple packet filtering h]h)}(hsimple packet filteringh]hsimple packet filtering}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhKhhhhubh)}(hX3For sending and receiving PPP frames, the generic PPP driver calls on the services of PPP ``channels``. A PPP channel encapsulates a mechanism for transporting PPP frames from one machine to another. A PPP channel implementation can be arbitrarily complex internally but has a very simple interface with the generic PPP code: it merely has to be able to send PPP frames, receive PPP frames, and optionally handle ioctl requests. Currently there are PPP channel implementations for asynchronous serial ports, synchronous serial ports, and for PPP over ethernet.h](hZFor sending and receiving PPP frames, the generic PPP driver calls on the services of PPP }(hjhhhNhNubhliteral)}(h ``channels``h]hchannels}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX. A PPP channel encapsulates a mechanism for transporting PPP frames from one machine to another. A PPP channel implementation can be arbitrarily complex internally but has a very simple interface with the generic PPP code: it merely has to be able to send PPP frames, receive PPP frames, and optionally handle ioctl requests. Currently there are PPP channel implementations for asynchronous serial ports, synchronous serial ports, and for PPP over ethernet.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThis architecture makes it possible to implement PPP multilink in a natural and straightforward way, by allowing more than one channel to be linked to each ppp network interface unit. The generic layer is responsible for splitting datagrams on transmit and recombining them on receive.h]hXThis architecture makes it possible to implement PPP multilink in a natural and straightforward way, by allowing more than one channel to be linked to each ppp network interface unit. The generic layer is responsible for splitting datagrams on transmit and recombining them on receive.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hhhhubh)}(hhh](h)}(hPPP channel APIh]hPPP channel API}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK+ubh)}(hSee include/linux/ppp_channel.h for the declaration of the types and functions used to communicate between the generic PPP layer and PPP channels.h]hSee include/linux/ppp_channel.h for the declaration of the types and functions used to communicate between the generic PPP layer and PPP channels.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjhhubh)}(hdEach channel has to provide two functions to the generic PPP layer, via the ppp_channel.ops pointer:h]hdEach channel has to provide two functions to the generic PPP layer, via the ppp_channel.ops pointer:}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjhhubj)}(hhh](j#)}(hXstart_xmit() is called by the generic layer when it has a frame to send. The channel has the option of rejecting the frame for flow-control reasons. In this case, start_xmit() should return 0 and the channel should call the ppp_output_wakeup() function at a later time when it can accept frames again, and the generic layer will then attempt to retransmit the rejected frame(s). If the frame is accepted, the start_xmit() function should return 1. h]h)}(hXstart_xmit() is called by the generic layer when it has a frame to send. The channel has the option of rejecting the frame for flow-control reasons. In this case, start_xmit() should return 0 and the channel should call the ppp_output_wakeup() function at a later time when it can accept frames again, and the generic layer will then attempt to retransmit the rejected frame(s). If the frame is accepted, the start_xmit() function should return 1.h]hXstart_xmit() is called by the generic layer when it has a frame to send. The channel has the option of rejecting the frame for flow-control reasons. In this case, start_xmit() should return 0 and the channel should call the ppp_output_wakeup() function at a later time when it can accept frames again, and the generic layer will then attempt to retransmit the rejected frame(s). If the frame is accepted, the start_xmit() function should return 1.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjFubah}(h]h ]h"]h$]h&]uh1j"hjChhhhhNubj#)}(hX:ioctl() provides an interface which can be used by a user-space program to control aspects of the channel's behaviour. This procedure will be called when a user-space program does an ioctl system call on an instance of /dev/ppp which is bound to the channel. (Usually it would only be pppd which would do this.) h]h)}(hX9ioctl() provides an interface which can be used by a user-space program to control aspects of the channel's behaviour. This procedure will be called when a user-space program does an ioctl system call on an instance of /dev/ppp which is bound to the channel. (Usually it would only be pppd which would do this.)h]hX;ioctl() provides an interface which can be used by a user-space program to control aspects of the channel’s behaviour. This procedure will be called when a user-space program does an ioctl system call on an instance of /dev/ppp which is bound to the channel. (Usually it would only be pppd which would do this.)}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hhhhhKubh)}(hXThe generic PPP layer has been designed to minimize the amount of data that it buffers in the transmit direction. It maintains a queue of transmit packets for the PPP unit (network interface device) plus a queue of transmit packets for each attached channel. Normally the transmit queue for the unit will contain at most one packet; the exceptions are when pppd sends packets by writing to /dev/ppp, and when the core networking code calls the generic layer's start_xmit() function with the queue stopped, i.e. when the generic layer has called netif_stop_queue(), which only happens on a transmit timeout. The start_xmit function always accepts and queues the packet which it is asked to transmit.h]hXThe generic PPP layer has been designed to minimize the amount of data that it buffers in the transmit direction. It maintains a queue of transmit packets for the PPP unit (network interface device) plus a queue of transmit packets for each attached channel. Normally the transmit queue for the unit will contain at most one packet; the exceptions are when pppd sends packets by writing to /dev/ppp, and when the core networking code calls the generic layer’s start_xmit() function with the queue stopped, i.e. when the generic layer has called netif_stop_queue(), which only happens on a transmit timeout. The start_xmit function always accepts and queues the packet which it is asked to transmit.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;hhubh)}(hXgTransmit packets are dequeued from the PPP unit transmit queue and then subjected to TCP/IP header compression and packet compression (Deflate or BSD-Compress compression), as appropriate. After this point the packets can no longer be reordered, as the decompression algorithms rely on receiving compressed packets in the same order that they were generated.h]hXgTransmit packets are dequeued from the PPP unit transmit queue and then subjected to TCP/IP header compression and packet compression (Deflate or BSD-Compress compression), as appropriate. After this point the packets can no longer be reordered, as the decompression algorithms rely on receiving compressed packets in the same order that they were generated.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;hhubh)}(hXIf multilink is not in use, this packet is then passed to the attached channel's start_xmit() function. If the channel refuses to take the packet, the generic layer saves it for later transmission. The generic layer will call the channel's start_xmit() function again when the channel calls ppp_output_wakeup() or when the core networking code calls the generic layer's start_xmit() function again. The generic layer contains no timeout and retransmission logic; it relies on the core networking code for that.h]hXIf multilink is not in use, this packet is then passed to the attached channel’s start_xmit() function. If the channel refuses to take the packet, the generic layer saves it for later transmission. The generic layer will call the channel’s start_xmit() function again when the channel calls ppp_output_wakeup() or when the core networking code calls the generic layer’s start_xmit() function again. The generic layer contains no timeout and retransmission logic; it relies on the core networking code for that.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;hhubh)}(hX{If multilink is in use, the generic layer divides the packet into one or more fragments and puts a multilink header on each fragment. It decides how many fragments to use based on the length of the packet and the number of channels which are potentially able to accept a fragment at the moment. A channel is potentially able to accept a fragment if it doesn't have any fragments currently queued up for it to transmit. The channel may still refuse a fragment; in this case the fragment is queued up for the channel to transmit later. This scheme has the effect that more fragments are given to higher- bandwidth channels. It also means that under light load, the generic layer will tend to fragment large packets across all the channels, thus reducing latency, while under heavy load, packets will tend to be transmitted as single fragments, thus reducing the overhead of fragmentation.h]hX}If multilink is in use, the generic layer divides the packet into one or more fragments and puts a multilink header on each fragment. It decides how many fragments to use based on the length of the packet and the number of channels which are potentially able to accept a fragment at the moment. A channel is potentially able to accept a fragment if it doesn’t have any fragments currently queued up for it to transmit. The channel may still refuse a fragment; in this case the fragment is queued up for the channel to transmit later. This scheme has the effect that more fragments are given to higher- bandwidth channels. It also means that under light load, the generic layer will tend to fragment large packets across all the channels, thus reducing latency, while under heavy load, packets will tend to be transmitted as single fragments, thus reducing the overhead of fragmentation.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;hhubeh}(h]buffering-and-flow-controlah ]h"]buffering and flow controlah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h SMP safetyh]h SMP safety}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hXThe PPP generic layer has been designed to be SMP-safe. Locks are used around accesses to the internal data structures where necessary to ensure their integrity. As part of this, the generic layer requires that the channels adhere to certain requirements and in turn provides certain guarantees to the channels. Essentially the channels are required to provide the appropriate locking on the ppp_channel structures that form the basis of the communication between the channel and the generic layer. This is because the channel provides the storage for the ppp_channel structure, and so the channel is required to provide the guarantee that this storage exists and is valid at the appropriate times.h]hXThe PPP generic layer has been designed to be SMP-safe. Locks are used around accesses to the internal data structures where necessary to ensure their integrity. As part of this, the generic layer requires that the channels adhere to certain requirements and in turn provides certain guarantees to the channels. Essentially the channels are required to provide the appropriate locking on the ppp_channel structures that form the basis of the communication between the channel and the generic layer. This is because the channel provides the storage for the ppp_channel structure, and so the channel is required to provide the guarantee that this storage exists and is valid at the appropriate times.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h=The generic layer requires these guarantees from the channel:h]h=The generic layer requires these guarantees from the channel:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j#)}(hThe ppp_channel object must exist from the time that ppp_register_channel() is called until after the call to ppp_unregister_channel() returns. h]h)}(hThe ppp_channel object must exist from the time that ppp_register_channel() is called until after the call to ppp_unregister_channel() returns.h]hThe ppp_channel object must exist from the time that ppp_register_channel() is called until after the call to ppp_unregister_channel() returns.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hNo thread may be in a call to any of ppp_input(), ppp_input_error(), ppp_output_wakeup(), ppp_channel_index() or ppp_unit_number() for a channel at the time that ppp_unregister_channel() is called for that channel. h]h)}(hNo thread may be in a call to any of ppp_input(), ppp_input_error(), ppp_output_wakeup(), ppp_channel_index() or ppp_unit_number() for a channel at the time that ppp_unregister_channel() is called for that channel.h]hNo thread may be in a call to any of ppp_input(), ppp_input_error(), ppp_output_wakeup(), ppp_channel_index() or ppp_unit_number() for a channel at the time that ppp_unregister_channel() is called for that channel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(h~ppp_register_channel() and ppp_unregister_channel() must be called from process context, not interrupt or softirq/BH context. h]h)}(h}ppp_register_channel() and ppp_unregister_channel() must be called from process context, not interrupt or softirq/BH context.h]h}ppp_register_channel() and ppp_unregister_channel() must be called from process context, not interrupt or softirq/BH context.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hThe remaining generic layer functions may be called at softirq/BH level but must not be called from a hardware interrupt handler. h]h)}(hThe remaining generic layer functions may be called at softirq/BH level but must not be called from a hardware interrupt handler.h]hThe remaining generic layer functions may be called at softirq/BH level but must not be called from a hardware interrupt handler.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hThe generic layer may call the channel start_xmit() function at softirq/BH level but will not call it at interrupt level. Thus the start_xmit() function may not block. h]h)}(hThe generic layer may call the channel start_xmit() function at softirq/BH level but will not call it at interrupt level. Thus the start_xmit() function may not block.h]hThe generic layer may call the channel start_xmit() function at softirq/BH level but will not call it at interrupt level. Thus the start_xmit() function may not block.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hRThe generic layer will only call the channel ioctl() function in process context. h]h)}(hQThe generic layer will only call the channel ioctl() function in process context.h]hQThe generic layer will only call the channel ioctl() function in process context.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj4ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hprivate_data field to point to a separate object for each open instance of /dev/ppp. In this way an effect similar to Solaris' clone open is obtained, allowing us to control an arbitrary number of PPP interfaces and channels without having to fill up /dev with hundreds of device names.h]hXeThe PPP generic layer exports a character device interface called /dev/ppp. This is used by pppd to control PPP interface units and channels. Although there is only one /dev/ppp, each open instance of /dev/ppp acts independently and can be attached either to a PPP unit or a PPP channel. This is achieved using the file->private_data field to point to a separate object for each open instance of /dev/ppp. In this way an effect similar to Solaris’ clone open is obtained, allowing us to control an arbitrary number of PPP interfaces and channels without having to fill up /dev with hundreds of device names.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXWhen /dev/ppp is opened, a new instance is created which is initially unattached. Using an ioctl call, it can then be attached to an existing unit, attached to a newly-created unit, or attached to an existing channel. An instance attached to a unit can be used to send and receive PPP control frames, using the read() and write() system calls, along with poll() if necessary. Similarly, an instance attached to a channel can be used to send and receive PPP frames on that channel.h]hXWhen /dev/ppp is opened, a new instance is created which is initially unattached. Using an ioctl call, it can then be attached to an existing unit, attached to a newly-created unit, or attached to an existing channel. An instance attached to a unit can be used to send and receive PPP control frames, using the read() and write() system calls, along with poll() if necessary. Similarly, an instance attached to a channel can be used to send and receive PPP frames on that channel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXIn multilink terms, the unit represents the bundle, while the channels represent the individual physical links. Thus, a PPP frame sent by a write to the unit (i.e., to an instance of /dev/ppp attached to the unit) will be subject to bundle-level compression and to fragmentation across the individual links (if multilink is in use). In contrast, a PPP frame sent by a write to the channel will be sent as-is on that channel, without any multilink header.h]hXIn multilink terms, the unit represents the bundle, while the channels represent the individual physical links. Thus, a PPP frame sent by a write to the unit (i.e., to an instance of /dev/ppp attached to the unit) will be subject to bundle-level compression and to fragmentation across the individual links (if multilink is in use). In contrast, a PPP frame sent by a write to the channel will be sent as-is on that channel, without any multilink header.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXA channel is not initially attached to any unit. In this state it can be used for PPP negotiation but not for the transfer of data packets. It can then be connected to a PPP unit with an ioctl call, which makes it available to send and receive data packets for that unit.h]hXA channel is not initially attached to any unit. In this state it can be used for PPP negotiation but not for the transfer of data packets. It can then be connected to a PPP unit with an ioctl call, which makes it available to send and receive data packets for that unit.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe ioctl calls which are available on an instance of /dev/ppp depend on whether it is unattached, attached to a PPP interface, or attached to a PPP channel. The ioctl calls which are available on an unattached instance are:h]hThe ioctl calls which are available on an instance of /dev/ppp depend on whether it is unattached, attached to a PPP interface, or attached to a PPP channel. The ioctl calls which are available on an unattached instance are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hhh](j#)}(hX\PPPIOCNEWUNIT creates a new PPP interface and makes this /dev/ppp instance the "owner" of the interface. The argument should point to an int which is the desired unit number if >= 0, or -1 to assign the lowest unused unit number. Being the owner of the interface means that the interface will be shut down if this instance of /dev/ppp is closed. h]h)}(hX[PPPIOCNEWUNIT creates a new PPP interface and makes this /dev/ppp instance the "owner" of the interface. The argument should point to an int which is the desired unit number if >= 0, or -1 to assign the lowest unused unit number. Being the owner of the interface means that the interface will be shut down if this instance of /dev/ppp is closed.h]hX_PPPIOCNEWUNIT creates a new PPP interface and makes this /dev/ppp instance the “owner” of the interface. The argument should point to an int which is the desired unit number if >= 0, or -1 to assign the lowest unused unit number. Being the owner of the interface means that the interface will be shut down if this instance of /dev/ppp is closed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hPPPIOCATTACH attaches this instance to an existing PPP interface. The argument should point to an int containing the unit number. This does not make this instance the owner of the PPP interface. h]h)}(hPPPIOCATTACH attaches this instance to an existing PPP interface. The argument should point to an int containing the unit number. This does not make this instance the owner of the PPP interface.h]hPPPIOCATTACH attaches this instance to an existing PPP interface. The argument should point to an int containing the unit number. This does not make this instance the owner of the PPP interface.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj+ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hPPPIOCATTCHAN attaches this instance to an existing PPP channel. The argument should point to an int containing the channel number. h]h)}(hPPPIOCATTCHAN attaches this instance to an existing PPP channel. The argument should point to an int containing the channel number.h]hPPPIOCATTCHAN attaches this instance to an existing PPP channel. The argument should point to an int containing the channel number.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjCubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhM"hjhhubh)}(hOThe ioctl calls available on an instance of /dev/ppp attached to a channel are:h]hOThe ioctl calls available on an instance of /dev/ppp attached to a channel are:}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hjhhubj)}(hhh](j#)}(hX PPPIOCCONNECT connects this channel to a PPP interface. The argument should point to an int containing the interface unit number. It will return an EINVAL error if the channel is already connected to an interface, or ENXIO if the requested interface does not exist. h]h)}(hX PPPIOCCONNECT connects this channel to a PPP interface. The argument should point to an int containing the interface unit number. It will return an EINVAL error if the channel is already connected to an interface, or ENXIO if the requested interface does not exist.h]hX PPPIOCCONNECT connects this channel to a PPP interface. The argument should point to an int containing the interface unit number. It will return an EINVAL error if the channel is already connected to an interface, or ENXIO if the requested interface does not exist.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjrubah}(h]h ]h"]h$]h&]uh1j"hjohhhhhNubj#)}(hPPPIOCDISCONN disconnects this channel from the PPP interface that it is connected to. It will return an EINVAL error if the channel is not connected to an interface. h]h)}(hPPPIOCDISCONN disconnects this channel from the PPP interface that it is connected to. It will return an EINVAL error if the channel is not connected to an interface.h]hPPPIOCDISCONN disconnects this channel from the PPP interface that it is connected to. It will return an EINVAL error if the channel is not connected to an interface.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjubah}(h]h ]h"]h$]h&]uh1j"hjohhhhhNubj#)}(hXPPPIOCBRIDGECHAN bridges a channel with another. The argument should point to an int containing the channel number of the channel to bridge to. Once two channels are bridged, frames presented to one channel by ppp_input() are passed to the bridge instance for onward transmission. This allows frames to be switched from one channel into another: for example, to pass PPPoE frames into a PPPoL2TP session. Since channel bridging interrupts the normal ppp_input() path, a given channel may not be part of a bridge at the same time as being part of a unit. This ioctl will return an EALREADY error if the channel is already part of a bridge or unit, or ENXIO if the requested channel does not exist. h]h)}(hXPPPIOCBRIDGECHAN bridges a channel with another. The argument should point to an int containing the channel number of the channel to bridge to. Once two channels are bridged, frames presented to one channel by ppp_input() are passed to the bridge instance for onward transmission. This allows frames to be switched from one channel into another: for example, to pass PPPoE frames into a PPPoL2TP session. Since channel bridging interrupts the normal ppp_input() path, a given channel may not be part of a bridge at the same time as being part of a unit. This ioctl will return an EALREADY error if the channel is already part of a bridge or unit, or ENXIO if the requested channel does not exist.h]hXPPPIOCBRIDGECHAN bridges a channel with another. The argument should point to an int containing the channel number of the channel to bridge to. Once two channels are bridged, frames presented to one channel by ppp_input() are passed to the bridge instance for onward transmission. This allows frames to be switched from one channel into another: for example, to pass PPPoE frames into a PPPoL2TP session. Since channel bridging interrupts the normal ppp_input() path, a given channel may not be part of a bridge at the same time as being part of a unit. This ioctl will return an EALREADY error if the channel is already part of a bridge or unit, or ENXIO if the requested channel does not exist.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1j"hjohhhhhNubj#)}(hPPPIOCUNBRIDGECHAN performs the inverse of PPPIOCBRIDGECHAN, unbridging a channel pair. This ioctl will return an EINVAL error if the channel does not form part of a bridge. h]h)}(hPPPIOCUNBRIDGECHAN performs the inverse of PPPIOCBRIDGECHAN, unbridging a channel pair. This ioctl will return an EINVAL error if the channel does not form part of a bridge.h]hPPPIOCUNBRIDGECHAN performs the inverse of PPPIOCBRIDGECHAN, unbridging a channel pair. This ioctl will return an EINVAL error if the channel does not form part of a bridge.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjubah}(h]h ]h"]h$]h&]uh1j"hjohhhhhNubj#)}(hEAll other ioctl commands are passed to the channel ioctl() function. h]h)}(hDAll other ioctl commands are passed to the channel ioctl() function.h]hDAll other ioctl commands are passed to the channel ioctl() function.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjubah}(h]h ]h"]h$]h&]uh1j"hjohhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhM3hjhhubh)}(h\The ioctl calls that are available on an instance that is attached to an interface unit are:h]h\The ioctl calls that are available on an instance that is attached to an interface unit are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjhhubj)}(hhh](j#)}(hPPPIOCSMRU sets the MRU (maximum receive unit) for the interface. The argument should point to an int containing the new MRU value. h]h)}(hPPPIOCSMRU sets the MRU (maximum receive unit) for the interface. The argument should point to an int containing the new MRU value.h]hPPPIOCSMRU sets the MRU (maximum receive unit) for the interface. The argument should point to an int containing the new MRU value.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hX`PPPIOCSFLAGS sets flags which control the operation of the interface. The argument should be a pointer to an int containing the new flags value. The bits in the flags value that can be set are: ================ ======================================== SC_COMP_TCP enable transmit TCP header compression SC_NO_TCP_CCID disable connection-id compression for TCP header compression SC_REJ_COMP_TCP disable receive TCP header decompression SC_CCP_OPEN Compression Control Protocol (CCP) is open, so inspect CCP packets SC_CCP_UP CCP is up, may (de)compress packets SC_LOOP_TRAFFIC send IP traffic to pppd SC_MULTILINK enable PPP multilink fragmentation on transmitted packets SC_MP_SHORTSEQ expect short multilink sequence numbers on received multilink fragments SC_MP_XSHORTSEQ transmit short multilink sequence nos. ================ ======================================== The values of these flags are defined in . Note that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option is not selected. h](h)}(hPPPIOCSFLAGS sets flags which control the operation of the interface. The argument should be a pointer to an int containing the new flags value. The bits in the flags value that can be set are:h]hPPPIOCSFLAGS sets flags which control the operation of the interface. The argument should be a pointer to an int containing the new flags value. The bits in the flags value that can be set are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjubh)}(hXo================ ======================================== SC_COMP_TCP enable transmit TCP header compression SC_NO_TCP_CCID disable connection-id compression for TCP header compression SC_REJ_COMP_TCP disable receive TCP header decompression SC_CCP_OPEN Compression Control Protocol (CCP) is open, so inspect CCP packets SC_CCP_UP CCP is up, may (de)compress packets SC_LOOP_TRAFFIC send IP traffic to pppd SC_MULTILINK enable PPP multilink fragmentation on transmitted packets SC_MP_SHORTSEQ expect short multilink sequence numbers on received multilink fragments SC_MP_XSHORTSEQ transmit short multilink sequence nos. ================ ======================================== h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j9hj6ubj:)}(hhh]h}(h]h ]h"]h$]h&]colwidthK(uh1j9hj6ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(h SC_COMP_TCPh]h SC_COMP_TCP}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hj[ubah}(h]h ]h"]h$]h&]uh1jYhjVubjZ)}(hhh]h)}(h&enable transmit TCP header compressionh]h&enable transmit TCP header compression}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjrubah}(h]h ]h"]h$]h&]uh1jYhjVubeh}(h]h ]h"]h$]h&]uh1jThjQubjU)}(hhh](jZ)}(hhh]h)}(hSC_NO_TCP_CCIDh]hSC_NO_TCP_CCID}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjubah}(h]h ]h"]h$]h&]uh1jYhjubjZ)}(hhh]h)}(h. Note that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option is not selected.h]hThe values of these flags are defined in . Note that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and SC_MP_XSHORTSEQ bits are ignored if the CONFIG_PPP_MULTILINK option is not selected.}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjubeh}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hXPPPIOCGFLAGS returns the value of the status/control flags for the interface unit. The argument should point to an int where the ioctl will store the flags value. As well as the values listed above for PPPIOCSFLAGS, the following bits may be set in the returned value: ================ ========================================= SC_COMP_RUN CCP compressor is running SC_DECOMP_RUN CCP decompressor is running SC_DC_ERROR CCP decompressor detected non-fatal error SC_DC_FERROR CCP decompressor detected fatal error ================ ========================================= h](h)}(hXPPPIOCGFLAGS returns the value of the status/control flags for the interface unit. The argument should point to an int where the ioctl will store the flags value. As well as the values listed above for PPPIOCSFLAGS, the following bits may be set in the returned value:h]hXPPPIOCGFLAGS returns the value of the status/control flags for the interface unit. The argument should point to an int where the ioctl will store the flags value. As well as the values listed above for PPPIOCSFLAGS, the following bits may be set in the returned value:}(hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjt ubh)}(hXj================ ========================================= SC_COMP_RUN CCP compressor is running SC_DECOMP_RUN CCP decompressor is running SC_DC_ERROR CCP decompressor detected non-fatal error SC_DC_FERROR CCP decompressor detected fatal error ================ ========================================= h]j0)}(hhh]j5)}(hhh](j:)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j9hj ubj:)}(hhh]h}(h]h ]h"]h$]h&]colwidthK)uh1j9hj ubjP)}(hhh](jU)}(hhh](jZ)}(hhh]h)}(h SC_COMP_RUNh]h SC_COMP_RUN}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubjZ)}(hhh]h)}(hCCP compressor is runningh]hCCP compressor is running}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]uh1jThj ubjU)}(hhh](jZ)}(hhh]h)}(h SC_DECOMP_RUNh]h SC_DECOMP_RUN}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubjZ)}(hhh]h)}(hCCP decompressor is runningh]hCCP decompressor is running}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]uh1jThj ubjU)}(hhh](jZ)}(hhh]h)}(h SC_DC_ERRORh]h SC_DC_ERROR}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubjZ)}(hhh]h)}(h)CCP decompressor detected non-fatal errorh]h)CCP decompressor detected non-fatal error}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhj/ ubah}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]uh1jThj ubjU)}(hhh](jZ)}(hhh]h)}(h SC_DC_FERRORh]h SC_DC_FERROR}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjO ubah}(h]h ]h"]h$]h&]uh1jYhjL ubjZ)}(hhh]h)}(h%CCP decompressor detected fatal errorh]h%CCP decompressor detected fatal error}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjf ubah}(h]h ]h"]h$]h&]uh1jYhjL ubeh}(h]h ]h"]h$]h&]uh1jThj ubeh}(h]h ]h"]h$]h&]uh1jOhj ubeh}(h]h ]h"]h$]h&]colsKuh1j4hj ubah}(h]h ]h"]h$]h&]uh1j/hj ubah}(h]h ]h"]h$]h&]uh1hhhhMthjt ubeh}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hXPPPIOCSCOMPRESS sets the parameters for packet compression or decompression. The argument should point to a ppp_option_data structure (defined in ), which contains a pointer/length pair which should describe a block of memory containing a CCP option specifying a compression method and its parameters. The ppp_option_data struct also contains a ``transmit`` field. If this is 0, the ioctl will affect the receive path, otherwise the transmit path. h]h)}(hXPPPIOCSCOMPRESS sets the parameters for packet compression or decompression. The argument should point to a ppp_option_data structure (defined in ), which contains a pointer/length pair which should describe a block of memory containing a CCP option specifying a compression method and its parameters. The ppp_option_data struct also contains a ``transmit`` field. If this is 0, the ioctl will affect the receive path, otherwise the transmit path.h](hXnPPPIOCSCOMPRESS sets the parameters for packet compression or decompression. The argument should point to a ppp_option_data structure (defined in ), which contains a pointer/length pair which should describe a block of memory containing a CCP option specifying a compression method and its parameters. The ppp_option_data struct also contains a }(hj hhhNhNubj)}(h ``transmit``h]htransmit}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh[ field. If this is 0, the ioctl will affect the receive path, otherwise the transmit path.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM{hj ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hdPPPIOCGUNIT returns, in the int pointed to by the argument, the unit number of this interface unit. h]h)}(hcPPPIOCGUNIT returns, in the int pointed to by the argument, the unit number of this interface unit.h]hcPPPIOCGUNIT returns, in the int pointed to by the argument, the unit number of this interface unit.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hXsPPPIOCSDEBUG sets the debug flags for the interface to the value in the int pointed to by the argument. Only the least significant bit is used; if this is 1 the generic layer will print some debug messages during its operation. This is only intended for debugging the generic PPP layer code; it is generally not helpful for working out why a PPP connection is failing. gAh]h)}(hXrPPPIOCSDEBUG sets the debug flags for the interface to the value in the int pointed to by the argument. Only the least significant bit is used; if this is 1 the generic layer will print some debug messages during its operation. This is only intended for debugging the generic PPP layer code; it is generally not helpful for working out why a PPP connection is failing.h]hXrPPPIOCSDEBUG sets the debug flags for the interface to the value in the int pointed to by the argument. Only the least significant bit is used; if this is 1 the generic layer will print some debug messages during its operation. This is only intended for debugging the generic PPP layer code; it is generally not helpful for working out why a PPP connection is failing.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(h^PPPIOCGDEBUG returns the debug flags for the interface in the int pointed to by the argument. h]h)}(h]PPPIOCGDEBUG returns the debug flags for the interface in the int pointed to by the argument.h]h]PPPIOCGDEBUG returns the debug flags for the interface in the int pointed to by the argument.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hXPPPIOCGIDLE returns the time, in seconds, since the last data packets were sent and received. The argument should point to a ppp_idle structure (defined in ). If the CONFIG_PPP_FILTER option is enabled, the set of packets which reset the transmit and receive idle timers is restricted to those which pass the ``active`` packet filter. Two versions of this command exist, to deal with user space expecting times as either 32-bit or 64-bit time_t seconds. h]h)}(hXPPPIOCGIDLE returns the time, in seconds, since the last data packets were sent and received. The argument should point to a ppp_idle structure (defined in ). If the CONFIG_PPP_FILTER option is enabled, the set of packets which reset the transmit and receive idle timers is restricted to those which pass the ``active`` packet filter. Two versions of this command exist, to deal with user space expecting times as either 32-bit or 64-bit time_t seconds.h](hXIPPPIOCGIDLE returns the time, in seconds, since the last data packets were sent and received. The argument should point to a ppp_idle structure (defined in ). If the CONFIG_PPP_FILTER option is enabled, the set of packets which reset the transmit and receive idle timers is restricted to those which pass the }(hj hhhNhNubj)}(h ``active``h]hactive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh packet filter. Two versions of this command exist, to deal with user space expecting times as either 32-bit or 64-bit time_t seconds.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hXPPPIOCSMAXCID sets the maximum connection-ID parameter (and thus the number of connection slots) for the TCP header compressor and decompressor. The lower 16 bits of the int pointed to by the argument specify the maximum connection-ID for the compressor. If the upper 16 bits of that int are non-zero, they specify the maximum connection-ID for the decompressor, otherwise the decompressor's maximum connection-ID is set to 15. h]h)}(hXPPPIOCSMAXCID sets the maximum connection-ID parameter (and thus the number of connection slots) for the TCP header compressor and decompressor. The lower 16 bits of the int pointed to by the argument specify the maximum connection-ID for the compressor. If the upper 16 bits of that int are non-zero, they specify the maximum connection-ID for the decompressor, otherwise the decompressor's maximum connection-ID is set to 15.h]hXPPPIOCSMAXCID sets the maximum connection-ID parameter (and thus the number of connection slots) for the TCP header compressor and decompressor. The lower 16 bits of the int pointed to by the argument specify the maximum connection-ID for the compressor. If the upper 16 bits of that int are non-zero, they specify the maximum connection-ID for the decompressor, otherwise the decompressor’s maximum connection-ID is set to 15.}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj> ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hXAPPPIOCSNPMODE sets the network-protocol mode for a given network protocol. The argument should point to an npioctl struct (defined in ). The ``protocol`` field gives the PPP protocol number for the protocol to be affected, and the ``mode`` field specifies what to do with packets for that protocol: ============= ============================================== NPMODE_PASS normal operation, transmit and receive packets NPMODE_DROP silently drop packets for this protocol NPMODE_ERROR drop packets and return an error on transmit NPMODE_QUEUE queue up packets for transmit, drop received packets ============= ============================================== At present NPMODE_ERROR and NPMODE_QUEUE have the same effect as NPMODE_DROP. h](h)}(hX?PPPIOCSNPMODE sets the network-protocol mode for a given network protocol. The argument should point to an npioctl struct (defined in ). The ``protocol`` field gives the PPP protocol number for the protocol to be affected, and the ``mode`` field specifies what to do with packets for that protocol:h](hPPPIOCSNPMODE sets the network-protocol mode for a given network protocol. The argument should point to an npioctl struct (defined in ). The }(hjZ hhhNhNubj)}(h ``protocol``h]hprotocol}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubhN field gives the PPP protocol number for the protocol to be affected, and the }(hjZ hhhNhNubj)}(h``mode``h]hmode}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ ubh; field specifies what to do with packets for that protocol:}(hjZ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjV ubh)}(hX============= ============================================== NPMODE_PASS normal operation, transmit and receive packets NPMODE_DROP silently drop packets for this protocol NPMODE_ERROR drop packets and return an error on transmit NPMODE_QUEUE queue up packets for transmit, drop received packets ============= ============================================== h]j0)}(hhh]j5)}(hhh](j:)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j9hj ubj:)}(hhh]h}(h]h ]h"]h$]h&]colwidthK.uh1j9hj ubjP)}(hhh](jU)}(hhh](jZ)}(hhh]h)}(h NPMODE_PASSh]h NPMODE_PASS}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubjZ)}(hhh]h)}(h.normal operation, transmit and receive packetsh]h.normal operation, transmit and receive packets}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]uh1jThj ubjU)}(hhh](jZ)}(hhh]h)}(h NPMODE_DROPh]h NPMODE_DROP}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubjZ)}(hhh]h)}(h'silently drop packets for this protocolh]h'silently drop packets for this protocol}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]uh1jThj ubjU)}(hhh](jZ)}(hhh]h)}(h NPMODE_ERRORh]h NPMODE_ERROR}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jYhj ubjZ)}(hhh]h)}(h,drop packets and return an error on transmith]h,drop packets and return an error on transmit}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5 ubah}(h]h ]h"]h$]h&]uh1jYhj ubeh}(h]h ]h"]h$]h&]uh1jThj ubjU)}(hhh](jZ)}(hhh]h)}(h NPMODE_QUEUEh]h NPMODE_QUEUE}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjU ubah}(h]h ]h"]h$]h&]uh1jYhjR ubjZ)}(hhh]h)}(h4queue up packets for transmit, drop received packetsh]h4queue up packets for transmit, drop received packets}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjl ubah}(h]h ]h"]h$]h&]uh1jYhjR ubeh}(h]h ]h"]h$]h&]uh1jThj ubeh}(h]h ]h"]h$]h&]uh1jOhj ubeh}(h]h ]h"]h$]h&]colsKuh1j4hj ubah}(h]h ]h"]h$]h&]uh1j/hj ubah}(h]h ]h"]h$]h&]uh1hhhhMhjV ubh)}(hMAt present NPMODE_ERROR and NPMODE_QUEUE have the same effect as NPMODE_DROP.h]hMAt present NPMODE_ERROR and NPMODE_QUEUE have the same effect as NPMODE_DROP.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjV ubeh}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hX*PPPIOCGNPMODE returns the network-protocol mode for a given protocol. The argument should point to an npioctl struct with the ``protocol`` field set to the PPP protocol number for the protocol of interest. On return the ``mode`` field will be set to the network- protocol mode for that protocol. h]h)}(hX)PPPIOCGNPMODE returns the network-protocol mode for a given protocol. The argument should point to an npioctl struct with the ``protocol`` field set to the PPP protocol number for the protocol of interest. On return the ``mode`` field will be set to the network- protocol mode for that protocol.h](hPPPIOCGNPMODE returns the network-protocol mode for a given protocol. The argument should point to an npioctl struct with the }(hj hhhNhNubj)}(h ``protocol``h]hprotocol}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhS field set to the PPP protocol number for the protocol of interest. On return the }(hj hhhNhNubj)}(h``mode``h]hmode}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhC field will be set to the network- protocol mode for that protocol.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hXPPPIOCSPASS and PPPIOCSACTIVE set the ``pass`` and ``active`` packet filters. These ioctls are only available if the CONFIG_PPP_FILTER option is selected. The argument should point to a sock_fprog structure (defined in ) containing the compiled BPF instructions for the filter. Packets are dropped if they fail the ``pass`` filter; otherwise, if they fail the ``active`` filter they are passed but they do not reset the transmit or receive idle timer. h]h)}(hXPPPIOCSPASS and PPPIOCSACTIVE set the ``pass`` and ``active`` packet filters. These ioctls are only available if the CONFIG_PPP_FILTER option is selected. The argument should point to a sock_fprog structure (defined in ) containing the compiled BPF instructions for the filter. Packets are dropped if they fail the ``pass`` filter; otherwise, if they fail the ``active`` filter they are passed but they do not reset the transmit or receive idle timer.h](h&PPPIOCSPASS and PPPIOCSACTIVE set the }(hj hhhNhNubj)}(h``pass``h]hpass}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh and }(hj hhhNhNubj)}(h ``active``h]hactive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhX packet filters. These ioctls are only available if the CONFIG_PPP_FILTER option is selected. The argument should point to a sock_fprog structure (defined in ) containing the compiled BPF instructions for the filter. Packets are dropped if they fail the }(hj hhhNhNubj)}(h``pass``h]hpass}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh% filter; otherwise, if they fail the }(hj hhhNhNubj)}(h ``active``h]hactive}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhQ filter they are passed but they do not reset the transmit or receive idle timer.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hXoPPPIOCSMRRU enables or disables multilink processing for received packets and sets the multilink MRRU (maximum reconstructed receive unit). The argument should point to an int containing the new MRRU value. If the MRRU value is 0, processing of received multilink fragments is disabled. This ioctl is only available if the CONFIG_PPP_MULTILINK option is selected. h]h)}(hXnPPPIOCSMRRU enables or disables multilink processing for received packets and sets the multilink MRRU (maximum reconstructed receive unit). The argument should point to an int containing the new MRRU value. If the MRRU value is 0, processing of received multilink fragments is disabled. This ioctl is only available if the CONFIG_PPP_MULTILINK option is selected.h]hXnPPPIOCSMRRU enables or disables multilink processing for received packets and sets the multilink MRRU (maximum reconstructed receive unit). The argument should point to an int containing the new MRRU value. If the MRRU value is 0, processing of received multilink fragments is disabled. This ioctl is only available if the CONFIG_PPP_MULTILINK option is selected.}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjR ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhMRhjhhubh)}(hLast modified: 7-feb-2002h]hLast modified: 7-feb-2002}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]interface-to-pppdah ]h"]interface to pppdah$]h&]uh1hhhhhhhhKubeh}(h](ppp-generic-driver-and-channel-interfaceah ]h"](ppp generic driver and channel interfaceah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjYfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j j j8j5jjjjj j u nametypes}(j j8jjj uh}(j hj5jjj;jjj ju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.