summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/clib_error.h
blob: 45f18eb1fe45db57ab4faae4c561e4dea6a8d524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * Copyright (c) 2015 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.
 */

#ifndef included_clib_error_h
#define included_clib_error_h

#include <vppinfra/types.h>

typedef struct
{
  /* Error message. */
  u8 *what;

  /* Where error occurred (e.g. __FUNCTION__ __LINE__) */
  const u8 *where;

  uword flags;

  /* Error code (e.g. errno for Unix errors). */
  any code;
} clib_error_t;

#endif
kground-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*
 * Copyright (c) 2015-2016 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 = "2.0.1";

import "vnet/ip/ip_types.api";

/** \brief Configure IPFIX exporter process request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param collector_address - address of IPFIX collector
    @param collector_port - port of IPFIX collector
    @param src_address - address of IPFIX exporter
    @param vrf_id - VRF / fib table ID
    @param path_mtu - Path MTU between exporter and collector
    @param template_interval - number of seconds after which to resend template
    @param udp_checksum - UDP checksum calculation enable flag
*/
autoreply define set_ipfix_exporter
{
  u32 client_index;
  u32 context;
  vl_api_address_t collector_address;
  u16 collector_port;
  vl_api_address_t src_address;
  u32 vrf_id;
  u32 path_mtu;
  u32 template_interval;
  bool udp_checksum;
};

/** \brief IPFIX exporter dump request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define ipfix_exporter_dump
{
  u32 client_index;
  u32 context;
};

/** \brief Reply to IPFIX exporter dump request
    @param context - sender context which was passed in the request
    @param collector_address - address of IPFIX collector
    @param collector_port - port of IPFIX collector
    @param src_address - address of IPFIX exporter
    @param fib_index - fib table index
    @param path_mtu - Path MTU between exporter and collector
    @param template_interval - number of seconds after which to resend template
    @param udp_checksum - UDP checksum calculation enable flag
*/
define ipfix_exporter_details
{
  u32 context;
  vl_api_address_t collector_address;
  u16 collector_port;
  vl_api_address_t src_address;
  u32 vrf_id;
  u32 path_mtu;
  u32 template_interval;
  bool udp_checksum;
};

/** \brief IPFIX classify stream configure request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param domain_id - domain ID reported in IPFIX messages for classify stream
    @param src_port - source port of UDP session for classify stream
*/
autoreply define set_ipfix_classify_stream {
    u32 client_index;
    u32 context;
    u32 domain_id;
    u16 src_port;
};

/** \brief IPFIX classify stream dump request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define ipfix_classify_stream_dump {
    u32 client_index;
    u32 context;
};

/** \brief Reply to IPFIX classify stream dump request
    @param context - sender context, to match reply w/ request
    @param domain_id - domain ID reported in IPFIX messages for classify stream
    @param src_port - source port of UDP session for classify stream
*/
define ipfix_classify_stream_details {
    u32 context;
    u32 domain_id;
    u16 src_port;
};

/** \brief IPFIX add or delete classifier table request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param table_id - classifier table ID
    @param ip_version - version of IP used in the classifier table
    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
*/
autoreply define ipfix_classify_table_add_del {
    u32 client_index;
    u32 context;
    u32 table_id;
    vl_api_address_family_t ip_version;
    vl_api_ip_proto_t transport_protocol;
    bool is_add;
};

/** \brief IPFIX classify tables dump request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define ipfix_classify_table_dump {
    u32 client_index;
    u32 context;
};

/** \brief Reply to IPFIX classify tables dump request
    @param context - sender context, to match reply w/ request
    @param table_id - classifier table ID
    @param ip_version - version of IP used in the classifier table
    @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
*/
define ipfix_classify_table_details {
    u32 context;
    u32 table_id;
    vl_api_address_family_t ip_version;
    vl_api_ip_proto_t transport_protocol;
};

autoreply define ipfix_flush {
    u32 client_index;
    u32 context;
};

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