IPSEC: API modernisation
[vpp.git] / src / vnet / ipsec / ipsec.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2015-2016 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 option version = "3.0.0";
18
19 import "vnet/ip/ip_types.api";
20
21 /** \brief IPsec: Add/delete Security Policy Database
22     @param client_index - opaque cookie to identify the sender
23     @param context - sender context, to match reply w/ request
24     @param is_add - add SPD if non-zero, else delete
25     @param spd_id - SPD instance id (control plane allocated)
26 */
27
28 autoreply define ipsec_spd_add_del
29 {
30   u32 client_index;
31   u32 context;
32   u8 is_add;
33   u32 spd_id;
34 };
35
36 /** \brief IPsec: Add/delete SPD from interface
37
38     @param client_index - opaque cookie to identify the sender
39     @param context - sender context, to match reply w/ request
40     @param is_add - add security mode if non-zero, else delete
41     @param sw_if_index - index of the interface
42     @param spd_id - SPD instance id to use for lookups
43 */
44
45
46 autoreply define ipsec_interface_add_del_spd
47 {
48   u32 client_index;
49   u32 context;
50
51   u8 is_add;
52   u32 sw_if_index;
53   u32 spd_id;
54 };
55
56
57 enum ipsec_spd_action
58 {
59   /* bypass - no IPsec processing */
60   IPSEC_API_SPD_ACTION_BYPASS = 0,
61   /* discard - discard packet with ICMP processing */
62   IPSEC_API_SPD_ACTION_DISCARD,
63   /* resolve - send request to control plane for SA resolving */
64   IPSEC_API_SPD_ACTION_RESOLVE,
65   /* protect - apply IPsec policy using following parameters */
66   IPSEC_API_SPD_ACTION_PROTECT,
67 };
68
69 /** \brief IPsec: Security Policy Database entry
70
71     See RFC 4301, 4.4.1.1 on how to match packet to selectors
72
73     @param spd_id - SPD instance id (control plane allocated)
74     @param priority - priority of SPD entry (non-unique value).  Used to order SPD matching - higher priorities match before lower
75     @param is_outbound - entry applies to outbound traffic if non-zero, otherwise applies to inbound traffic
76     @param remote_address_start - start of remote address range to match
77     @param remote_address_stop - end of remote address range to match
78     @param local_address_start - start of local address range to match
79     @param local_address_stop - end of local address range to match
80     @param protocol - protocol type to match [0 means any] otherwise IANA value
81     @param remote_port_start - start of remote port range to match ...
82     @param remote_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
83     @param local_port_start - start of local port range to match ...
84     @param local_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
85     @param policy - action to perform on match
86     @param sa_id - SAD instance id (control plane allocated)
87 */
88 typedef ipsec_spd_entry
89 {
90   u32 spd_id;
91   i32 priority;
92   u8 is_outbound;
93
94   u32 sa_id;
95   vl_api_ipsec_spd_action_t policy;
96   u8 protocol;
97
98   // Selector
99   u8 is_ip_any;
100   vl_api_address_t remote_address_start;
101   vl_api_address_t remote_address_stop;
102   vl_api_address_t local_address_start;
103   vl_api_address_t local_address_stop;
104
105   u16 remote_port_start;
106   u16 remote_port_stop;
107   u16 local_port_start;
108   u16 local_port_stop;
109 };
110
111 /** \brief IPsec: Add/delete Security Policy Database entry
112
113     @param client_index - opaque cookie to identify the sender
114     @param context - sender context, to match reply w/ request
115     @param is_add - add SPD if non-zero, else delete
116     @param entry - Description of the entry to add/dell
117 */
118 autoreply define ipsec_spd_entry_add_del
119 {
120   u32 client_index;
121   u32 context;
122   u8 is_add;
123   vl_api_ipsec_spd_entry_t entry;
124 };
125
126 /** \brief Dump IPsec all SPD IDs
127     @param client_index - opaque cookie to identify the sender
128     @param context - sender context, to match reply w/ request
129 */
130 define ipsec_spds_dump {
131   u32 client_index;
132   u32 context;
133 };
134
135 /** \brief Dump IPsec all SPD IDs response
136     @param client_index - opaque cookie to identify the sender
137     @param spd_id - SPD instance id (control plane allocated)
138     @param npolicies - number of policies in SPD
139 */
140 define ipsec_spds_details {
141   u32 context;
142   u32 spd_id;
143   u32 npolicies;
144 }; 
145
146 /** \brief Dump ipsec policy database data
147     @param client_index - opaque cookie to identify the sender
148     @param context - sender context, to match reply w/ request
149     @param spd_id - SPD instance id
150     @param sa_id - SA id, optional, set to ~0 to see all policies in SPD
151 */
152 define ipsec_spd_dump {
153     u32 client_index;
154     u32 context;
155     u32 spd_id;
156     u32 sa_id;
157 };
158
159 /** \brief IPsec policy database response
160     @param context - sender context which was passed in the request
161     â‚¬param entry - The SPD entry.
162     @param bytes - byte count of packets matching this policy
163     @param packets - count of packets matching this policy
164 */
165 define ipsec_spd_details {
166     u32 context;
167     vl_api_ipsec_spd_entry_t entry;
168     u64 bytes;
169     u64 packets;
170 };
171
172 /*
173  * @brief Support cryptographic algorithms
174  */
175 enum ipsec_crypto_alg
176 {
177   IPSEC_API_CRYPTO_ALG_NONE = 0,
178   IPSEC_API_CRYPTO_ALG_AES_CBC_128,
179   IPSEC_API_CRYPTO_ALG_AES_CBC_192,
180   IPSEC_API_CRYPTO_ALG_AES_CBC_256,
181   IPSEC_API_CRYPTO_ALG_AES_CTR_128,
182   IPSEC_API_CRYPTO_ALG_AES_CTR_192,
183   IPSEC_API_CRYPTO_ALG_AES_CTR_256,
184   IPSEC_API_CRYPTO_ALG_AES_GCM_128,
185   IPSEC_API_CRYPTO_ALG_AES_GCM_192,
186   IPSEC_API_CRYPTO_ALG_AES_GCM_256,
187   IPSEC_API_CRYPTO_ALG_DES_CBC,
188   IPSEC_API_CRYPTO_ALG_3DES_CBC,
189 };
190
191 /*
192  * @brief Supported Integrity Algorithms
193  */
194 enum ipsec_integ_alg
195 {
196   IPSEC_API_INTEG_ALG_NONE = 0,
197   /* RFC2403 */
198   IPSEC_API_INTEG_ALG_MD5_96,
199   /* RFC2404 */
200   IPSEC_API_INTEG_ALG_SHA1_96,
201   /* draft-ietf-ipsec-ciph-sha-256-00 */
202   IPSEC_API_INTEG_ALG_SHA_256_96,
203   /* RFC4868 */
204   IPSEC_API_INTEG_ALG_SHA_256_128,
205   /* RFC4868 */
206   IPSEC_API_INTEG_ALG_SHA_384_192,
207   /* RFC4868 */
208   IPSEC_API_INTEG_ALG_SHA_512_256,
209 };
210
211 enum ipsec_sad_flags
212 {
213   IPSEC_API_SAD_FLAG_NONE = 0,
214   /* Enable extended sequence numbers */
215   IPSEC_API_SAD_FLAG_USE_EXTENDED_SEQ_NUM = 0x01,
216   /* Enable Anti-replay */
217   IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY = 0x02,
218   /* IPsec tunnel mode if non-zero, else transport mode */
219   IPSEC_API_SAD_FLAG_IS_TUNNEL = 0x04,
220   /* IPsec tunnel mode is IPv6 if non-zero,
221    *  else IPv4 tunnel only valid if is_tunnel is non-zero */
222   IPSEC_API_SAD_FLAG_IS_TUNNEL_V6 = 0x08,
223   /* enable UDP encapsulation for NAT traversal */
224   IPSEC_API_SAD_FLAG_UDP_ENCAP = 0x10,
225 };
226
227 enum ipsec_proto
228 {
229   IPSEC_API_PROTO_ESP,
230   IPSEC_API_PROTO_AH,
231 };
232
233 typedef key
234 {
235   /* the length of the key */
236   u8 length;
237   /* The data for the key */
238   u8 data[128];
239 };
240
241 /** \brief IPsec: Security Association Database entry
242     @param client_index - opaque cookie to identify the sender
243     @param context - sender context, to match reply w/ request
244     @param is_add - add SAD entry if non-zero, else delete
245     @param sad_id - sad id
246     @param spi - security parameter index
247     @param protocol - 0 = AH, 1 = ESP
248     @param crypto_algorithm - a supported crypto algorithm
249     @param crypto_key - crypto keying material
250     @param integrity_algorithm - one of the supported algorithms
251     @param integrity_key - integrity keying material
252     @param tunnel_src_address - IPsec tunnel source address IPv6 if is_tunnel_ipv6 is non-zero, else IPv4. Only valid if is_tunnel is non-zero
253     @param tunnel_dst_address - IPsec tunnel destination address IPv6 if is_tunnel_ipv6 is non-zero, else IPv4. Only valid if is_tunnel is non-zero
254  */
255 typedef ipsec_sad_entry
256 {
257   u32 sad_id;
258
259   u32 spi;
260
261   vl_api_ipsec_proto_t protocol;
262
263   vl_api_ipsec_crypto_alg_t crypto_algorithm;
264   vl_api_key_t crypto_key;
265
266   vl_api_ipsec_integ_alg_t integrity_algorithm;
267   vl_api_key_t integrity_key;
268
269   vl_api_ipsec_sad_flags_t flags;
270
271   vl_api_address_t tunnel_src;
272   vl_api_address_t tunnel_dst;
273 };
274
275 /** \brief IPsec: Add/delete Security Association Database entry
276     @param client_index - opaque cookie to identify the sender
277     @param context - sender context, to match reply w/ request
278     @param entry - Entry to add or delete
279  */
280 autoreply define ipsec_sad_entry_add_del
281 {
282   u32 client_index;
283   u32 context;
284   u8 is_add;
285   vl_api_ipsec_sad_entry_t entry;
286 };
287
288 /** \brief IPsec: Update Security Association keys
289     @param client_index - opaque cookie to identify the sender
290     @param context - sender context, to match reply w/ request
291
292     @param sa_id - sa id
293
294     @param crypto_key - crypto keying material
295     @param integrity_key - integrity keying material
296 */
297
298 autoreply define ipsec_sa_set_key
299 {
300   u32 client_index;
301   u32 context;
302
303   u32 sa_id;
304
305   vl_api_key_t crypto_key;
306   vl_api_key_t integrity_key;
307 };
308
309 /** \brief IKEv2: Add/delete profile
310     @param client_index - opaque cookie to identify the sender
311     @param context - sender context, to match reply w/ request
312
313     @param name - IKEv2 profile name
314     @param is_add - Add IKEv2 profile if non-zero, else delete
315 */
316 autoreply define ikev2_profile_add_del
317 {
318   u32 client_index;
319   u32 context;
320
321   u8 name[64];
322   u8 is_add;
323 };
324
325 /** \brief IKEv2: Set IKEv2 profile authentication method
326     @param client_index - opaque cookie to identify the sender
327     @param context - sender context, to match reply w/ request
328
329     @param name - IKEv2 profile name
330     @param auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig)
331     @param is_hex - Authentication data in hex format if non-zero, else string
332     @param data_len - Authentication data length
333     @param data - Authentication data (for rsa-sig cert file path)
334 */
335 autoreply define ikev2_profile_set_auth
336 {
337   u32 client_index;
338   u32 context;
339
340   u8 name[64];
341   u8 auth_method;
342   u8 is_hex;
343   u32 data_len;
344   u8 data[data_len];
345 };
346
347 /** \brief IKEv2: Set IKEv2 profile local/remote identification
348     @param client_index - opaque cookie to identify the sender
349     @param context - sender context, to match reply w/ request
350
351     @param name - IKEv2 profile name
352     @param is_local - Identification is local if non-zero, else remote
353     @param id_type - Identification type
354     @param data_len - Identification data length
355     @param data - Identification data
356 */
357 autoreply define ikev2_profile_set_id
358 {
359   u32 client_index;
360   u32 context;
361
362   u8 name[64];
363   u8 is_local;
364   u8 id_type;
365   u32 data_len;
366   u8 data[data_len];
367 };
368
369 /** \brief IKEv2: Set IKEv2 profile traffic selector parameters
370     @param client_index - opaque cookie to identify the sender
371     @param context - sender context, to match reply w/ request
372
373     @param name - IKEv2 profile name
374     @param is_local - Traffic selector is local if non-zero, else remote
375     @param proto - Traffic selector IP protocol (if zero not relevant)
376     @param start_port - The smallest port number allowed by traffic selector
377     @param end_port - The largest port number allowed by traffic selector
378     @param start_addr - The smallest address included in traffic selector
379     @param end_addr - The largest address included in traffic selector
380 */
381 autoreply define ikev2_profile_set_ts
382 {
383   u32 client_index;
384   u32 context;
385
386   u8 name[64];
387   u8 is_local;
388   u8 proto;
389   u16 start_port;
390   u16 end_port;
391   u32 start_addr;
392   u32 end_addr;
393 };
394
395 /** \brief IKEv2: Set IKEv2 local RSA private key
396     @param client_index - opaque cookie to identify the sender
397     @param context - sender context, to match reply w/ request
398
399     @param key_file - Key file absolute path
400 */
401 autoreply define ikev2_set_local_key
402 {
403   u32 client_index;
404   u32 context;
405
406   u8 key_file[256];
407 };
408
409 /** \brief IKEv2: Set IKEv2 responder interface and IP address
410     @param client_index - opaque cookie to identify the sender
411     @param context - sender context, to match reply w/ request
412
413     @param name - IKEv2 profile name
414     @param sw_if_index - interface index
415     @param address - interface address
416 */
417 autoreply define ikev2_set_responder
418 {
419   u32 client_index;
420   u32 context;
421
422   u8 name[64];
423   u32 sw_if_index;
424   u8 address[4];
425 };
426
427 /** \brief IKEv2: Set IKEv2 IKE transforms in SA_INIT proposal (RFC 7296)
428     @param client_index - opaque cookie to identify the sender
429     @param context - sender context, to match reply w/ request
430
431     @param name - IKEv2 profile name
432     @param crypto_alg - encryption algorithm
433     @param crypto_key_size - encryption key size
434     @param integ_alg - integrity algorithm
435     @param dh_group - Diffie-Hellman group
436     
437 */
438 autoreply define ikev2_set_ike_transforms
439 {
440   u32 client_index;
441   u32 context;
442
443   u8 name[64];
444   u32 crypto_alg;
445   u32 crypto_key_size;
446   u32 integ_alg;
447   u32 dh_group;
448 };
449
450 /** \brief IKEv2: Set IKEv2 ESP transforms in SA_INIT proposal (RFC 7296)
451     @param client_index - opaque cookie to identify the sender
452     @param context - sender context, to match reply w/ request
453
454     @param name - IKEv2 profile name
455     @param crypto_alg - encryption algorithm
456     @param crypto_key_size - encryption key size
457     @param integ_alg - integrity algorithm
458     @param dh_group - Diffie-Hellman group
459     
460 */
461 autoreply define ikev2_set_esp_transforms
462 {
463   u32 client_index;
464   u32 context;
465
466   u8 name[64];
467   u32 crypto_alg;
468   u32 crypto_key_size;
469   u32 integ_alg;
470   u32 dh_group;
471 };
472
473 /** \brief IKEv2: Set Child SA lifetime, limited by time and/or data
474     @param client_index - opaque cookie to identify the sender
475     @param context - sender context, to match reply w/ request
476
477     @param name - IKEv2 profile name
478     @param lifetime - SA maximum life time in seconds (0 to disable)
479     @param lifetime_jitter - Jitter added to prevent simultaneous rekeying
480     @param handover - Hand over time
481     @param lifetime_maxdata - SA maximum life time in bytes (0 to disable)
482     
483 */
484 autoreply define ikev2_set_sa_lifetime
485 {
486   u32 client_index;
487   u32 context;
488
489   u8 name[64];
490   u64 lifetime;
491   u32 lifetime_jitter;
492   u32 handover;
493   u64 lifetime_maxdata;
494 };
495
496 /** \brief IKEv2: Initiate the SA_INIT exchange
497     @param client_index - opaque cookie to identify the sender
498     @param context - sender context, to match reply w/ request
499
500     @param name - IKEv2 profile name
501     
502 */
503 autoreply define ikev2_initiate_sa_init
504 {
505   u32 client_index;
506   u32 context;
507
508   u8 name[64];
509 };
510
511 /** \brief IKEv2: Initiate the delete IKE SA exchange
512     @param client_index - opaque cookie to identify the sender
513     @param context - sender context, to match reply w/ request
514
515     @param ispi - IKE SA initiator SPI
516     
517 */
518 autoreply define ikev2_initiate_del_ike_sa
519 {
520   u32 client_index;
521   u32 context;
522
523   u64 ispi;
524 };
525
526 /** \brief IKEv2: Initiate the delete Child SA exchange
527     @param client_index - opaque cookie to identify the sender
528     @param context - sender context, to match reply w/ request
529
530     @param ispi - Child SA initiator SPI
531     
532 */
533 autoreply define ikev2_initiate_del_child_sa
534 {
535   u32 client_index;
536   u32 context;
537
538   u32 ispi;
539 };
540
541 /** \brief IKEv2: Initiate the rekey Child SA exchange
542     @param client_index - opaque cookie to identify the sender
543     @param context - sender context, to match reply w/ request
544
545     @param ispi - Child SA initiator SPI
546     
547 */
548 autoreply define ikev2_initiate_rekey_child_sa
549 {
550   u32 client_index;
551   u32 context;
552
553   u32 ispi;
554 };
555
556 /** \brief IPsec: Get SPD interfaces
557     @param client_index - opaque cookie to identify the sender
558     @param context - sender context, to match reply w/ request
559     @param spd_index - SPD index
560     @param spd_index_valid - if 1 spd_index is used to filter
561       spd_index's, if 0 no filtering is done
562 */
563 define ipsec_spd_interface_dump {
564     u32 client_index;
565     u32 context;
566     u32 spd_index;
567     u8 spd_index_valid;
568 };
569
570 /** \brief IPsec: SPD interface response
571     @param context - sender context which was passed in the request
572     @param spd_index - SPD index
573     @param sw_if_index - index of the interface
574 */
575 define ipsec_spd_interface_details {
576     u32 context;
577     u32 spd_index;
578     u32 sw_if_index;
579 };
580
581 /** \brief Add or delete IPsec tunnel interface
582     @param client_index - opaque cookie to identify the sender
583     @param context - sender context, to match reply w/ request
584     @param is_add - add IPsec tunnel interface if nonzero, else delete
585     @param esn - enable extended sequence numbers if nonzero, else disable
586     @param anti_replay - enable anti replay check if nonzero, else disable
587     @param local_ip - local IP address
588     @param remote_ip - IP address of remote IPsec peer
589     @param local_spi - SPI of outbound IPsec SA
590     @param remote_spi - SPI of inbound IPsec SA
591     @param crypto_alg - encryption algorithm ID
592     @param local_crypto_key_len - length of local crypto key in bytes
593     @param local_crypto_key - crypto key for outbound IPsec SA
594     @param remote_crypto_key_len - length of remote crypto key in bytes
595     @param remote_crypto_key - crypto key for inbound IPsec SA
596     @param integ_alg - integrity algorithm ID
597     @param local_integ_key_len - length of local integrity key in bytes
598     @param local_integ_key - integrity key for outbound IPsec SA
599     @param remote_integ_key_len - length of remote integrity key in bytes
600     @param remote_integ_key - integrity key for inbound IPsec SA
601     @param renumber - intf display name uses a specified instance if != 0
602     @param show_instance - instance to display for intf if renumber is set
603     @param udp_encap - enable UDP encapsulation for NAT traversal
604     @param tx_table_id - the FIB id used after packet encap
605 */
606 define ipsec_tunnel_if_add_del {
607   u32 client_index;
608   u32 context;
609   u8 is_add;
610   u8 esn;
611   u8 anti_replay;
612   u8 local_ip[4];
613   u8 remote_ip[4];
614   u32 local_spi;
615   u32 remote_spi;
616   u8 crypto_alg;
617   u8 local_crypto_key_len;
618   u8 local_crypto_key[128];
619   u8 remote_crypto_key_len;
620   u8 remote_crypto_key[128];
621   u8 integ_alg;
622   u8 local_integ_key_len;
623   u8 local_integ_key[128];
624   u8 remote_integ_key_len;
625   u8 remote_integ_key[128];
626   u8 renumber;
627   u32 show_instance;
628   u8 udp_encap;
629   u32 tx_table_id;
630 };
631
632 /** \brief Add/delete IPsec tunnel interface response
633     @param context - sender context, to match reply w/ request
634     @param retval - return status
635     @param sw_if_index - sw_if_index of new interface (for successful add)
636 */
637 define ipsec_tunnel_if_add_del_reply {
638   u32 context;
639   i32 retval;
640   u32 sw_if_index;
641 };
642
643 /** \brief Dump IPsec security association
644     @param client_index - opaque cookie to identify the sender
645     @param context - sender context, to match reply w/ request
646     @param sa_id - optional ID of an SA to dump, if ~0 dump all SAs in SAD
647 */
648 define ipsec_sa_dump {
649   u32 client_index;
650   u32 context;
651   u32 sa_id;
652 };
653
654 /** \brief IPsec security association database response
655     @param context - sender context which was passed in the request
656     @param sa_id - SA ID, policy-based SAs >=0, tunnel interface SAs = 0 
657     @param sw_if_index - sw_if_index of tunnel interface, policy-based SAs = ~0
658     @param spi - security parameter index
659     @param protocol - IPsec protocol (value from ipsec_protocol_t)
660     @param crypto_alg - crypto algorithm (value from ipsec_crypto_alg_t)
661     @param crypto_key_len - length of crypto_key in bytes
662     @param crypto_key - crypto keying material
663     @param integ_alg - integrity algorithm (value from ipsec_integ_alg_t)
664     @param integ_key_len - length of integ_key in bytes
665     @param integ_key - integrity keying material
666     @param use_esn - using extended sequence numbers when non-zero
667     @param use_anti_replay - using anti-replay window when non-zero
668     @param is_tunnel - IPsec tunnel mode when non-zero, else transport mode
669     @param is_tunnel_ipv6 - If using tunnel mode, endpoints are IPv6
670     @param tunnel_src_addr - Tunnel source address if using tunnel mode
671     @param tunnel_dst_addr - Tunnel destination address is using tunnel mode
672     @param salt - 4 byte salt 
673     @param seq - current sequence number for outbound
674     @param seq_hi - high 32 bits of ESN for outbound 
675     @param last_seq - highest sequence number received inbound
676     @param last_seq_hi - high 32 bits of highest ESN received inbound
677     @param replay_window - bit map of seq nums received relative to last_seq if using anti-replay
678     @param total_data_size - total bytes sent or received
679     @param udp_encap - 1 if UDP encap enabled, 0 otherwise
680     @param tx_table_id - the FIB id used for encapsulated packets
681 */
682 define ipsec_sa_details {
683   u32 context;
684   u32 sa_id;
685   u32 sw_if_index;
686
687   u32 spi;
688   u8 protocol;
689
690   u8 crypto_alg;
691   u8 crypto_key_len;
692   u8 crypto_key[128];
693
694   u8 integ_alg;
695   u8 integ_key_len;
696   u8 integ_key[128];
697
698   u8 use_esn;
699   u8 use_anti_replay;
700
701   u8 is_tunnel;
702   u8 is_tunnel_ip6;
703   u8 tunnel_src_addr[16];
704   u8 tunnel_dst_addr[16];
705
706   u32 salt;
707   u64 seq_outbound;
708   u64 last_seq_inbound;
709   u64 replay_window;
710
711   u64 total_data_size;
712   u8 udp_encap;
713
714   u32 tx_table_id;
715 };
716
717 /** \brief Set key on IPsec interface
718     @param client_index - opaque cookie to identify the sender
719     @param context - sender context, to match reply w/ request
720     @param sw_if_index - index of tunnel interface
721     @param key_type - type of key being set
722     @param alg - algorithm used with key
723     @param key_len - length key in bytes
724     @param key - key
725 */
726 autoreply define ipsec_tunnel_if_set_key {
727   u32 client_index;
728   u32 context;
729   u32 sw_if_index;
730   u8 key_type;
731   u8 alg;
732   u8 key_len;
733   u8 key[128];
734 };
735
736 /** \brief Set new SA on IPsec interface
737     @param client_index - opaque cookie to identify the sender
738     @param context - sender context, to match reply w/ request
739     @param sw_if_index - index of tunnel interface
740     @param sa_id - ID of SA to use
741     @param is_outbound - 1 if outbound (local) SA, 0 if inbound (remote)
742 */
743 autoreply define ipsec_tunnel_if_set_sa {
744   u32 client_index;
745   u32 context;
746   u32 sw_if_index;
747   u32 sa_id;
748   u8 is_outbound;
749 };
750
751 /** \brief Dump IPsec backends
752     @param client_index - opaque cookie to identify the sender
753     @param context - sender context, to match reply w/ request
754 */
755 define ipsec_backend_dump {
756   u32 client_index;
757   u32 context;
758 };
759
760 /** \brief IPsec backend details
761     @param name - name of the backend
762     @param protocol - IPsec protocol (value from ipsec_protocol_t)
763     @param index - backend index
764     @param active - set to 1 if the backend is active, otherwise 0
765 */
766 define ipsec_backend_details {
767   u32 context;
768   u8 name[128];
769   vl_api_ipsec_proto_t protocol;
770   u8 index;
771   u8 active;
772 };
773
774 /** \brief Select IPsec backend
775     @param client_index - opaque cookie to identify the sender
776     @param context - sender context, to match reply w/ request
777     @param protocol - IPsec protocol (value from ipsec_protocol_t)
778     @param index - backend index
779 */
780 autoreply define ipsec_select_backend {
781   u32 client_index;
782   u32 context;
783   vl_api_ipsec_proto_t protocol;
784   u8 index;
785 };
786
787 /*
788  * Local Variables:
789  * eval: (c-set-style "gnu")
790  * End:
791  */
792