ng_patch.4 (4f9d94bf6491250b649f5bc931b6d93e68373005) | ng_patch.4 (d458747eb2ae0e21ab87278d9c3888336ce83633) |
---|---|
1.\" Copyright (c) 2010 Maxim Ignatenko <gelraen.ua@gmail.com> 2.\" Copyright (c) 2010 Vadim Goncharov <vadimnuclight@tpu.ru> 3.\" Copyright (c) 2015 Dmitry Vagin <daemon.hammer@ya.ru> 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 41 unchanged lines hidden (view full) --- 50is not used. 51If there is more than one modification operation, they are applied 52to packets sequentially in the order they were specified by the user. 53The data payload of a packet is viewed as an array of bytes, with a zero offset 54corresponding to the very first byte of packet headers, and the 55.Va length 56bytes beginning from 57.Va offset | 1.\" Copyright (c) 2010 Maxim Ignatenko <gelraen.ua@gmail.com> 2.\" Copyright (c) 2010 Vadim Goncharov <vadimnuclight@tpu.ru> 3.\" Copyright (c) 2015 Dmitry Vagin <daemon.hammer@ya.ru> 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 41 unchanged lines hidden (view full) --- 50is not used. 51If there is more than one modification operation, they are applied 52to packets sequentially in the order they were specified by the user. 53The data payload of a packet is viewed as an array of bytes, with a zero offset 54corresponding to the very first byte of packet headers, and the 55.Va length 56bytes beginning from 57.Va offset |
58as a single integer in network byte order. An additional offset can be optionally | 58as a single integer in network byte order. 59An additional offset can be optionally |
59requested at configuration time to account for packet type. 60.Sh HOOKS 61This node type has two hooks: 62.Bl -tag -width ".Va out" 63.It Va in 64Packets received on this hook are modified according to rules specified 65in the configuration and then forwarded to the 66.Ar out --- 16 unchanged lines hidden (view full) --- 83.Cm DLT_RAW 84(raw IP datagrams , no offset applied, the default) and 85.Cm DLT_EN10MB 86(Ethernet). DLT_ definitions can be found in 87.In net/bpf.h . 88If you want to work on the link layer header you must use no additional offset by specifying 89.Cm DLT_RAW . 90If | 60requested at configuration time to account for packet type. 61.Sh HOOKS 62This node type has two hooks: 63.Bl -tag -width ".Va out" 64.It Va in 65Packets received on this hook are modified according to rules specified 66in the configuration and then forwarded to the 67.Ar out --- 16 unchanged lines hidden (view full) --- 84.Cm DLT_RAW 85(raw IP datagrams , no offset applied, the default) and 86.Cm DLT_EN10MB 87(Ethernet). DLT_ definitions can be found in 88.In net/bpf.h . 89If you want to work on the link layer header you must use no additional offset by specifying 90.Cm DLT_RAW . 91If |
91.Cm EN10MB | 92.Cm EN10MB |
92is specified, then the optional additional offset will take into account the Ethernet header and a QinQ header if present. 93.It Dv NGM_PATCH_GETDLT Pq Ic getdlt 94This control message returns the data link type of the 95.Va in 96hook. 97.It Dv NGM_PATCH_SETCONFIG Pq Ic setconfig 98This command sets the sequence of modify operations 99that will be applied to incoming data on a hook. --- 162 unchanged lines hidden --- | 93is specified, then the optional additional offset will take into account the Ethernet header and a QinQ header if present. 94.It Dv NGM_PATCH_GETDLT Pq Ic getdlt 95This control message returns the data link type of the 96.Va in 97hook. 98.It Dv NGM_PATCH_SETCONFIG Pq Ic setconfig 99This command sets the sequence of modify operations 100that will be applied to incoming data on a hook. --- 162 unchanged lines hidden --- |