FaceMgmt » History » Version 100
Davide Pesavento, 11/07/2018 07:51 PM
1 | 20 | Junxiao Shi | # Face Management |
---|---|---|---|
2 | 1 | Junxiao Shi | |
3 | 82 | Davide Pesavento | {{>toc}} |
4 | 38 | Alex Afanasyev | |
5 | 20 | Junxiao Shi | **Face Management** is a module of [[Management|NFD Management protocol]]. |
6 | It provides: |
||
7 | 1 | Junxiao Shi | |
8 | 100 | Davide Pesavento | * commands to create, modify, and destroy faces |
9 | * a dataset containing the description of all active faces and their counters |
||
10 | * a dataset containing the description of all active channels |
||
11 | * a notification stream for face events |
||
12 | 1 | Junxiao Shi | |
13 | 45 | Junxiao Shi | Face Management commands, datasets, and notifications are available under namespace `ndn:/localhost/nfd/faces`. |
14 | 12 | Alex Afanasyev | |
15 | |||
16 | 20 | Junxiao Shi | ## FaceUri |
17 | 1 | Junxiao Shi | |
18 | 27 | Junxiao Shi | A FaceUri represents the underlying protocol and address used by a Face. |
19 | Every Face has two FaceUris: one for local endpoint, and the other for remote endpoint. |
||
20 | 1 | Junxiao Shi | |
21 | 27 | Junxiao Shi | ### UDP |
22 | 9 | Junxiao Shi | |
23 | 30 | Junxiao Shi | `udp[4|6]://<IP-or-host>[:<port>]` |
24 | 2 | Alex Afanasyev | |
25 | 9 | Junxiao Shi | Examples: |
26 | 1 | Junxiao Shi | |
27 | 20 | Junxiao Shi | * `udp4://192.0.2.1:6363` (canonical form) |
28 | * `udp6://[2001:db8::1]:6363` (canonical form) |
||
29 | 71 | Alex Afanasyev | * `udp6://[fe80::1068:dddb:fe26:fe3f%en0]:6363` (canonical form for link-local IPv6 addresses) |
30 | * `udp6://[fe80::1068:dddb:fe26:fe3f%25en0]:6363` (equivalent, but not canonical, version of the above FaceUri) |
||
31 | 1 | Junxiao Shi | * `udp://192.0.2.1` (remote-port defaults to 6363) |
32 | * `udp://example.net:6363` |
||
33 | * `udp4://example.net:6363` (resolve hostname to IPv4 address only) |
||
34 | 9 | Junxiao Shi | * `udp6://example.net:6363` (resolve hostname to IPv6 address only) |
35 | 27 | Junxiao Shi | * `udp4://224.0.23.170:56363` (multicast, canonical form) |
36 | 1 | Junxiao Shi | |
37 | 61 | Davide Pesavento | LocalUri of a NIC-associated UDP face has the form: |
38 | |||
39 | `udp[4|6]+dev://<NIC>:<port>` |
||
40 | |||
41 | 1 | Junxiao Shi | This is only used in face dataset. |
42 | 61 | Davide Pesavento | |
43 | 51 | Junxiao Shi | Examples: |
44 | |||
45 | 60 | Junxiao Shi | * `udp4+dev://eth1:6363` |
46 | * `udp6+dev://en0:6363` |
||
47 | 51 | Junxiao Shi | |
48 | 1 | Junxiao Shi | ### TCP |
49 | |||
50 | 30 | Junxiao Shi | `tcp[4|6]://<IP-or-host>[:<port>]` |
51 | 1 | Junxiao Shi | |
52 | Examples: |
||
53 | |||
54 | 20 | Junxiao Shi | * `tcp4://192.0.2.1:6363` (canonical form) |
55 | * `tcp6://[2001:db8::1]:6363` (canonical form) |
||
56 | 71 | Alex Afanasyev | * `tcp6://[fe80::1068:dddb:fe26:fe3f%en0]:6363` (canonical form for link-local IPv6 addresses) |
57 | * `tcp6://[fe80::1068:dddb:fe26:fe3f%25en0]:6363` (equivalent, but not canonical, version of the above FaceUri) |
||
58 | 1 | Junxiao Shi | * `tcp://192.0.2.1` (remote-port defaults to 6363) |
59 | * `tcp://example.net:6363` |
||
60 | 9 | Junxiao Shi | * `tcp4://example.net:6363` (resolve hostname to IPv4 address only) |
61 | 1 | Junxiao Shi | * `tcp6://example.net:6363` (resolve hostname to IPv6 address only) |
62 | |||
63 | ### UNIX stream |
||
64 | |||
65 | 9 | Junxiao Shi | `unix://<path>` |
66 | 1 | Junxiao Shi | |
67 | Examples: |
||
68 | |||
69 | 61 | Davide Pesavento | * `unix:///var/run/nfd.sock` (note that there are three forward-slashes after 'unix:') |
70 | 1 | Junxiao Shi | |
71 | 84 | Davide Pesavento | ### File descriptor |
72 | 30 | Junxiao Shi | |
73 | `fd://<file-descriptor>` |
||
74 | |||
75 | Examples: |
||
76 | |||
77 | * `fd://6` |
||
78 | |||
79 | 1 | Junxiao Shi | ### Ethernet |
80 | 27 | Junxiao Shi | |
81 | 42 | Junxiao Shi | `ether://[<MAC>]` |
82 | 1 | Junxiao Shi | |
83 | Examples: |
||
84 | 42 | Junxiao Shi | |
85 | * `ether://[08:00:27:01:01:01]` |
||
86 | 1 | Junxiao Shi | * `ether://[33:33:01:01:01:01]` (multicast) |
87 | |||
88 | 84 | Davide Pesavento | ### Network device |
89 | 1 | Junxiao Shi | |
90 | 61 | Davide Pesavento | `dev://<interface-name>` |
91 | 30 | Junxiao Shi | |
92 | Examples: |
||
93 | |||
94 | 1 | Junxiao Shi | * `dev://eth0` |
95 | |||
96 | ### Underlying protocol and FaceUri scheme |
||
97 | |||
98 | 67 | Junxiao Shi | Underlying protocol | Remote FaceUri scheme | Local FaceUri scheme |
99 | ----------------------- | -------------------------------- | -------------------------- |
||
100 | IPv4 UDP unicast | udp4 | udp4 |
||
101 | IPv6 UDP unicast | udp6 | udp6 |
||
102 | IPv4 UDP multicast | udp4 (multicast IP) | udp4 (local IP, same port) |
||
103 | IPv4 UDP NIC-associated | udp4 | udp4+dev |
||
104 | IPv6 UDP NIC-associated | udp6 | udp6+dev |
||
105 | IPv4 TCP | tcp4 | tcp4 |
||
106 | IPv6 TCP | tcp6 | tcp6 |
||
107 | UNIX stream | fd (file descriptor on NFD side) | unix (socket path) |
||
108 | Ethernet unicast | ether | dev |
||
109 | Ethernet multicast | ether | dev |
||
110 | WebSocket | wsclient | ws |
||
111 | 46 | Junxiao Shi | |
112 | ## Static Face Attributes |
||
113 | |||
114 | **FaceScope** indicates whether the face is local for [[ScopeControl|scope control]] purposes. |
||
115 | |||
116 | * non-local(=0) |
||
117 | * local(=1) |
||
118 | |||
119 | **FacePersistency** indicates whether the face is persistent. |
||
120 | |||
121 | * on-demand(=1), face closes if it remains idle for some time |
||
122 | * persistent(=0), face remains open until it's explicitly destroyed or there's a transport failure |
||
123 | * permanent(=2), face remains open until it's explicitly destroyed; transport failures will be recovered internally |
||
124 | |||
125 | **LinkType** indicates the type of communication link. |
||
126 | |||
127 | * point-to-point(=0), communication with one peer |
||
128 | * multi-access(=1), communication with a multicast group |
||
129 | 75 | Davide Pesavento | * ad-hoc(=2), communication over a wireless ad hoc network |
130 | 52 | Junxiao Shi | |
131 | **LocalFieldsEnabled** indicates whether the face allows [[NDNLPv2]] NextHopFaceId, CachePolicy, IncomingFaceId fields. |
||
132 | |||
133 | * yes(=1), allows these fields; this is valid only if FaceScope=local |
||
134 | * no(=0), disallows these fields |
||
135 | |||
136 | 74 | Eric Newberry | **LpReliabilityEnabled** indicates whether the face has the [[NDNLPv2]] reliability feature enabled. |
137 | 69 | Eric Newberry | |
138 | * yes(=1), enables this feature |
||
139 | * no(=0), disables this feature |
||
140 | 1 | Junxiao Shi | |
141 | 74 | Eric Newberry | **CongestionMarkingEnabled** indicates whether the face has congestion marking based upon send queue length enabled. |
142 | |||
143 | * yes(=1), enables this feature |
||
144 | * no(=0), disables this feature |
||
145 | |||
146 | **BaseCongestionMarkingInterval** indicates the base marking interval for congestion marking. |
||
147 | |||
148 | 77 | Eric Newberry | The value of this attribute is the base marking interval in nanoseconds, which is used to compute the interval at which congested packets will be marked. |
149 | 74 | Eric Newberry | |
150 | **DefaultCongestionThreshold** indicates the default congestion threshold if the face does not support retrieving the send queue capacity. |
||
151 | |||
152 | 76 | Davide Pesavento | The value of this attribute is the default congestion threshold in bytes. |
153 | 74 | Eric Newberry | |
154 | 85 | Eric Newberry | **Mtu** contains a user-specified MTU to override the automatic MTU of the transport. |
155 | |||
156 | 87 | Davide Pesavento | The value of this attribute is the MTU of the transport in bytes. A transport type may limit the acceptable range of this value or even ignore it altogether. |
157 | 85 | Eric Newberry | |
158 | 52 | Junxiao Shi | ### Flags and Mask |
159 | |||
160 | Some attributes are collected as inclusive OR into a **Flags** field in commands and datasets. |
||
161 | These attributes are: (bit 0 is the least significant bit) |
||
162 | |||
163 | * bit 0: LocalFieldsEnabled |
||
164 | 1 | Junxiao Shi | * bit 1: LpReliabilityEnabled |
165 | 74 | Eric Newberry | * bit 2: CongestionMarkingEnabled |
166 | 55 | Junxiao Shi | |
167 | 1 | Junxiao Shi | ## Control Commands |
168 | |||
169 | 20 | Junxiao Shi | [[ControlCommand]] **management-module**: `faces` |
170 | 41 | Junxiao Shi | |
171 | ### Create a face |
||
172 | 1 | Junxiao Shi | |
173 | **command-verb**: `create` |
||
174 | 46 | Junxiao Shi | |
175 | ControlParameters fields: |
||
176 | 1 | Junxiao Shi | |
177 | * **Uri** (required): canonical remote FaceUri of the face to create. |
||
178 | 72 | Davide Pesavento | * **LocalUri** (optional): canonical local FaceUri of the face to create; e.g., FaceUri of the local interface for an Ethernet unicast face. |
179 | 1 | Junxiao Shi | * **FacePersistency** (optional): either *persistent* or *permanent*; creating *on-demand* faces is not permitted. The default is *persistent*. See "static face attributes" for more information. |
180 | 74 | Eric Newberry | * **BaseCongestionMarkingInterval** (optional): see "static face attributes". |
181 | * **DefaultCongestionThreshold** (optional): see "static face attributes". |
||
182 | 85 | Eric Newberry | * **Mtu** (optional): see "static face attributes". |
183 | 72 | Davide Pesavento | * **Flags** (optional): see "static face attributes". |
184 | 83 | Davide Pesavento | * **Mask** (optional): MUST be specified if *Flags* is present, and omitted if *Flags* is omitted. |
185 | 1 | Junxiao Shi | |
186 | 65 | Davide Pesavento | This command allows the creation of UDP unicast, Ethernet unicast, and TCP faces only. |
187 | 50 | Junxiao Shi | If the command succeeds, the \<body> of the ControlResponse block contains the ControlParameters describing the current properties of the created face: |
188 | 1 | Junxiao Shi | |
189 | 64 | Alex Afanasyev | * **FaceId** |
190 | 1 | Junxiao Shi | * **Uri** |
191 | 64 | Alex Afanasyev | * **LocalUri** |
192 | 1 | Junxiao Shi | * **FacePersistency** |
193 | 78 | Eric Newberry | * **BaseCongestionMarkingInterval** (optional) |
194 | * **DefaultCongestionThreshold** (optional) |
||
195 | 85 | Eric Newberry | * **Mtu** (optional) |
196 | 90 | Eric Newberry | * **Flags**: contains effective values for the *LocalFieldsEnabled*, *LpReliabilityEnabled*, and *CongestionMarkingEnabled* bits. |
197 | 66 | Davide Pesavento | |
198 | 97 | Davide Pesavento | If this creation would conflict with an existing face (e.g., same underlying protocol and remote endpoint), the command fails with StatusCode 409, and the \<body> of the ControlResponse block contains the ControlParameters describing the existing face, with the same fields as above. |
199 | 52 | Junxiao Shi | |
200 | 1 | Junxiao Shi | If the request attempts to create a face other than UDP unicast, Ethernet unicast, or TCP, or if a static property specified in the request is not acceptable, the command fails with StatusCode 406. |
201 | 79 | Eric Newberry | |
202 | 1 | Junxiao Shi | If face creation fails due to a socket error (e.g. TCP connection timeout), the command fails with StatusCode 504. |
203 | |||
204 | 88 | Eric Newberry | If *BaseCongestionMarkingInterval* or *DefaultCongestionThreshold* are omitted from the ControlParameters sent with the creation command, the omitted static properties are left at their implementation-defined default values. |
205 | 1 | Junxiao Shi | |
206 | 95 | Eric Newberry | If *Mtu* is omitted from the ControlParameters sent with the creation command, the automatic MTU of the transport is used as the MTU of the face. A forwarder MAY impose an implementation-defined minimum to the MTU specified during face creation. The current minimum in NFD is 64 bytes. In the response, the *Mtu* field in ControlParameters contains the effective MTU of the face (in bytes), capped at a maximum of `MAX_NDN_PACKET_SIZE` (8800 bytes), even if the MTU of the underlying transport is infinite. If *Mtu* is omitted from the response, the face and/or forwarder does not support MTU reporting. |
207 | 85 | Eric Newberry | |
208 | 84 | Davide Pesavento | ### Update the static properties of a face |
209 | 1 | Junxiao Shi | |
210 | 52 | Junxiao Shi | **command-verb**: `update` |
211 | 1 | Junxiao Shi | |
212 | ControlParameters fields: |
||
213 | 64 | Alex Afanasyev | |
214 | * **FaceId** (optional) |
||
215 | 81 | Davide Pesavento | * **FacePersistency** (optional): one of *on-demand*, *persistent*, or *permanent*. See "static face attributes" for more information. |
216 | 1 | Junxiao Shi | * **BaseCongestionMarkingInterval** (optional): see "static face attributes". |
217 | * **DefaultCongestionThreshold** (optional): see "static face attributes". |
||
218 | 90 | Eric Newberry | * **Flags** (optional): allows *LocalFieldsEnabled*, *LpReliabilityEnabled*, and *CongestionMarkingEnabled* only. See "static face attributes" for more information. |
219 | 81 | Davide Pesavento | * **Mask** (optional): MUST be specified if *Flags* is present, and omitted if *Flags* is omitted. |
220 | 52 | Junxiao Shi | |
221 | 81 | Davide Pesavento | *FaceId* is the FaceId returned in [[FaceMgmt|Face Management]]. |
222 | If *FaceId* is omitted or is set to zero, it is implied to be that of the requesting face (self updating). |
||
223 | If the face does not exist, this command fails with StatusCode 404. |
||
224 | 1 | Junxiao Shi | |
225 | 79 | Eric Newberry | Static properties of the face are updated. |
226 | 81 | Davide Pesavento | If an optional property field is omitted or a bitfield is zero in *Mask*, that static property remains unchanged. |
227 | 1 | Junxiao Shi | If no static properties are changed, this command does nothing, but is still considered successful. |
228 | 55 | Junxiao Shi | |
229 | 1 | Junxiao Shi | If the command succeeds, \<body> in ControlResponse block contains ControlParameters describing the current properties of the face: |
230 | |||
231 | * **FaceId** |
||
232 | * **FacePersistency** |
||
233 | 78 | Eric Newberry | * **BaseCongestionMarkingInterval** (optional) |
234 | * **DefaultCongestionThreshold** (optional) |
||
235 | 81 | Davide Pesavento | * **Flags**: contains effective values for *LocalFieldsEnabled*, *LpReliabilityEnabled*, and *CongestionMarkingEnabled* bits. |
236 | 1 | Junxiao Shi | |
237 | If any of the requested changes is invalid, none of the changes should be performed, and this command fails with StatusCode 409. |
||
238 | 81 | Davide Pesavento | The \<body> in ControlResponse block contains ControlParameters that includes only invalid fields; if some of the bit fields chosen in *Flags*+*Mask* is invalid, the \<body> block should also contain a *Mask* field indicating which bits are invalid, and echo back the original *Flags* field. |
239 | If the request had been sent without those fields (or bitfields in *Mask*), it would have been successful. |
||
240 | 20 | Junxiao Shi | |
241 | 1 | Junxiao Shi | ### Destroy a face |
242 | 20 | Junxiao Shi | |
243 | 26 | Junxiao Shi | **command-verb:** `destroy` |
244 | 20 | Junxiao Shi | |
245 | 39 | Junxiao Shi | ControlParameters fields: |
246 | 1 | Junxiao Shi | |
247 | 64 | Alex Afanasyev | * **FaceId** (required) |
248 | 39 | Junxiao Shi | |
249 | 1 | Junxiao Shi | If the specified face does not exist, this command does nothing, but is still considered successful. |
250 | |||
251 | 40 | Junxiao Shi | ## Face Dataset |
252 | 1 | Junxiao Shi | |
253 | Description and counters of all active faces are published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/faces/list`. |
||
254 | 39 | Junxiao Shi | |
255 | Each face is represented by a **FaceStatus** block: |
||
256 | 1 | Junxiao Shi | |
257 | 39 | Junxiao Shi | FaceStatus ::= FACE-STATUS-TYPE TLV-LENGTH |
258 | FaceId |
||
259 | 99 | Davide Pesavento | Uri |
260 | 39 | Junxiao Shi | LocalUri |
261 | 1 | Junxiao Shi | ExpirationPeriod? |
262 | FaceScope |
||
263 | FacePersistency |
||
264 | LinkType |
||
265 | 78 | Eric Newberry | BaseCongestionMarkingInterval? |
266 | 1 | Junxiao Shi | DefaultCongestionThreshold? |
267 | 85 | Eric Newberry | Mtu? |
268 | 1 | Junxiao Shi | NInInterests |
269 | 67 | Junxiao Shi | NInData |
270 | 39 | Junxiao Shi | NInNacks |
271 | 67 | Junxiao Shi | NOutInterests |
272 | 49 | Junxiao Shi | NOutData |
273 | NOutNacks |
||
274 | 46 | Junxiao Shi | NInBytes |
275 | 1 | Junxiao Shi | NOutBytes |
276 | 96 | Alex Afanasyev | Flags |
277 | 46 | Junxiao Shi | |
278 | Uri ::= URI-TYPE TLV-LENGTH |
||
279 | 39 | Junxiao Shi | FaceUri in UTF-8 encoding |
280 | 46 | Junxiao Shi | |
281 | 1 | Junxiao Shi | LocalUri ::= LOCAL-URI-TYPE TLV-LENGTH |
282 | 46 | Junxiao Shi | FaceUri in UTF-8 encoding |
283 | 1 | Junxiao Shi | |
284 | ; other TLVs have nonNegativeInteger as value |
||
285 | |||
286 | 40 | Junxiao Shi | * **Uri** is a FaceUri representing remote endpoint. |
287 | 39 | Junxiao Shi | * **LocalUri** is a FaceUri representing local endpoint. |
288 | 40 | Junxiao Shi | * **ExpirationPeriod** is the remaining lifetime of this face. |
289 | 46 | Junxiao Shi | If this field is omitted, the face has infinite lifetime. |
290 | 40 | Junxiao Shi | Currently, this is applicable to on-demand datagram faces only. |
291 | 46 | Junxiao Shi | * **FaceScope** indicates whether the face is local for [[ScopeControl|scope control]] purposes. |
292 | 1 | Junxiao Shi | See "static face attributes" for more information. |
293 | 40 | Junxiao Shi | * **FacePersistency** indicates whether the face is persistent. |
294 | 1 | Junxiao Shi | See "static face attributes" for more information. |
295 | 52 | Junxiao Shi | * **LinkType** indicates the type of communication link |
296 | 1 | Junxiao Shi | See "static face attributes" for more information. |
297 | 77 | Eric Newberry | * **BaseCongestionMarkingInterval** indicates the base interval used to compute the interval at which congested packets will be marked (in nanoseconds). |
298 | 1 | Junxiao Shi | See "static face attributes" for more information. |
299 | 76 | Davide Pesavento | * **DefaultCongestionThreshold** indicates the default threshold for congestion if the face does not support retrieving the send queue capacity (in bytes). |
300 | 1 | Junxiao Shi | See "static face attributes" for more information. |
301 | 94 | Davide Pesavento | * **Mtu** contains the effective MTU of the face (in bytes), capped at `MAX_NDN_PACKET_SIZE` (8800 bytes), even if the MTU of the underlying transport is infinite. If this field is omitted, the forwarder and/or face does not support MTU reporting. |
302 | 85 | Eric Newberry | See "static face attributes" for more information. |
303 | 46 | Junxiao Shi | * **NInInterests**: number of incoming Interest packets since the face is established. |
304 | 67 | Junxiao Shi | * **NInData** counts the number of incoming Data packets since the face is established. |
305 | 46 | Junxiao Shi | * **NInNacks** counts the number of incoming Nack packets since the face is established. |
306 | 1 | Junxiao Shi | * **NOutInterests** counts the number of outgoing Interest packets since the face is established. |
307 | 67 | Junxiao Shi | * **NOutData** counts the number of outgoing Data packets since the face is established. |
308 | 37 | Junxiao Shi | * **NOutNacks** counts the number of outgoing Nack packets since the face is established. |
309 | * **NInBytes** counts the number of bytes of link layer packets received via this face. |
||
310 | This counter is initialized to zero when the face is established, and can wrap around after overflowing unsigned 64-bit integer range. |
||
311 | 1 | Junxiao Shi | * **NOutBytes** counts the number of bytes of link layer packets sent via this face. |
312 | This counter is initialized to zero when the face is established, and can wrap around after overflowing unsigned 64-bit integer range. |
||
313 | 98 | Davide Pesavento | * **Flags** contains these bitfields: *LocalFieldsEnabled*, *LpReliabilityEnabled*, *CongestionMarkingEnabled*. |
314 | See "static face attributes" for more information. |
||
315 | 37 | Junxiao Shi | |
316 | 84 | Davide Pesavento | ### Query operation |
317 | 1 | Junxiao Shi | |
318 | 37 | Junxiao Shi | The query operation allows one to retrieve a subset of face dataset that contains faces satisfying a filter. |
319 | |||
320 | To run a query, the consumer should express an Interest with Name: `ndn:/localhost/nfd/faces/query/<filter>`, where `<filter>` is a **FaceQueryFilter** block that specifies zero or more conditions. |
||
321 | |||
322 | FaceQueryFilter ::= FACE-QUERY-FILTER-TYPE TLV-LENGTH |
||
323 | 40 | Junxiao Shi | FaceId? |
324 | UriScheme? |
||
325 | Uri? |
||
326 | 37 | Junxiao Shi | LocalUri? |
327 | FaceScope? |
||
328 | 1 | Junxiao Shi | FacePersistency? |
329 | 37 | Junxiao Shi | LinkType? |
330 | |||
331 | UriScheme ::= URI-SCHEME-TYPE TLV-LENGTH |
||
332 | string in UTF-8 |
||
333 | |||
334 | 40 | Junxiao Shi | * **FaceId** permits a face if its FaceId equals the value |
335 | * **UriScheme** permits a face if the scheme part of its local FaceUri or remote FaceUri equals the value |
||
336 | * **Uri** permits a face if its remote FaceUri equals the value |
||
337 | 1 | Junxiao Shi | * **LocalUri** permits a face if its local FaceUri equals the value |
338 | * **FaceScope** permits a face if its *FaceScope* attribute equals the value |
||
339 | 39 | Junxiao Shi | * **FacePersistency** permits a face if its *FacePersistency* attribute equals the value |
340 | 37 | Junxiao Shi | * **LinkType** permits a face if its *LinkType* attribute equals the value |
341 | |||
342 | A face must satisfy ALL conditions to satisfy the filter. |
||
343 | 1 | Junxiao Shi | Faces that satisfy the filter are represented by **FaceStatus** blocks, and published as a [[StatusDataset]] under the Interest Name (a Data packet's Name would be `ndn:/localhost/nfd/faces/query/<filter>/<version>/<segment>`). |
344 | 37 | Junxiao Shi | |
345 | 41 | Junxiao Shi | Examples of filters: |
346 | 1 | Junxiao Shi | |
347 | 75 | Davide Pesavento | * a specific face: `FaceId=260` |
348 | * a specific TCP tunnel: `Uri=tcp4://192.0.2.1:6363` |
||
349 | (note: FaceUri must precisely match the canonical form: use either "tcp4" or "tcp6" instead of "tcp", use IP address instead of domain name, include port number) |
||
350 | * all TCP tunnels: `UriScheme=tcp` |
||
351 | (note: "tcp" permits both "tcp4" and "tcp6", "udp" permits both "udp4" and "udp6") |
||
352 | * all UDP multi-access faces: `UriScheme=udp` && `LinkType=multi-access` |
||
353 | * all Ethernet faces: `UriScheme=ether` |
||
354 | (note: UriScheme matches against both local and remote FaceUri, "dev" also works) |
||
355 | 1 | Junxiao Shi | * all faces: no condition |
356 | 75 | Davide Pesavento | (note: this is equivalent to face dataset, and face dataset should be preferred for this purpose) |
357 | 33 | Junxiao Shi | |
358 | ## Channel Dataset |
||
359 | |||
360 | 20 | Junxiao Shi | Description of all active channels is published as a [[StatusDataset|Status Dataset]] at `ndn:/localhost/nfd/faces/channels`. |
361 | 1 | Junxiao Shi | |
362 | Each channel is represented by a **ChannelStatus** block: |
||
363 | 20 | Junxiao Shi | |
364 | ChannelStatus := CHANNEL-STATUS-TYPE TLV-LENGTH |
||
365 | 21 | Alex Afanasyev | LocalUri |
366 | 20 | Junxiao Shi | |
367 | 83 | Davide Pesavento | * **LocalUri** is a FaceUri representing the channel's local endpoint. |
368 | 21 | Alex Afanasyev | |
369 | 37 | Junxiao Shi | ## Face Status Change Notification |
370 | |||
371 | Face status change events are published as a [[Notification|Notification Stream]] at `ndn:/localhost/nfd/faces/events`. |
||
372 | 1 | Junxiao Shi | Notifications of all faces are sent into the same notification stream. |
373 | 37 | Junxiao Shi | |
374 | 83 | Davide Pesavento | The Content of each notification Data packet is a **FaceEventNotification** block: |
375 | 23 | Alex Afanasyev | |
376 | 37 | Junxiao Shi | FaceEventNotification ::= FACE-EVENT-NOTIFICATION-TYPE TLV-LENGTH |
377 | 40 | Junxiao Shi | FaceEventKind |
378 | FaceId |
||
379 | Uri |
||
380 | 25 | Junxiao Shi | LocalUri |
381 | 23 | Alex Afanasyev | FaceScope |
382 | FacePersistency |
||
383 | 58 | Eric Newberry | LinkType |
384 | 25 | Junxiao Shi | Flags |
385 | 23 | Alex Afanasyev | |
386 | 9 | Junxiao Shi | FaceEventKind ::= FACE-EVENT-KIND-TYPE TLV-LENGTH |
387 | nonNegativeInteger |
||
388 | |||
389 | 1 | Junxiao Shi | **FaceEventKind** indicates the kind of event. Its possible values are: |
390 | 34 | Junxiao Shi | |
391 | 83 | Davide Pesavento | * 1 = face is created |
392 | * 2 = face is destroyed |
||
393 | * 3 = face goes UP (from DOWN state) |
||
394 | * 4 = face goes DOWN (from UP state) |
||
395 | 32 | Junxiao Shi | |
396 | 20 | Junxiao Shi | ## TLV-TYPE assignments |
397 | |||
398 | Type | Assigned value | Assigned value (hex) |
||
399 | 39 | Junxiao Shi | ------------------------------------------- | ----------------- | -------------------- |
400 | 40 | Junxiao Shi | FaceStatus | 128 | 0x80 |
401 | LocalUri | 129 | 0x81 |
||
402 | ChannelStatus | 130 | 0x82 |
||
403 | 75 | Davide Pesavento | UriScheme | 131 | 0x83 |
404 | 1 | Junxiao Shi | FaceScope | 132 | 0x84 |
405 | FacePersistency | 133 | 0x85 |
||
406 | LinkType | 134 | 0x86 |
||
407 | 74 | Eric Newberry | BaseCongestionMarkingInterval | 135 | 0x87 |
408 | 1 | Junxiao Shi | DefaultCongestionThreshold | 136 | 0x88 |
409 | 85 | Eric Newberry | Mtu | 137 | 0x89 |
410 | 67 | Junxiao Shi | NInInterests | 144 | 0x90 |
411 | 48 | Junxiao Shi | NInData | 145 | 0x91 |
412 | 1 | Junxiao Shi | NInNacks | 151 | 0x97 |
413 | 67 | Junxiao Shi | NOutInterests | 146 | 0x92 |
414 | 1 | Junxiao Shi | NOutData | 147 | 0x93 |
415 | NOutNacks | 152 | 0x98 |
||
416 | NInBytes | 148 | 0x94 |
||
417 | 39 | Junxiao Shi | NOutBytes | 149 | 0x95 |
418 | 1 | Junxiao Shi | FaceQueryFilter | 150 | 0x96 |
419 | FaceEventNotification | 192 | 0xc0 |
||
420 | FaceEventKind | 193 | 0xc1 |
||
421 | (reserved, formerly FaceFlags) | 194 | 0xc2 |