Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: networking: convert ppp_generic.txt to ReST

- add SPDX header;
- adjust title markup;
- mark code blocks and literals as such;
- mark tables as such;
- adjust identation, whitespaces and blank lines where needed;
- add to networking/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Mauro Carvalho Chehab and committed by
David S. Miller
71120802 32c01266

+33 -20
+1
Documentation/networking/index.rst
··· 93 93 phonet 94 94 pktgen 95 95 plip 96 + ppp_generic 96 97 97 98 .. only:: subproject and html 98 99
+32 -20
Documentation/networking/ppp_generic.txt Documentation/networking/ppp_generic.rst
··· 1 - PPP Generic Driver and Channel Interface 2 - ---------------------------------------- 1 + .. SPDX-License-Identifier: GPL-2.0 3 2 4 - Paul Mackerras 3 + ======================================== 4 + PPP Generic Driver and Channel Interface 5 + ======================================== 6 + 7 + Paul Mackerras 5 8 paulus@samba.org 9 + 6 10 7 Feb 2002 7 11 8 12 The generic PPP driver in linux-2.4 provides an implementation of the ··· 23 19 * simple packet filtering 24 20 25 21 For sending and receiving PPP frames, the generic PPP driver calls on 26 - the services of PPP `channels'. A PPP channel encapsulates a 22 + the services of PPP ``channels``. A PPP channel encapsulates a 27 23 mechanism for transporting PPP frames from one machine to another. A 28 24 PPP channel implementation can be arbitrarily complex internally but 29 25 has a very simple interface with the generic PPP code: it merely has ··· 106 102 async tty, this can involve setting the tty speed and modes, issuing 107 103 modem commands, and then going through some sort of dialog with the 108 104 remote system to invoke PPP service there. We refer to this process 109 - as `discovery'. Then the user-level process tells the medium to 105 + as ``discovery``. Then the user-level process tells the medium to 110 106 become a PPP channel and register itself with the generic PPP layer. 111 107 The channel then has to report the channel number assigned to it back 112 108 to the user-level process. From that point, the PPP negotiation code ··· 115 111 116 112 At the interface to the PPP generic layer, PPP frames are stored in 117 113 skbuff structures and start with the two-byte PPP protocol number. 118 - The frame does *not* include the 0xff `address' byte or the 0x03 119 - `control' byte that are optionally used in async PPP. Nor is there 114 + The frame does *not* include the 0xff ``address`` byte or the 0x03 115 + ``control`` byte that are optionally used in async PPP. Nor is there 120 116 any escaping of control characters, nor are there any FCS or framing 121 117 characters included. That is all the responsibility of the channel 122 118 code, if it is needed for the particular medium. That is, the skbuffs ··· 125 121 must be in the same format. 126 122 127 123 The channel must provide an instance of a ppp_channel struct to 128 - represent the channel. The channel is free to use the `private' field 129 - however it wishes. The channel should initialize the `mtu' and 130 - `hdrlen' fields before calling ppp_register_channel() and not change 131 - them until after ppp_unregister_channel() returns. The `mtu' field 124 + represent the channel. The channel is free to use the ``private`` field 125 + however it wishes. The channel should initialize the ``mtu`` and 126 + ``hdrlen`` fields before calling ppp_register_channel() and not change 127 + them until after ppp_unregister_channel() returns. The ``mtu`` field 132 128 represents the maximum size of the data part of the PPP frames, that 133 129 is, it does not include the 2-byte protocol number. 134 130 135 131 If the channel needs some headroom in the skbuffs presented to it for 136 132 transmission (i.e., some space free in the skbuff data area before the 137 - start of the PPP frame), it should set the `hdrlen' field of the 133 + start of the PPP frame), it should set the ``hdrlen`` field of the 138 134 ppp_channel struct to the amount of headroom required. The generic 139 135 PPP layer will attempt to provide that much headroom but the channel 140 136 should still check if there is sufficient headroom and copy the skbuff ··· 326 322 interface. The argument should be a pointer to an int containing 327 323 the new flags value. The bits in the flags value that can be set 328 324 are: 325 + 326 + ================ ======================================== 329 327 SC_COMP_TCP enable transmit TCP header compression 330 328 SC_NO_TCP_CCID disable connection-id compression for 331 329 TCP header compression ··· 341 335 SC_MP_SHORTSEQ expect short multilink sequence 342 336 numbers on received multilink fragments 343 337 SC_MP_XSHORTSEQ transmit short multilink sequence nos. 338 + ================ ======================================== 344 339 345 340 The values of these flags are defined in <linux/ppp-ioctl.h>. Note 346 341 that the values of the SC_MULTILINK, SC_MP_SHORTSEQ and ··· 352 345 interface unit. The argument should point to an int where the ioctl 353 346 will store the flags value. As well as the values listed above for 354 347 PPPIOCSFLAGS, the following bits may be set in the returned value: 348 + 349 + ================ ========================================= 355 350 SC_COMP_RUN CCP compressor is running 356 351 SC_DECOMP_RUN CCP decompressor is running 357 352 SC_DC_ERROR CCP decompressor detected non-fatal error 358 353 SC_DC_FERROR CCP decompressor detected fatal error 354 + ================ ========================================= 359 355 360 356 * PPPIOCSCOMPRESS sets the parameters for packet compression or 361 357 decompression. The argument should point to a ppp_option_data 362 358 structure (defined in <linux/ppp-ioctl.h>), which contains a 363 359 pointer/length pair which should describe a block of memory 364 360 containing a CCP option specifying a compression method and its 365 - parameters. The ppp_option_data struct also contains a `transmit' 361 + parameters. The ppp_option_data struct also contains a ``transmit`` 366 362 field. If this is 0, the ioctl will affect the receive path, 367 363 otherwise the transmit path. 368 364 ··· 387 377 ppp_idle structure (defined in <linux/ppp_defs.h>). If the 388 378 CONFIG_PPP_FILTER option is enabled, the set of packets which reset 389 379 the transmit and receive idle timers is restricted to those which 390 - pass the `active' packet filter. 380 + pass the ``active`` packet filter. 391 381 Two versions of this command exist, to deal with user space 392 382 expecting times as either 32-bit or 64-bit time_t seconds. 393 383 ··· 401 391 402 392 * PPPIOCSNPMODE sets the network-protocol mode for a given network 403 393 protocol. The argument should point to an npioctl struct (defined 404 - in <linux/ppp-ioctl.h>). The `protocol' field gives the PPP protocol 405 - number for the protocol to be affected, and the `mode' field 394 + in <linux/ppp-ioctl.h>). The ``protocol`` field gives the PPP protocol 395 + number for the protocol to be affected, and the ``mode`` field 406 396 specifies what to do with packets for that protocol: 407 397 398 + ============= ============================================== 408 399 NPMODE_PASS normal operation, transmit and receive packets 409 400 NPMODE_DROP silently drop packets for this protocol 410 401 NPMODE_ERROR drop packets and return an error on transmit 411 402 NPMODE_QUEUE queue up packets for transmit, drop received 412 403 packets 404 + ============= ============================================== 413 405 414 406 At present NPMODE_ERROR and NPMODE_QUEUE have the same effect as 415 407 NPMODE_DROP. 416 408 417 409 * PPPIOCGNPMODE returns the network-protocol mode for a given 418 410 protocol. The argument should point to an npioctl struct with the 419 - `protocol' field set to the PPP protocol number for the protocol of 420 - interest. On return the `mode' field will be set to the network- 411 + ``protocol`` field set to the PPP protocol number for the protocol of 412 + interest. On return the ``mode`` field will be set to the network- 421 413 protocol mode for that protocol. 422 414 423 - * PPPIOCSPASS and PPPIOCSACTIVE set the `pass' and `active' packet 415 + * PPPIOCSPASS and PPPIOCSACTIVE set the ``pass`` and ``active`` packet 424 416 filters. These ioctls are only available if the CONFIG_PPP_FILTER 425 417 option is selected. The argument should point to a sock_fprog 426 418 structure (defined in <linux/filter.h>) containing the compiled BPF 427 419 instructions for the filter. Packets are dropped if they fail the 428 - `pass' filter; otherwise, if they fail the `active' filter they are 420 + ``pass`` filter; otherwise, if they fail the ``active`` filter they are 429 421 passed but they do not reset the transmit or receive idle timer. 430 422 431 423 * PPPIOCSMRRU enables or disables multilink processing for received