/*
 * Copyright (c) 2015-2019 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

option version = "1.7.0";

/** \brief client->vpp, attach application to session layer
 	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param initial_segment_size - size of the initial shm segment to be
    							  allocated
    @param options - segment size, fifo sizes, etc.
    @param namespace_id_len - length of the namespace id c-string
    @param namespace_id - 0 terminted c-string
*/
 define application_attach {
    u32 client_index;
    u32 context;
    u32 initial_segment_size;
    u64 options[16];
    u8 namespace_id_len;
    u8 namespace_id [64];
 };

 /** \brief Application attach reply
 	### WILL BE DEPRECATED POST 20.01 ###
    @param context - sender context, to match reply w/ request
    @param retval - return code for the request
    @param app_event_queue_address - vpp event queue address or 0 if this
                                 	 connection shouldn't send events
    @param n_fds - number of fds exchanged
    @param fd_flags - set of flags that indicate which fds are to be expected
    				  over the socket (set only if socket transport available)
    @param segment_size - size of first shm segment
    @param segment_name_length - length of segment name
    @param segment_name - name of segment client needs to attach to
    @param app_index - index of the newly created app
    @param segment_handle - handle for segment
*/
define application_attach_reply {
    u32 context;
    i32 retval;
    u64 app_event_queue_address;
    u8 n_fds;
    u8 fd_flags;
    u32 segment_size;
    u8 segment_name_length;
    u8 segment_name[128];
    u32 app_index;
    u64 segment_handle;
};

/** \brief Application attach to session layer
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param options - segment size, fifo sizes, etc.
    @param namespace_id_len - length of the namespace id c-string
    @param namespace_id - 0 terminted c-string
*/
 define app_attach {
    u32 client_index;
    u32 context;
    u64 options[16];
    u8 namespace_id_len;
    u8 namespace_id[64];
 };

 /** \brief Application attach reply
    @param context - sender context, to match reply w/ request
    @param retval - return code for the request
    @param app_mq - app message queue
    @param vpp_ctrl_mq - vpp message queue for control events that should
    					 be handled in main thread, i.e., bind/connect
    @param vpp_ctrl_mq_thread_index - thread index of the ctrl mq
    @param app_index - index of the newly created app
    @param n_fds - number of fds exchanged
    @param fd_flags - set of flags that indicate which fds are to be expected
    				  over the socket (set only if socket transport available)
    @param segment_size - size of first shm segment
    @param segment_name_length - length of segment name
    @param segment_name - name of segment client needs to attach to
    @param segment_handle - handle for segment
*/
define app_attach_reply {
    u32 context;
    i32 retval;
    u64 app_mq;
    u64 vpp_ctrl_mq;
    u8 vpp_ctrl_mq_thread;
    u32 app_index;
    u8 n_fds;
    u8 fd_flags;
    u32 segment_size;
    u8 segment_name_length;
    u8 segment_name[128];
    u64 segment_handle;
};

/** \brief Add certificate and key
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param engine - crypto engine
    @param cert_len - cert length (comes first)
    @param certkey_len - cert and key length
    @param certkey - cert & key data (due to API limitation)
*/
define app_add_cert_key_pair {
    u32 client_index;
    u32 context;
    u16 cert_len;
    u16 certkey_len;
    u8 certkey[certkey_len];
};

/** \brief Add certificate and key
    @param context - sender context, to match reply w/ request
    @param retval - return code for the request
    @param index - index in certificate store
*/
define app_add_cert_key_pair_reply {
    u32 context;
    i32 retval;
    u32 index;
};

/** \brief Delete certificate and key
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param index - index in certificate store
*/
autoreply define app_del_cert_key_pair {
    u32 client_index;
    u32 context;
    u32 index;
};

/** \brief Application add TLS certificate
 	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param cert_len - certificate length
    @param cert - certificate as a string
*/
autoreply define application_tls_cert_add {
    u32 client_index;
    u32 context;
    u32 app_index;
    u16 cert_len;
    u8 cert[cert_len];
};

/** \brief Application add TLS key
 	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param key_len - certificate length
    @param key - PEM encoded key as a string
*/
autoreply define application_tls_key_add {
    u32 client_index;
    u32 context;
    u32 app_index;
    u16 key_len;
    u8 key[key_len];
};

 /** \brief client->vpp, attach application to session layer
 	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
autoreply define application_detach {
    u32 client_index;
    u32 context;
 };

/** \brief vpp->client, please map an additional shared memory segment
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
   	@param fd_flags - set of flags that indicate which, if any, fds are
   					  to be expected over the socket. This is set only if
   					  socket transport available
    @param segment_size - size of the segment to be mapped
    @param segment_name - name of the segment to be mapped
    @param segment_handle - unique identifier for segment
*/
autoreply define map_another_segment {
    u32 client_index;
    u32 context;
    u8 fd_flags;
    u32 segment_size;
    u8 segment_name[128];
    u64 segment_handle;
};

