Skip to content

Commit b482c72

Browse files
fxduponttmarkwalder
authored andcommitted
[#3414] Followed tmark's idea
1 parent fee3689 commit b482c72

File tree

1 file changed

+118
-30
lines changed

1 file changed

+118
-30
lines changed

src/lib/dhcpsrv/database_backends.dox

Lines changed: 118 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,53 @@
126126

127127
@subsubsection lease4-csv DHCPv4 lease entry format in CSV files
128128

129-
- <b>address</b> - IPv4 address
130-
- <b>hwaddr</b> - hardware address (without the hardware type)
131-
- <b>client_id</b> - client identifier
132-
- <b>valid_lifetime</b> - valid lifetime (uint32_t)
133-
- <b>expire</b> - expiration date (uint64_t, cltt + valid lifetime)
134-
- <b>subnet_id</b> - DHCPv4 subnet identifier (uint32_t)
135-
- <b>fqdn_fwd</b> - FQDN forward DNS RR update flag (bool, 0 or 1)
136-
- <b>fqdn_rev</b> - FQDN reverse DNS RR update flag (bool, 0 or 1)
137-
- <b>hostname</b> - hostname (separators are escaped)
138-
- <b>state</b> - lease state (uint32_t, 0 to 3)
139-
- <b>user_context</b> - user context (separators are escaped)
140-
- <b>pool_id</b> - pool identifier (uint32_t)
129+
- <b>address</b> - IPv4 address \n
130+
type: string \n
131+
example: `192.0.2.1
132+
133+
- <b>hwaddr</b> - hardware address (without the hardware type) \n
134+
type: string \n
135+
example: '00:01:02:03:04:05`
136+
137+
- <b>client_id</b> - client identifier \n
138+
type: string \n
139+
example: `01:02:03:03:04:aa:bb:cc`
140+
141+
- <b>valid_lifetime</b> - valid lifetime \n
142+
type: uint32_t \n
143+
example: 200
144+
145+
- <b>expire</b> - expiration date \n
146+
type: uint64_t (cltt + valid lifetime) \n
147+
example: 1733517739
148+
149+
- <b>subnet_id</b> - DHCPv4 subnet identifier \n
150+
type: int32_t (0 and max excluded) \n
151+
example: 1
152+
153+
- <b>fqdn_fwd</b> - FQDN forward DNS RR update flag \n
154+
type: bool (0 or 1) \n
155+
example: 0
156+
157+
- <b>fqdn_rev</b> - FQDN reverse DNS RR update flag \n
158+
type: bool (0 or 1) \n
159+
example: 1
160+
161+
- <b>hostname</b> - hostname \n
162+
type: string (separators are escaped) \n
163+
example: foo.bar
164+
165+
- <b>state</b> - lease state \n
166+
type: int32_t (0 to 3) \n
167+
example: 0
168+
169+
- <b>user_context</b> - user context \n
170+
type: string (separators are escaped) \n
171+
example: <tt>{ \"foo\": true }</tt>
172+
173+
- <b>pool_id</b> - pool identifier \n
174+
type: uint32_t \n
175+
example: 0
141176

142177
for instance:
143178
\verbatim
@@ -148,24 +183,77 @@
148183

149184
@subsection lease6-csv DHCPv6 lease entry format in CSV files
150185

151-
- <b>address</b> - IPv6 address
152-
- <b>DUID</b> - client DUID
153-
- <b>valid_lifetime</b> - valid lifetime (uint32_t)
154-
- <b>expire</b> - expiration date (uint64_t, cltt + valid lifetime)
155-
- <b>subnet_id</b> - DHCPv6 subnet identifier (uint32_t)
156-
- <b>pref_lifetime</b> - preferred lifetime (uint32_t)
157-
- <b>lease_type</b> - lease type (Lease::Type enum0 for NA, 2 for PD)
158-
- <b>iaid</b> - IA identifier (uint32_t)
159-
- <b>prefix_len</b> - prefix length (uint8_t, 0 to 128)
160-
- <b>fqdn_fwd</b> - FQDN forward DNS RR update flag (bool, 0 or 1)
161-
- <b>fqdn_rev</b> - FQDN reverse DNS RR update flag (bool, 0 or 1)
162-
- <b>hostname</b> - hostname (separators are escaped)
163-
- <b>hwaddr</b> - hardware address (hardware type is in hwtype column)
164-
- <b>state</b> - lease state (uint32_t, 0 to 3)
165-
- <b>user_context</b> - user context (separators are escaped)
166-
- <b>hwtype</b> - hardware type (uint16_t)
167-
- <b>hwaddr_source</b> - source of hardware address and type (uint32_t, 8 bit mask)
168-
- <b>pool_id</b> - pool identifier (uint32_t)
186+
- <b>address</b> - IPv6 address \n
187+
type: string \n
188+
example: 2001:db8:1::1
189+
190+
- <b>DUID</b> - client DUID \n
191+
type: string \n
192+
example: 01:02:03:04:05:aa:bb:cc
193+
194+
- <b>valid_lifetime</b> - valid lifetime \n
195+
type: uint32_t \n
196+
example: 200
197+
198+
- <b>expire</b> - expiration date \n
199+
type: uint64_t (cltt + valid lifetime) \n
200+
example: 1733517739
201+
202+
- <b>subnet_id</b> - DHCPv6 subnet identifier \n
203+
type: int32_t (0 and max excluded) \n
204+
example: 1
205+
206+
- <b>pref_lifetime</b> - preferred lifetime \n
207+
type: uint32_t \n
208+
example: 100
209+
210+
- <b>lease_type</b> - lease type \n
211+
type: Lease::Type enum (0 for NA, 2 for PD) \n
212+
example: 0
213+
214+
- <b>iaid</b> - IA identifier \n
215+
type: uint32_t
216+
example: 1
217+
218+
- <b>prefix_len</b> - prefix length \n
219+
type: uint8_t (0 to 128)
220+
example: 64
221+
222+
- <b>fqdn_fwd</b> - FQDN forward DNS RR update flag \n
223+
type: bool (0 or 1) \n
224+
example: 0
225+
226+
- <b>fqdn_rev</b> - FQDN reverse DNS RR update flag \n
227+
type: bool (0 or 1) \n
228+
example: 1
229+
230+
- <b>hostname</b> - hostname \n
231+
type: string (separators are escaped) \n
232+
example: foo.bar
233+
234+
- <b>hwaddr</b> - hardware address (hardware type is in hwtype column) \n
235+
type: string \n
236+
example: '00:01:02:03:04:05`
237+
238+
- <b>state</b> - lease state \n
239+
type: int32_t (0 to 3) \n
240+
example: 0
241+
242+
- <b>user_context</b> - user context \n
243+
type: string (separators are escaped) \n
244+
example: <tt>{ \"foo\": true }</tt>
245+
246+
- <b>hwtype</b> - hardware type \n
247+
type: uint16_t (can be empty/omitted) \n
248+
example: 1
249+
250+
- <b>hwaddr_source</b> - source of hardware address and type \n
251+
tyoe: uint32_t (one bit from an 8 bit mask, can be empty/omitted) \n
252+
example: 0
253+
254+
- <b>pool_id</b> - pool identifier \n
255+
type: uint32_t \n
256+
example: 0
169257

170258
For instance:
171259
\verbatim

0 commit comments

Comments
 (0)