FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
ikev2_cli.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #include <vlib/vlib.h>
16 #include <vnet/vnet.h>
17 #include <vppinfra/error.h>
18 #include <vnet/ipsec/ipsec_sa.h>
19 #include <plugins/ikev2/ikev2.h>
21 
22 u8 *
23 format_ikev2_id_type_and_data (u8 * s, va_list * args)
24 {
25  ikev2_id_t *id = va_arg (*args, ikev2_id_t *);
26 
27  if (id->type == 0 || vec_len (id->data) == 0)
28  return format (s, "none");
29 
30  s = format (s, "id-type %U data ", format_ikev2_id_type, id->type);
31 
32  switch (id->type)
33  {
34  case IKEV2_ID_TYPE_ID_IPV4_ADDR:
35  s = format (s, "%U", format_ip4_address, id->data);
36  break;
37  case IKEV2_ID_TYPE_ID_IPV6_ADDR:
38  s = format (s, "%U", format_ip6_address, id->data);
39  break;
40  case IKEV2_ID_TYPE_ID_FQDN: /* fallthrough */
41  case IKEV2_ID_TYPE_ID_RFC822_ADDR:
42  s = format (s, "%v", id->data);
43  break;
44  default:
45  s = format (s, "0x%U", format_hex_bytes, &id->data,
46  (uword) (vec_len (id->data)));
47  break;
48  }
49 
50  return s;
51 }
52 
53 static u8 *
54 format_ikev2_traffic_selector (u8 * s, va_list * va)
55 {
56  ikev2_ts_t *ts = va_arg (*va, ikev2_ts_t *);
57  u32 index = va_arg (*va, u32);
58 
59  s = format (s, "%u type %u protocol_id %u addr "
60  "%U - %U port %u - %u\n",
61  index, ts->ts_type, ts->protocol_id,
64  clib_net_to_host_u16 (ts->start_port),
65  clib_net_to_host_u16 (ts->end_port));
66  return s;
67 }
68 
69 static u8 *
70 format_ikev2_child_sa (u8 * s, va_list * va)
71 {
72  ikev2_child_sa_t *child = va_arg (*va, ikev2_child_sa_t *);
73  u32 index = va_arg (*va, u32);
74  ikev2_ts_t *ts;
76  u8 *c = 0;
77 
78  u32 indent = format_get_indent (s);
79  indent += 1;
80 
81  s = format (s, "child sa %u:", index);
82 
84  IKEV2_TRANSFORM_TYPE_ENCR);
85  c = format (c, "%U ", format_ikev2_sa_transform, tr);
86 
88  IKEV2_TRANSFORM_TYPE_INTEG);
89  c = format (c, "%U ", format_ikev2_sa_transform, tr);
90 
92  IKEV2_TRANSFORM_TYPE_ESN);
93  c = format (c, "%U ", format_ikev2_sa_transform, tr);
94 
95  s = format (s, "%v\n", c);
96  vec_free (c);
97 
98  s = format (s, "%Uspi(i) %lx spi(r) %lx\n", format_white_space, indent,
99  child->i_proposals ? child->i_proposals[0].spi : 0,
100  child->r_proposals ? child->r_proposals[0].spi : 0);
101 
102  s = format (s, "%USK_e i:%U\n%Ur:%U\n",
103  format_white_space, indent,
104  format_hex_bytes, child->sk_ei, vec_len (child->sk_ei),
105  format_white_space, indent + 6,
106  format_hex_bytes, child->sk_er, vec_len (child->sk_er));
107  if (child->sk_ai)
108  {
109  s = format (s, "%USK_a i:%U\n%Ur:%U\n",
110  format_white_space, indent,
111  format_hex_bytes, child->sk_ai, vec_len (child->sk_ai),
112  format_white_space, indent + 6,
113  format_hex_bytes, child->sk_ar, vec_len (child->sk_ar));
114  }
115  s = format (s, "%Utraffic selectors (i):", format_white_space, indent);
116  vec_foreach (ts, child->tsi)
117  s = format (s, "%U", format_ikev2_traffic_selector, ts, ts - child->tsi);
118  s = format (s, "%Utraffic selectors (r):", format_white_space, indent);
119  vec_foreach (ts, child->tsr)
120  s = format (s, "%U", format_ikev2_traffic_selector, ts, ts - child->tsr);
121  return s;
122 }
123 
124 static u8 *
125 format_ikev2_sa (u8 * s, va_list * va)
126 {
127  ikev2_sa_t *sa = va_arg (*va, ikev2_sa_t *);
128  int details = va_arg (*va, int);
130  ikev2_child_sa_t *child;
131  u32 indent = 1;
132 
133  s = format (s, "iip %U ispi %lx rip %U rspi %lx",
134  format_ip_address, &sa->iaddr, sa->ispi,
135  format_ip_address, &sa->raddr, sa->rspi);
136  if (!details)
137  return s;
138 
139  s = format (s, "\n%U", format_white_space, indent);
140 
141  tr = ikev2_sa_get_td_for_type (sa->r_proposals, IKEV2_TRANSFORM_TYPE_ENCR);
142  s = format (s, "%U ", format_ikev2_sa_transform, tr);
143 
144  tr = ikev2_sa_get_td_for_type (sa->r_proposals, IKEV2_TRANSFORM_TYPE_PRF);
145  s = format (s, "%U ", format_ikev2_sa_transform, tr);
146 
147  tr = ikev2_sa_get_td_for_type (sa->r_proposals, IKEV2_TRANSFORM_TYPE_INTEG);
148  s = format (s, "%U ", format_ikev2_sa_transform, tr);
149 
150  tr = ikev2_sa_get_td_for_type (sa->r_proposals, IKEV2_TRANSFORM_TYPE_DH);
151  s = format (s, "%U", format_ikev2_sa_transform, tr);
152 
153  s = format (s, "\n%U", format_white_space, indent);
154 
155  s = format (s, "nonce i:%U\n%Ur:%U\n",
157  format_white_space, indent + 6,
159 
160  s = format (s, "%USK_d %U\n", format_white_space, indent,
161  format_hex_bytes, sa->sk_d, vec_len (sa->sk_d));
162  if (sa->sk_ai)
163  {
164  s = format (s, "%USK_a i:%U\n%Ur:%U\n",
165  format_white_space, indent,
166  format_hex_bytes, sa->sk_ai, vec_len (sa->sk_ai),
167  format_white_space, indent + 6,
168  format_hex_bytes, sa->sk_ar, vec_len (sa->sk_ar));
169  }
170  s = format (s, "%USK_e i:%U\n%Ur:%U\n",
171  format_white_space, indent,
172  format_hex_bytes, sa->sk_ei, vec_len (sa->sk_ei),
173  format_white_space, indent + 6,
174  format_hex_bytes, sa->sk_er, vec_len (sa->sk_er));
175  s = format (s, "%USK_p i:%U\n%Ur:%U\n",
176  format_white_space, indent,
177  format_hex_bytes, sa->sk_pi, vec_len (sa->sk_pi),
178  format_white_space, indent + 6,
179  format_hex_bytes, sa->sk_pr, vec_len (sa->sk_pr));
180 
181  s = format (s, "%Uidentifier (i) %U\n",
182  format_white_space, indent,
184  s = format (s, "%Uidentifier (r) %U\n",
185  format_white_space, indent,
187 
188  vec_foreach (child, sa->childs)
189  {
190  s = format (s, "%U%U", format_white_space, indent + 2,
191  format_ikev2_child_sa, child, child - sa->childs);
192  }
193 
194  s = format (s, "Stats:\n");
195  s = format (s, " keepalives :%u\n", sa->stats.n_keepalives);
196  s = format (s, " rekey :%u\n", sa->stats.n_rekey_req);
197  s = format (s, " SA init :%u (retransmit: %u)\n", sa->stats.n_sa_init_req,
199  s = format (s, " retransmit: %u\n", sa->stats.n_retransmit);
200  s = format (s, " SA auth :%u\n", sa->stats.n_sa_auth_req);
201 
202  return s;
203 }
204 
205 static clib_error_t *
207  unformat_input_t * input, vlib_cli_command_t * cmd)
208 {
209  unformat_input_t _line_input, *line_input = &_line_input;
210  ikev2_main_t *km = &ikev2_main;
212  ikev2_sa_t *sa;
213  u64 rspi;
214  u8 *s = 0;
215  int details = 0, show_one = 0;
216 
217  if (unformat_user (input, unformat_line_input, line_input))
218  {
219  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
220  {
221  if (unformat (line_input, "rspi %lx", &rspi))
222  {
223  show_one = 1;
224  }
225  else if (unformat (line_input, "details"))
226  details = 1;
227  else
228  break;
229  }
230  unformat_free (line_input);
231  }
232 
233  vec_foreach (tkm, km->per_thread_data)
234  {
235  /* *INDENT-OFF* */
236  pool_foreach (sa, tkm->sas) {
237  if (show_one)
238  {
239  if (sa->rspi == rspi)
240  {
241  s = format (s, "%U\n", format_ikev2_sa, sa, 1);
242  break;
243  }
244  }
245  else
246  s = format (s, "%U\n", format_ikev2_sa, sa, details);
247  }
248  /* *INDENT-ON* */
249  }
250 
251  vlib_cli_output (vm, "%v", s);
252  vec_free (s);
253  return 0;
254 }
255 
256 /* *INDENT-OFF* */
258  .path = "show ikev2 sa",
259  .short_help = "show ikev2 sa [rspi <rspi>] [details]",
260  .function = show_ikev2_sa_command_fn,
261 };
262 /* *INDENT-ON* */
263 
264 static clib_error_t *
266  unformat_input_t * input,
267  vlib_cli_command_t * cmd)
268 {
270  return 0;
271 }
272 
273 /* *INDENT-OFF* */
275  .path = "ikev2 dpd disable",
276  .short_help = "ikev2 dpd disable",
277  .function = ikev2_disable_dpd_command_fn,
278 };
279 /* *INDENT-ON* */
280 
281 static uword
282 unformat_ikev2_token (unformat_input_t * input, va_list * va)
283 {
284  u8 **string_return = va_arg (*va, u8 **);
285  const char *token_chars = "a-zA-Z0-9_";
286  if (*string_return)
287  {
288  /* if string_return was already allocated (eg. because of a previous
289  * partial match with a successful unformat_token()), we must free it
290  * before reusing the pointer, otherwise we'll be leaking memory
291  */
292  vec_free (*string_return);
293  *string_return = 0;
294  }
295  return unformat_user (input, unformat_token, token_chars, string_return);
296 }
297 
298 static clib_error_t *
300  unformat_input_t * input,
301  vlib_cli_command_t * cmd)
302 {
303  vnet_main_t *vnm = vnet_get_main ();
304  unformat_input_t _line_input, *line_input = &_line_input;
305  u8 *name = 0;
306  clib_error_t *r = 0;
307  u32 id_type;
308  u8 *data = 0;
309  u32 tmp1, tmp2, tmp3;
310  u64 tmp4, tmp5;
312  u32 responder_sw_if_index = (u32) ~ 0;
313  u32 tun_sw_if_index = (u32) ~ 0;
314  ikev2_transform_encr_type_t crypto_alg;
317 
318  if (!unformat_user (input, unformat_line_input, line_input))
319  return 0;
320 
321  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
322  {
323  if (unformat (line_input, "add %U", unformat_ikev2_token, &name))
324  {
325  r = ikev2_add_del_profile (vm, name, 1);
326  goto done;
327  }
328  else if (unformat (line_input, "del %U", unformat_ikev2_token, &name))
329  {
330  r = ikev2_add_del_profile (vm, name, 0);
331  goto done;
332  }
333  else if (unformat (line_input, "set %U auth shared-key-mic string %v",
335  {
336  r =
338  IKEV2_AUTH_METHOD_SHARED_KEY_MIC, data,
339  0);
340  goto done;
341  }
342  else if (unformat (line_input, "set %U auth shared-key-mic hex %U",
345  {
346  r =
348  IKEV2_AUTH_METHOD_SHARED_KEY_MIC, data,
349  1);
350  goto done;
351  }
352  else if (unformat (line_input, "set %U auth rsa-sig cert-file %v",
354  {
355  r =
356  ikev2_set_profile_auth (vm, name, IKEV2_AUTH_METHOD_RSA_SIG, data,
357  0);
358  goto done;
359  }
360  else if (unformat (line_input, "set %U id local %U %U",
362  unformat_ikev2_id_type, &id_type,
364  {
365  data = vec_new (u8, ip_address_size (&ip));
367  r =
368  ikev2_set_profile_id (vm, name, (u8) id_type, data, /*local */ 1);
369  goto done;
370  }
371  else if (unformat (line_input, "set %U id local %U 0x%U",
373  unformat_ikev2_id_type, &id_type,
375  {
376  r =
377  ikev2_set_profile_id (vm, name, (u8) id_type, data, /*local */ 1);
378  goto done;
379  }
380  else if (unformat (line_input, "set %U id local %U %v",
382  unformat_ikev2_id_type, &id_type, &data))
383  {
384  r =
385  ikev2_set_profile_id (vm, name, (u8) id_type, data, /*local */ 1);
386  goto done;
387  }
388  else if (unformat (line_input, "set %U id remote %U %U",
390  unformat_ikev2_id_type, &id_type,
392  {
393  data = vec_new (u8, ip_address_size (&ip));
395  r = ikev2_set_profile_id (vm, name, (u8) id_type, data, /*remote */
396  0);
397  goto done;
398  }
399  else if (unformat (line_input, "set %U id remote %U 0x%U",
401  unformat_ikev2_id_type, &id_type,
403  {
404  r = ikev2_set_profile_id (vm, name, (u8) id_type, data, /*remote */
405  0);
406  goto done;
407  }
408  else if (unformat (line_input, "set %U id remote %U %v",
410  unformat_ikev2_id_type, &id_type, &data))
411  {
412  r = ikev2_set_profile_id (vm, name, (u8) id_type, data, /*remote */
413  0);
414  goto done;
415  }
416  else if (unformat (line_input, "set %U traffic-selector local "
417  "ip-range %U - %U port-range %u - %u protocol %u",
420  unformat_ip_address, &end_addr, &tmp1, &tmp2, &tmp3))
421  {
422  r =
423  ikev2_set_profile_ts (vm, name, (u8) tmp3, (u16) tmp1, (u16) tmp2,
424  ip, end_addr, /*local */ 1);
425  goto done;
426  }
427  else if (unformat (line_input, "set %U traffic-selector remote "
428  "ip-range %U - %U port-range %u - %u protocol %u",
431  unformat_ip_address, &end_addr, &tmp1, &tmp2, &tmp3))
432  {
433  r =
434  ikev2_set_profile_ts (vm, name, (u8) tmp3, (u16) tmp1, (u16) tmp2,
435  ip, end_addr, /*remote */ 0);
436  goto done;
437  }
438  else if (unformat (line_input, "set %U responder %U %U",
441  &responder_sw_if_index, unformat_ip_address, &ip))
442  {
443  r =
444  ikev2_set_profile_responder (vm, name, responder_sw_if_index, ip);
445  goto done;
446  }
447  else if (unformat (line_input, "set %U responder %U %v",
450  &responder_sw_if_index, &data))
451  {
453  responder_sw_if_index);
454  goto done;
455  }
456  else if (unformat (line_input, "set %U tunnel %U",
458  unformat_vnet_sw_interface, vnm, &tun_sw_if_index))
459  {
460  r = ikev2_set_profile_tunnel_interface (vm, name, tun_sw_if_index);
461  goto done;
462  }
463  else
464  if (unformat
465  (line_input,
466  "set %U ike-crypto-alg %U %u ike-integ-alg %U ike-dh %U",
468  unformat_ikev2_transform_encr_type, &crypto_alg, &tmp1,
471  {
472  r =
474  dh_type, tmp1);
475  goto done;
476  }
477  else
478  if (unformat
479  (line_input,
480  "set %U ike-crypto-alg %U %u ike-dh %U",
482  unformat_ikev2_transform_encr_type, &crypto_alg, &tmp1,
484  {
485  r =
487  IKEV2_TRANSFORM_INTEG_TYPE_NONE,
488  dh_type, tmp1);
489  goto done;
490  }
491  else
492  if (unformat
493  (line_input,
494  "set %U esp-crypto-alg %U %u esp-integ-alg %U",
496  unformat_ikev2_transform_encr_type, &crypto_alg, &tmp1,
498  {
499  r =
501  tmp1);
502  goto done;
503  }
504  else if (unformat
505  (line_input,
506  "set %U esp-crypto-alg %U %u",
508  unformat_ikev2_transform_encr_type, &crypto_alg, &tmp1))
509  {
510  r =
511  ikev2_set_profile_esp_transforms (vm, name, crypto_alg, 0, tmp1);
512  goto done;
513  }
514  else if (unformat (line_input, "set %U sa-lifetime %lu %u %u %lu",
516  &tmp4, &tmp1, &tmp2, &tmp5))
517  {
518  r =
519  ikev2_set_profile_sa_lifetime (vm, name, tmp4, tmp1, tmp2, tmp5);
520  goto done;
521  }
522  else if (unformat (line_input, "set %U udp-encap",
524  {
526  goto done;
527  }
528  else if (unformat (line_input, "set %U ipsec-over-udp port %u",
529  unformat_ikev2_token, &name, &tmp1))
530  {
531  int rv = ikev2_set_profile_ipsec_udp_port (vm, name, tmp1, 1);
532  if (rv)
533  r = clib_error_return (0, "Error: %U", format_vnet_api_errno, rv);
534  goto done;
535  }
536  else if (unformat (line_input, "set %U disable natt",
538  {
540  goto done;
541  }
542  else
543  break;
544  }
545 
546  r = clib_error_return (0, "parse error: '%U'",
547  format_unformat_error, line_input);
548 
549 done:
550  vec_free (name);
551  vec_free (data);
552  unformat_free (line_input);
553  return r;
554 }
555 
556 /* *INDENT-OFF* */
558  .path = "ikev2 profile",
559  .short_help =
560  "ikev2 profile [add|del] <id>\n"
561  "ikev2 profile set <id> auth [rsa-sig|shared-key-mic] [cert-file|string|hex]"
562  " <data>\n"
563  "ikev2 profile set <id> id <local|remote> <type> <data>\n"
564  "ikev2 profile set <id> tunnel <interface>\n"
565  "ikev2 profile set <id> udp-encap\n"
566  "ikev2 profile set <id> traffic-selector <local|remote> ip-range "
567  "<start-addr> - <end-addr> port-range <start-port> - <end-port> "
568  "protocol <protocol-number>\n"
569  "ikev2 profile set <id> responder <interface> <addr>\n"
570  "ikev2 profile set <id> ike-crypto-alg <crypto alg> <key size> ike-integ-alg <integ alg> ike-dh <dh type>\n"
571  "ikev2 profile set <id> esp-crypto-alg <crypto alg> <key size> "
572  "[esp-integ-alg <integ alg>]\n"
573  "ikev2 profile set <id> sa-lifetime <seconds> <jitter> <handover> <max bytes>"
574  "ikev2 profile set <id> disable natt\n",
576 };
577 /* *INDENT-ON* */
578 
579 static clib_error_t *
581  unformat_input_t * input,
582  vlib_cli_command_t * cmd)
583 {
584  ikev2_main_t *km = &ikev2_main;
585  ikev2_profile_t *p;
586 
587  /* *INDENT-OFF* */
588  pool_foreach (p, km->profiles) {
589  vlib_cli_output(vm, "profile %v", p->name);
590 
591  if (p->auth.data)
592  {
593  if (p->auth.hex)
594  vlib_cli_output(vm, " auth-method %U auth data 0x%U",
597  else
598  vlib_cli_output(vm, " auth-method %U auth data %v",
600  }
601 
602  if (p->loc_id.data)
604 
605  if (p->rem_id.data)
607 
609  vlib_cli_output(vm, " local traffic-selector addr %U - %U port %u - %u"
610  " protocol %u",
614  p->loc_ts.protocol_id);
615 
617  vlib_cli_output(vm, " remote traffic-selector addr %U - %U port %u - %u"
618  " protocol %u",
622  p->rem_ts.protocol_id);
623  if (~0 != p->tun_itf)
624  vlib_cli_output(vm, " protected tunnel %U",
626  if (~0 != p->responder.sw_if_index)
627  vlib_cli_output (vm, " responder %U %U %v",
630  &p->responder.addr, p->responder.hostname);
631  if (p->udp_encap)
632  vlib_cli_output(vm, " udp-encap");
633 
634  if (p->natt_disabled)
635  vlib_cli_output(vm, " NAT-T disabled");
636 
638  vlib_cli_output(vm, " ipsec-over-udp port %d", p->ipsec_over_udp_port);
639 
641  vlib_cli_output(vm, " ike-crypto-alg %U %u ike-integ-alg %U ike-dh %U",
645 
646  if (p->esp_ts.crypto_alg || p->esp_ts.integ_alg || p->esp_ts.dh_type)
647  vlib_cli_output(vm, " esp-crypto-alg %U %u esp-integ-alg %U",
650 
651  vlib_cli_output(vm, " lifetime %d jitter %d handover %d maxdata %d",
653  }
654  /* *INDENT-ON* */
655 
656  return 0;
657 }
658 
659 /* *INDENT-OFF* */
661  .path = "show ikev2 profile",
662  .short_help = "show ikev2 profile",
663  .function = show_ikev2_profile_command_fn,
664 };
665 /* *INDENT-ON* */
666 
667 static clib_error_t *
669  unformat_input_t * input,
670  vlib_cli_command_t * cmd)
671 {
672  unformat_input_t _line_input, *line_input = &_line_input;
673  clib_error_t *r = 0;
674  u32 period = 0, max_retries = 0;
675 
676  if (!unformat_user (input, unformat_line_input, line_input))
677  return 0;
678 
679  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
680  {
681  if (unformat (line_input, "%d %d", &period, &max_retries))
682  {
683  r = ikev2_set_liveness_params (period, max_retries);
684  goto done;
685  }
686  else
687  break;
688  }
689 
690  r = clib_error_return (0, "parse error: '%U'",
691  format_unformat_error, line_input);
692 
693 done:
694  unformat_free (line_input);
695  return r;
696 }
697 
698 /* *INDENT-OFF* */
700  .path = "ikev2 set liveness",
701  .short_help = "ikev2 set liveness <period> <max-retires>",
702  .function = set_ikev2_liveness_period_fn,
703 };
704 /* *INDENT-ON* */
705 
706 static clib_error_t *
708  unformat_input_t * input,
709  vlib_cli_command_t * cmd)
710 {
711  unformat_input_t _line_input, *line_input = &_line_input;
712  clib_error_t *r = 0;
713  u8 *data = 0;
714 
715  if (!unformat_user (input, unformat_line_input, line_input))
716  return 0;
717 
718  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
719  {
720  if (unformat (line_input, "%s", &data))
721  {
723  goto done;
724  }
725  else
726  break;
727  }
728 
729  r = clib_error_return (0, "parse error: '%U'",
730  format_unformat_error, line_input);
731 
732 done:
733  vec_free (data);
734  unformat_free (line_input);
735  return r;
736 }
737 
738 /* *INDENT-OFF* */
740  .path = "set ikev2 local key",
741  .short_help =
742  "set ikev2 local key <file>",
743  .function = set_ikev2_local_key_command_fn,
744 };
745 /* *INDENT-ON* */
746 
747 
748 static clib_error_t *
750  unformat_input_t * input, vlib_cli_command_t * cmd)
751 {
752  unformat_input_t _line_input, *line_input = &_line_input;
753  clib_error_t *r = 0;
754  u8 *name = 0;
755  u32 tmp1;
756  u64 tmp2;
757 
758  if (!unformat_user (input, unformat_line_input, line_input))
759  return 0;
760 
761  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
762  {
763  if (unformat (line_input, "sa-init %U", unformat_ikev2_token, &name))
764  {
766  goto done;
767  }
768  else if (unformat (line_input, "del-child-sa %x", &tmp1))
769  {
771  goto done;
772  }
773  else if (unformat (line_input, "del-sa %lx", &tmp2))
774  {
776  goto done;
777  }
778  else if (unformat (line_input, "rekey-child-sa %x", &tmp1))
779  {
781  goto done;
782  }
783  else
784  break;
785  }
786 
787  r = clib_error_return (0, "parse error: '%U'",
788  format_unformat_error, line_input);
789 
790 done:
791  vec_free (name);
792  unformat_free (line_input);
793  return r;
794 }
795 
796 /* *INDENT-OFF* */
798  .path = "ikev2 initiate",
799  .short_help =
800  "ikev2 initiate sa-init <profile id>\n"
801  "ikev2 initiate del-child-sa <child sa ispi>\n"
802  "ikev2 initiate del-sa <sa ispi>\n"
803  "ikev2 initiate rekey-child-sa <child sa ispi>\n",
804  .function = ikev2_initiate_command_fn,
805 };
806 /* *INDENT-ON* */
807 
808 void
810 {
811 }
812 
813 static clib_error_t *
815  unformat_input_t * input,
816  vlib_cli_command_t * cmd)
817 {
818  unformat_input_t _line_input, *line_input = &_line_input;
819  u32 log_level = IKEV2_LOG_NONE;
820  clib_error_t *error = 0;
821 
822  /* Get a line of input. */
823  if (!unformat_user (input, unformat_line_input, line_input))
824  return 0;
825 
826  if (!unformat (line_input, "%d", &log_level))
827  {
828  error = clib_error_return (0, "unknown input '%U'",
829  format_unformat_error, line_input);
830  goto done;
831  }
832  int rc = ikev2_set_log_level (log_level);
833  if (rc < 0)
834  error = clib_error_return (0, "setting log level failed!");
835 
836 done:
837  unformat_free (line_input);
838  return error;
839 }
840 
841 /* *INDENT-OFF* */
843  .path = "ikev2 set logging level",
844  .function = ikev2_set_log_level_command_fn,
845  .short_help = "ikev2 set logging level <0-5>",
846 };
847 /* *INDENT-ON* */
848 
849 /*
850  * fd.io coding-style-patch-verification: ON
851  *
852  * Local Variables:
853  * eval: (c-set-style "gnu")
854  * End:
855  */
vlib.h
ikev2_profile_t::tun_itf
u32 tun_itf
Definition: ikev2_priv.h:350
ikev2_initiate_command_fn
static clib_error_t * ikev2_initiate_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ikev2_cli.c:749
ip_address
Definition: ip_types.h:79
ikev2_main_t
Definition: ikev2_priv.h:486
ikev2_child_sa_t::i_proposals
ikev2_sa_proposal_t * i_proposals
Definition: ikev2_priv.h:282
ikev2_set_profile_sa_lifetime
clib_error_t * ikev2_set_profile_sa_lifetime(vlib_main_t *vm, u8 *name, u64 lifetime, u32 jitter, u32 handover, u64 maxdata)
Definition: ikev2.c:4210
ikev2_stats_t::n_init_retransmit
u16 n_init_retransmit
Definition: ikev2_priv.h:376
ikev2_sa_t::ispi
u64 ispi
Definition: ikev2_priv.h:387
ikev2_child_sa_t::sk_er
u8 * sk_er
Definition: ikev2_priv.h:293
unformat_user
uword unformat_user(unformat_input_t *input, unformat_function_t *func,...)
Definition: unformat.c:989
ikev2_set_profile_tunnel_interface
clib_error_t * ikev2_set_profile_tunnel_interface(vlib_main_t *vm, u8 *name, u32 sw_if_index)
Definition: ikev2.c:4147
ikev2_main_t::profiles
ikev2_profile_t * profiles
Definition: ikev2_priv.h:489
ikev2_initiate_rekey_child_sa
clib_error_t * ikev2_initiate_rekey_child_sa(vlib_main_t *vm, u32 ispi)
Definition: ikev2.c:4636
end_addr
vl_api_address_t end_addr
Definition: ikev2_types.api:38
ikev2_profile_t::name
u8 * name
Definition: ikev2_priv.h:334
ikev2_profile_t::handover
u32 handover
Definition: ikev2_priv.h:347
format_ikev2_sa_transform
u8 * format_ikev2_sa_transform(u8 *s, va_list *args)
Definition: ikev2_format.c:25
ikev2_profile_t::loc_id
ikev2_id_t loc_id
Definition: ikev2_priv.h:337
unformat_ikev2_id_type
uword unformat_ikev2_id_type(unformat_input_t *input, va_list *args)
format_ip4_address
format_function_t format_ip4_address
Definition: format.h:73
vec_new
#define vec_new(T, N)
Create new vector of given type and length (unspecified alignment, no header).
Definition: vec.h:365
clib_memcpy
#define clib_memcpy(d, s, n)
Definition: string.h:197
ikev2_profile_t::lifetime_jitter
u32 lifetime_jitter
Definition: ikev2_priv.h:346
ikev2_disable_dpd_command_fn
static clib_error_t * ikev2_disable_dpd_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ikev2_cli.c:265
ikev2_sa_proposal_t::spi
u32 spi
Definition: ikev2_priv.h:241
ikev2_ts_t::end_addr
ip_address_t end_addr
Definition: ikev2_priv.h:253
ikev2_ts_t::ts_type
ikev2_traffic_selector_type_t ts_type
Definition: ikev2_priv.h:247
unformat_line_input
unformat_function_t unformat_line_input
Definition: format.h:275
ikev2_sa_t::raddr
ip_address_t raddr
Definition: ikev2_priv.h:386
ikev2_transforms_set::crypto_key_size
u32 crypto_key_size
Definition: ikev2_priv.h:269
name
string name[64]
Definition: fib.api:25
ikev2_set_log_level_command
static vlib_cli_command_t ikev2_set_log_level_command
(constructor) VLIB_CLI_COMMAND (ikev2_set_log_level_command)
Definition: ikev2_cli.c:842
format_ikev2_id_type
u8 * format_ikev2_id_type(u8 *s, va_list *args)
format_hex_bytes
u8 * format_hex_bytes(u8 *s, va_list *va)
Definition: std-formats.c:84
set_ikev2_local_key_command
static vlib_cli_command_t set_ikev2_local_key_command
(constructor) VLIB_CLI_COMMAND (set_ikev2_local_key_command)
Definition: ikev2_cli.c:739
clib_error_return
#define clib_error_return(e, args...)
Definition: error.h:99
vlib_cli_command_t::path
char * path
Definition: cli.h:96
ikev2_sa_transform_t
Definition: ikev2_priv.h:213
ikev2_transforms_set::integ_alg
ikev2_transform_integ_type_t integ_alg
Definition: ikev2_priv.h:267
u16
unsigned short u16
Definition: types.h:57
ikev2_auth_t::method
ikev2_auth_method_t method
Definition: ikev2_priv.h:201
ikev2_profile_t::ike_ts
ikev2_transforms_set ike_ts
Definition: ikev2_priv.h:342
ikev2_auth_t::hex
u8 hex
Definition: ikev2_priv.h:203
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
ikev2_transforms_set::crypto_alg
ikev2_transform_encr_type_t crypto_alg
Definition: ikev2_priv.h:266
ikev2_sa_t::i_id
ikev2_id_t i_id
Definition: ikev2_priv.h:417
ikev2_sa_t::childs
ikev2_child_sa_t * childs
Definition: ikev2_priv.h:452
format_vnet_api_errno
static u8 * format_vnet_api_errno(u8 *s, va_list *args)
Definition: api_errno.h:172
ikev2_set_profile_esp_transforms
clib_error_t * ikev2_set_profile_esp_transforms(vlib_main_t *vm, u8 *name, ikev2_transform_encr_type_t crypto_alg, ikev2_transform_integ_type_t integ_alg, u32 crypto_key_size)
Definition: ikev2.c:4124
unformat_input_t
struct _unformat_input_t unformat_input_t
ikev2_set_local_key
clib_error_t * ikev2_set_local_key(vlib_main_t *vm, u8 *file)
Definition: ikev2.c:3711
ikev2_transforms_set::dh_type
ikev2_transform_dh_type_t dh_type
Definition: ikev2_priv.h:268
r
vnet_hw_if_output_node_runtime_t * r
Definition: interface_output.c:1071
show_ikev2_sa_command
static vlib_cli_command_t show_ikev2_sa_command
(constructor) VLIB_CLI_COMMAND (show_ikev2_sa_command)
Definition: ikev2_cli.c:257
ipsec_sa.h
ikev2_stats_t::n_sa_auth_req
u16 n_sa_auth_req
Definition: ikev2_priv.h:374
ikev2_set_profile_id
clib_error_t * ikev2_set_profile_id(vlib_main_t *vm, u8 *name, u8 id_type, u8 *data, int is_local)
Definition: ikev2.c:3961
ikev2_sa_t
Definition: ikev2_priv.h:380
ikev2_stats_t::n_sa_init_req
u16 n_sa_init_req
Definition: ikev2_priv.h:375
error
Definition: cJSON.c:88
ikev2_priv.h
ikev2_child_sa_t::sk_ei
u8 * sk_ei
Definition: ikev2_priv.h:292
log_level
log_level
Definition: vpe_types.api:33
ikev2_set_profile_ipsec_udp_port
vnet_api_error_t ikev2_set_profile_ipsec_udp_port(vlib_main_t *vm, u8 *name, u16 port, u8 is_set)
Definition: ikev2.c:4167
ikev2_sa_t::rspi
u64 rspi
Definition: ikev2_priv.h:388
ikev2_child_sa_t::sk_ar
u8 * sk_ar
Definition: ikev2_priv.h:291
ip_address_size
u16 ip_address_size(const ip_address_t *a)
Definition: ip_types.c:87
ikev2_profile_t::loc_ts
ikev2_ts_t loc_ts
Definition: ikev2_priv.h:339
ikev2_responder_t::sw_if_index
u32 sw_if_index
Definition: ikev2_priv.h:258
unformat_token
unformat_function_t unformat_token
Definition: format.h:278
ikev2_main_t::per_thread_data
ikev2_main_per_thread_data_t * per_thread_data
Definition: ikev2_priv.h:509
unformat
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:978
ikev2_responder_t::addr
ip_address_t addr
Definition: ikev2_priv.h:259
show_ikev2_profile_command
static vlib_cli_command_t show_ikev2_profile_command
(constructor) VLIB_CLI_COMMAND (show_ikev2_profile_command)
Definition: ikev2_cli.c:660
ikev2_profile_t::rem_ts
ikev2_ts_t rem_ts
Definition: ikev2_priv.h:340
IPSEC_UDP_PORT_NONE
#define IPSEC_UDP_PORT_NONE
Definition: ipsec_sa.h:299
ikev2_profile_add_del_command
static vlib_cli_command_t ikev2_profile_add_del_command
(constructor) VLIB_CLI_COMMAND (ikev2_profile_add_del_command)
Definition: ikev2_cli.c:557
pool_foreach
#define pool_foreach(VAR, POOL)
Iterate through pool.
Definition: pool.h:534
unformat_ip_address
uword unformat_ip_address(unformat_input_t *input, va_list *args)
Definition: ip_types.c:41
set_ikev2_local_key_command_fn
static clib_error_t * set_ikev2_local_key_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ikev2_cli.c:707
unformat_ikev2_transform_encr_type
uword unformat_ikev2_transform_encr_type(unformat_input_t *input, va_list *args)
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
unformat_free
static void unformat_free(unformat_input_t *i)
Definition: format.h:155
show_ikev2_profile_command_fn
static clib_error_t * show_ikev2_profile_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ikev2_cli.c:580
error.h
ikev2_profile_t
Definition: ikev2_priv.h:332
ikev2_sa_t::sk_pi
u8 * sk_pi
Definition: ikev2_priv.h:409
ikev2_id_t::data
u8 * data
Definition: ikev2_priv.h:276
ikev2_initiate_delete_child_sa
clib_error_t * ikev2_initiate_delete_child_sa(vlib_main_t *vm, u32 ispi)
Definition: ikev2.c:4513
ikev2_profile_t::ipsec_over_udp_port
u16 ipsec_over_udp_port
Definition: ikev2_priv.h:348
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
ikev2_sa_t::sk_ar
u8 * sk_ar
Definition: ikev2_priv.h:406
ikev2_ts_t::protocol_id
u8 protocol_id
Definition: ikev2_priv.h:248
ikev2_ts_t::end_port
u16 end_port
Definition: ikev2_priv.h:251
unformat_check_input
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:163
ikev2_stats_t::n_rekey_req
u16 n_rekey_req
Definition: ikev2_priv.h:373
unformat_ikev2_token
static uword unformat_ikev2_token(unformat_input_t *input, va_list *va)
Definition: ikev2_cli.c:282
c
svmdb_client_t * c
Definition: vpp_get_metrics.c:48
format_ikev2_transform_dh_type
u8 * format_ikev2_transform_dh_type(u8 *s, va_list *args)
ikev2_sa_t::r_id
ikev2_id_t r_id
Definition: ikev2_priv.h:418
format_ip_address
u8 * format_ip_address(u8 *s, va_list *args)
Definition: ip_types.c:21
uword
u64 uword
Definition: types.h:112
format_ikev2_transform_integ_type
u8 * format_ikev2_transform_integ_type(u8 *s, va_list *args)
ikev2_initiate_command
static vlib_cli_command_t ikev2_initiate_command
(constructor) VLIB_CLI_COMMAND (ikev2_initiate_command)
Definition: ikev2_cli.c:797
unformat_ikev2_transform_dh_type
uword unformat_ikev2_transform_dh_type(unformat_input_t *input, va_list *args)
ikev2_set_profile_responder
clib_error_t * ikev2_set_profile_responder(vlib_main_t *vm, u8 *name, u32 sw_if_index, ip_address_t addr)
Definition: ikev2.c:4077
ikev2_child_sa_t::tsi
ikev2_ts_t * tsi
Definition: ikev2_priv.h:286
ikev2.h
ikev2_child_sa_t::r_proposals
ikev2_sa_proposal_t * r_proposals
Definition: ikev2_priv.h:283
ikev2_main_per_thread_data_t
Definition: ikev2_priv.h:468
ikev2_profile_t::natt_disabled
u8 natt_disabled
Definition: ikev2_priv.h:352
format_unformat_error
u8 * format_unformat_error(u8 *s, va_list *va)
Definition: unformat.c:91
VLIB_CLI_COMMAND
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:163
set_ikev2_liveness_command
static vlib_cli_command_t set_ikev2_liveness_command
(constructor) VLIB_CLI_COMMAND (set_ikev2_liveness_command)
Definition: ikev2_cli.c:699
ikev2_ts_t::start_port
u16 start_port
Definition: ikev2_priv.h:250
ikev2_stats_t::n_retransmit
u16 n_retransmit
Definition: ikev2_priv.h:377
vlib_cli_output
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:716
ikev2_initiate_sa_init
clib_error_t * ikev2_initiate_sa_init(vlib_main_t *vm, u8 *name)
Definition: ikev2.c:4286
ikev2_cli_reference
void ikev2_cli_reference(void)
Definition: ikev2_cli.c:809
ikev2_set_profile_auth
clib_error_t * ikev2_set_profile_auth(vlib_main_t *vm, u8 *name, u8 auth_method, u8 *auth_data, u8 data_hex_format)
Definition: ikev2.c:3918
unformat_hex_string
unformat_function_t unformat_hex_string
Definition: format.h:281
data
u8 data[128]
Definition: ipsec_types.api:92
ikev2_profile_t::lifetime_maxdata
u64 lifetime_maxdata
Definition: ikev2_priv.h:345
ip_address_is_zero
bool ip_address_is_zero(const ip_address_t *ip)
Definition: ip_types.c:102
id
u8 id[64]
Definition: dhcp.api:160
format_ikev2_child_sa
static u8 * format_ikev2_child_sa(u8 *s, va_list *va)
Definition: ikev2_cli.c:70
ikev2_profile_t::auth
ikev2_auth_t auth
Definition: ikev2_priv.h:336
vnet_main_t
Definition: vnet.h:76
vec_free
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:395
index
u32 index
Definition: flow_types.api:221
ikev2_ts_t::start_addr
ip_address_t start_addr
Definition: ikev2_priv.h:252
format_ikev2_id_type_and_data
u8 * format_ikev2_id_type_and_data(u8 *s, va_list *args)
Definition: ikev2_cli.c:23
ikev2_profile_natt_disable
clib_error_t * ikev2_profile_natt_disable(u8 *name)
Definition: ikev2.c:4938
ikev2_set_profile_ike_transforms
clib_error_t * ikev2_set_profile_ike_transforms(vlib_main_t *vm, u8 *name, ikev2_transform_encr_type_t crypto_alg, ikev2_transform_integ_type_t integ_alg, ikev2_transform_dh_type_t dh_type, u32 crypto_key_size)
Definition: ikev2.c:4099
ikev2_child_sa_t::tsr
ikev2_ts_t * tsr
Definition: ikev2_priv.h:287
u64
unsigned long u64
Definition: types.h:89
format_vnet_sw_if_index_name
format_function_t format_vnet_sw_if_index_name
Definition: interface_funcs.h:455
unformat_vnet_sw_interface
unformat_function_t unformat_vnet_sw_interface
Definition: interface_funcs.h:459
ikev2_sa_t::i_nonce
u8 * i_nonce
Definition: ikev2_priv.h:389
format
description fragment has unexpected format
Definition: map.api:433
ikev2_profile_t::responder
ikev2_responder_t responder
Definition: ikev2_priv.h:341
format_get_indent
static u32 format_get_indent(u8 *s)
Definition: format.h:72
ikev2_sa_t::r_proposals
ikev2_sa_proposal_t * r_proposals
Definition: ikev2_priv.h:401
ikev2_sa_t::sk_ei
u8 * sk_ei
Definition: ikev2_priv.h:407
u32
unsigned int u32
Definition: types.h:88
ikev2_sa_t::r_nonce
u8 * r_nonce
Definition: ikev2_priv.h:390
ikev2_responder_t::hostname
u8 * hostname
Definition: ikev2_priv.h:260
integ_alg
u8 integ_alg
Definition: ikev2_types.api:59
ikev2_sa_t::stats
ikev2_stats_t stats
Definition: ikev2_priv.h:464
vec_foreach
#define vec_foreach(var, vec)
Vector iterator.
Definition: vec_bootstrap.h:213
ikev2_set_profile_udp_encap
clib_error_t * ikev2_set_profile_udp_encap(vlib_main_t *vm, u8 *name)
Definition: ikev2.c:4194
ikev2_profile_t::rem_id
ikev2_id_t rem_id
Definition: ikev2_priv.h:338
format_ikev2_auth_method
u8 * format_ikev2_auth_method(u8 *s, va_list *args)
set_ikev2_liveness_period_fn
static clib_error_t * set_ikev2_liveness_period_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ikev2_cli.c:668
ikev2_sa_t::sk_ai
u8 * sk_ai
Definition: ikev2_priv.h:405
ikev2_profile_t::udp_encap
u8 udp_encap
Definition: ikev2_priv.h:351
ikev2_sa_t::sk_er
u8 * sk_er
Definition: ikev2_priv.h:408
ikev2_profile_t::esp_ts
ikev2_transforms_set esp_ts
Definition: ikev2_priv.h:343
format_ikev2_traffic_selector
static u8 * format_ikev2_traffic_selector(u8 *s, va_list *va)
Definition: ikev2_cli.c:54
show_ikev2_sa_command_fn
static clib_error_t * show_ikev2_sa_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ikev2_cli.c:206
ikev2_transform_dh_type_t
ikev2_transform_dh_type_t
Definition: ikev2.h:332
ikev2_main
ikev2_main_t ikev2_main
Definition: ikev2.c:37
vlib_main_t
Definition: main.h:102
ikev2_sa_t::sk_pr
u8 * sk_pr
Definition: ikev2_priv.h:410
unformat_ikev2_transform_integ_type
uword unformat_ikev2_transform_integ_type(unformat_input_t *input, va_list *args)
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
ikev2_main_per_thread_data_t::sas
ikev2_sa_t * sas
Definition: ikev2_priv.h:473
format_ikev2_transform_encr_type
u8 * format_ikev2_transform_encr_type(u8 *s, va_list *args)
ip
vl_api_address_t ip
Definition: l2.api:558
ikev2_initiate_delete_ike_sa
clib_error_t * ikev2_initiate_delete_ike_sa(vlib_main_t *vm, u64 ispi)
Definition: ikev2.c:4553
ikev2_add_del_profile
clib_error_t * ikev2_add_del_profile(vlib_main_t *vm, u8 *name, int is_add)
Definition: ikev2.c:3882
format_ip6_address
format_function_t format_ip6_address
Definition: format.h:91
ikev2_set_profile_ts
clib_error_t * ikev2_set_profile_ts(vlib_main_t *vm, u8 *name, u8 protocol_id, u16 start_port, u16 end_port, ip_address_t start_addr, ip_address_t end_addr, int is_local)
Definition: ikev2.c:4016
ikev2_child_sa_t::sk_ai
u8 * sk_ai
Definition: ikev2_priv.h:290
ikev2_set_log_level_command_fn
static clib_error_t * ikev2_set_log_level_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ikev2_cli.c:814
ikev2_sa_t::sk_d
u8 * sk_d
Definition: ikev2_priv.h:404
ikev2_id_t
Definition: ikev2_priv.h:273
ikev2_transform_encr_type_t
ikev2_transform_encr_type_t
Definition: ikev2.h:241
ikev2_disable_dpd
void ikev2_disable_dpd(void)
Definition: ikev2.c:5134
ikev2_ts_t
Definition: ikev2_priv.h:245
ikev2_stats_t::n_keepalives
u16 n_keepalives
Definition: ikev2_priv.h:372
rv
int __clib_unused rv
Definition: application.c:491
ikev2_profile_add_del_command_fn
static clib_error_t * ikev2_profile_add_del_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ikev2_cli.c:299
vnet.h
format_ikev2_sa
static u8 * format_ikev2_sa(u8 *s, va_list *va)
Definition: ikev2_cli.c:125
ikev2_set_log_level
int ikev2_set_log_level(ikev2_log_level_t log_level)
Definition: ikev2.c:4910
ikev2_set_liveness_params
clib_error_t * ikev2_set_liveness_params(u32 period, u32 max_retries)
Definition: ikev2.c:4925
vlib_cli_command_t
Definition: cli.h:92
rspi
u64 rspi
Definition: ikev2_types.api:147
ikev2_set_profile_responder_hostname
clib_error_t * ikev2_set_profile_responder_hostname(vlib_main_t *vm, u8 *name, u8 *hostname, u32 sw_if_index)
Definition: ikev2.c:4055
ikev2_child_sa_t
Definition: ikev2_priv.h:279
ikev2_transform_integ_type_t
ikev2_transform_integ_type_t
Definition: ikev2.h:282
ikev2_sa_get_td_for_type
ikev2_sa_transform_t * ikev2_sa_get_td_for_type(ikev2_sa_proposal_t *p, ikev2_transform_type_t type)
Definition: ikev2.c:228
ikev2_auth_t::data
u8 * data
Definition: ikev2_priv.h:202
ikev2_cli_disable_dpd_command
static vlib_cli_command_t ikev2_cli_disable_dpd_command
(constructor) VLIB_CLI_COMMAND (ikev2_cli_disable_dpd_command)
Definition: ikev2_cli.c:274
ikev2_sa_t::iaddr
ip_address_t iaddr
Definition: ikev2_priv.h:385
format_white_space
u8 * format_white_space(u8 *s, va_list *va)
Definition: std-formats.c:129
ip_addr_bytes
u8 * ip_addr_bytes(ip_address_t *ip)
Definition: ip_types.c:149
UNFORMAT_END_OF_INPUT
#define UNFORMAT_END_OF_INPUT
Definition: format.h:137
ikev2_profile_t::lifetime
u64 lifetime
Definition: ikev2_priv.h:344