/** \brief vpp->client unmap shared memory segment
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param segment_name - segment name
    @param segment_handle - handle of the segment to be unmapped
*/
autoreply define unmap_segment {
    u32 client_index;
    u32 context;
    u64 segment_handle;
};

 /** \brief Bind to a given URI
 	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param accept_cookie - sender accept cookie, to identify this bind flavor
    @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
                 "tcp://::/0/80" [ipv6] etc.
    @param options - socket options, fifo sizes, etc.
*/
autoreply define bind_uri {
  u32 client_index;
  u32 context;
  u32 accept_cookie;
  u8 uri[128];
};

/** \brief Unbind a given URI
	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
                 "tcp://::/0/80" [ipv6], etc.
    @param options - socket options, fifo sizes, etc.
*/
autoreply define unbind_uri {
  u32 client_index;
  u32 context;
  u8 uri[128];
};

/** \brief Connect to a given URI
	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param client_queue_address - binary API client queue address. Used by
    							  local server when connect was redirected.
    @param options - socket options, fifo sizes, etc. passed by vpp to the
    				 server when redirecting connects
    @param uri - a URI, e.g. "tcp4://0.0.0.0/0/80"
                 "tcp6://::/0/80" [ipv6], etc.
*/
autoreply define connect_uri {
  u32 client_index;
  u32 context;
  u64 client_queue_address;
  u64 options[16];
  u8 uri[128];
};

/** \brief bidirectional disconnect API
	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
                          client to vpp direction only
    @param context - sender context, to match reply w/ request
    @param handle - session handle obtained from accept/connect
*/
define disconnect_session {
  u32 client_index;
  u32 context;
  u64 handle;
};

/** \brief bidirectional disconnect reply API
	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
                          client to vpp direction only
    @param context - sender context, to match reply w/ request
    @param retval - return code for the request
    @param handle - session handle
*/
define disconnect_session_reply {
  u32 context;
  i32 retval;
  u64 handle;
};

/** \brief Bind to an ip:port pair for a given transport protocol
	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param wrk_index - index of worker requesting the bind
    @param vrf - bind namespace
    @param is_ip4 - flag that is 1 if ip address family is IPv4
    @param ip - ip address
    @param port - port
    @param proto - protocol 0 - TCP 1 - UDP
    @param options - socket options, fifo sizes, etc.
*/
autoreply define bind_sock {
  u32 client_index;
  u32 context;
  u32 wrk_index;
  u32 vrf;
  u8 is_ip4;
  u8 ip[16];
  u16 port;
  u8 proto;
  u64 options[16];
};

/** \brief Unbind
	### WILL BE DEPRECATED POST 20.01 ###s
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param wrk_index - index of worker requesting the bind
    @param handle - bind handle obtained from bind reply
*/
autoreply define unbind_sock {
  u32 client_index;
  u32 context;
  u32 wrk_index;
  u64 handle;
};

/** \brief Connect to a remote peer
	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param wrk_index - worker that requests the connect
    @param client_queue_address - client's API queue address. Non-zero when
                                  used to perform redirects
    @param options - socket options, fifo sizes, etc. when doing redirects
    @param vrf - connection namespace
    @param is_ip4 - flag that is 1 if ip address family is IPv4
    @param ip - ip address
    @param port - port
    @param proto - protocol 0 - TCP 1 - UDP
    @param hostname-len - length of hostname
    @param hostname - destination's hostname. If present, used by protocols
					  like tls.
    @param parent_handle - handle of parent session (e.g. for opening quic streams).
*/
autoreply define connect_sock {
  u32 client_index;
  u32 context;
  u32 wrk_index;
  u64 client_queue_address;
  u64 options[16];
  u32 vrf;
  u8 is_ip4;
  u8 ip[16];
  u16 port;
  u8 proto;
  u64 parent_handle;
  u8 hostname_len;
  u8 hostname[hostname_len];
};

/** \brief ask app to add a new cut-through registration
	### WILL BE DEPRECATED POST 20.01 ###
    @param client_index - opaque cookie to identify the sender
                          client to vpp direction only
    @param context - sender context, to match reply w/ request
    @param evt_q_address - address of the mq in ssvm segment
    @param peer_evt_q_address - address of peer's mq in ssvm segment
    @param wrk_index - index of worker to receive the registration
    @param n_fds - number of fds exchanged
    @param fd_flags - flag indicating the fds that will be exchanged over
    				  api socket
*/
autoreply define app_cut_through_registration_add
{
  u32 client_index;
  u32 context;
  u64 evt_q_address;
  u64 peer_evt_q_address;
  u32 wrk_index;
  u8 n_fds;
  u8 fd_flags;
};

/** \brief add/del application worker
    @param client_index - opaque cookie to identify the sender
                          client to vpp direction only
    @param context - sender context, to match reply w/ request
    @param app_index - application index
    @param wrk_index - worker index, if a delete
    @param is_add - set if an add
*/
define app_worker_add_del
{
  u32 client_index;
  u32 context;
  u32 app_index;
  u32 wrk_index;
  u8 is_add;
};

/** \brief Reply for app worker add/del
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
    @param wrk_index - worker index, if add
    @param app_event_queue_address - vpp event queue address of new worker
    @param n_fds - number of fds exchanged
    @param fd_flags - set of flags that indicate which fds are to be expected
    				  over the socket (set only if socket transport available)
    @param segment_name_length - length of segment name
    @param segment_name - name of segment client needs to attach to
    @param segment_handle - handle for segment
*/
define app_worker_add_del_reply
{
  u32 context;
  i32 retval;
  u32 wrk_index;
  u64 app_event_queue_address;
  u8 n_fds;
  u8 fd_flags;
  u8 segment_name_length;
  u8 segment_name[128];
  u64 segment_handle;
  u8 is_add;
};

/** \brief enable/disable session layer
    @param client_index - opaque cookie to identify the sender
                          client to vpp direction only
    @param context - sender context, to match reply w/ request
    @param is_enable - disable session layer if 0, enable otherwise
*/
autoreply define session_enable_disable {
  u32 client_index;
  u32 context;
  u8 is_enable;
};

/** \brief add/del application namespace
    @param client_index - opaque cookie to identify the sender
                          client to vpp direction only
    @param context - sender context, to match reply w/ request
    @param secret - secret shared between app and vpp
    @param sw_if_index - local interface that "supports" namespace. Set to
                         ~0 if no preference
    @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored
                        if sw_if_index set.
    @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored
                        if sw_if_index set.
    @param namespace_id_len - length of namespace id lower
    @param namespace_id - namespace id
*/
define app_namespace_add_del {
  u32 client_index;
  u32 context;
  u64 secret;
  u32 sw_if_index;
  u32 ip4_fib_id;
  u32 ip6_fib_id;
  u8 namespace_id_len;
  u8 namespace_id[64];
};

/** \brief Reply for app namespace add/del
    @param context - returned sender context, to match reply w/ request
    @param retval - return code
    @param appns_index - app namespace index
*/
define app_namespace_add_del_reply
{
  u32 context;
  i32 retval;
  u32 appns_index;
};

/** \brief add/del session rule
    @param client_index - opaque cookie to identify the sender
                          client to vpp direction only
    @param context - sender context, to match reply w/ request
    @param transport_proto - transport protocol (0 - tcp 1 - udp)
    @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
    @param lcl_ip - local ip
    @param lcl_plen - local prefix length
    @param rmt_ip - remote ip
    @param rmt_ple - remote prefix length
    @param lcl_port - local port
    @param rmt_port - remote port
    @param action_index - the only action defined now is forward to
                          application with index action_index
    @param is_add - flag to indicate if add or del
    @param appns_index - application namespace where rule is to be applied to
    @param scope - flag that indicates scope of the rule: global or local.
                   If 0, default is global, 1 is global 2 is local, 3 is both
*/
autoreply define session_rule_add_del {
  u32 client_index;
  u32 context;
  u8 transport_proto;
  u8 is_ip4;
  u8 lcl_ip[16];
  u8 lcl_plen;
  u8 rmt_ip[16];
  u8 rmt_plen;
  u16 lcl_port;
  u16 rmt_port;
  u32 action_index;
  u8 is_add;
  u32 appns_index;
  u8 scope;
  u8 tag[64];
};

/** \brief Dump session rules
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
 */
define session_rules_dump
{
  u32 client_index;
  u32 context;
};

/** \brief Session rules details
    @param context - sender context, to match reply w/ request
    @param transport_proto - transport protocol (0 - tcp 1 - udp)
    @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
    @param lcl_ip - local ip
    @param lcl_plen - local prefix length
    @param rmt_ip - remote ip
    @param rmt_ple - remote prefix length
    @param lcl_port - local port
    @param rmt_port - remote port
    @param action_index - the only action defined now is forward to
                          application with index action_index
    @param appns_index - application namespace where rule is to be applied to
    @param scope - flag that indicates scope of the rule: global or local.
                   If 0, default is global, 1 is global 2 is local, 3 is both
  */
define session_rules_details
{
  u32 context;
  u8 transport_proto;
  u8 is_ip4;
  u8 lcl_ip[16];
  u8 lcl_plen;
  u8 rmt_ip[16];
  u8 rmt_plen;
  u16 lcl_port;
  u16 rmt_port;
  u32 action_index;
  u32 appns_index;
  u8 scope;
  u8 tag[64];
};

/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */
