Matus Fabian | b4515b4 | 2018-11-19 04:25:32 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 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 | |
| 16 | option version = "1.0.0"; |
| 17 | import "vnet/ip/ip_types.api"; |
| 18 | |
| 19 | enum syslog_severity |
| 20 | { |
| 21 | SYSLOG_API_SEVERITY_EMERG = 0, |
| 22 | SYSLOG_API_SEVERITY_ALERT = 1, |
| 23 | SYSLOG_API_SEVERITY_CRIT = 2, |
| 24 | SYSLOG_API_SEVERITY_ERR = 3, |
| 25 | SYSLOG_API_SEVERITY_WARN = 4, |
| 26 | SYSLOG_API_SEVERITY_NOTICE = 5, |
| 27 | SYSLOG_API_SEVERITY_INFO = 6, |
| 28 | SYSLOG_API_SEVERITY_DBG = 7, |
| 29 | }; |
| 30 | |
| 31 | /** \brief Set syslog sender configuration |
| 32 | @param client_index - opaque cookie to identify the sender |
| 33 | @param context - sender context, to match reply w/ request |
| 34 | @param src_address - IPv4 address of syslog sender (source) |
| 35 | @param collector_address - IPv4 address of syslog collector (destination) |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 36 | @param collector_port - UDP port of syslog collector (destination) Default: 514 |
Matus Fabian | b4515b4 | 2018-11-19 04:25:32 -0800 | [diff] [blame] | 37 | @param vrf_id - VRF/FIB table ID |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 38 | @param max_msg_size - maximum message length. Default: 480 |
Matus Fabian | b4515b4 | 2018-11-19 04:25:32 -0800 | [diff] [blame] | 39 | */ |
| 40 | autoreply define syslog_set_sender |
| 41 | { |
| 42 | u32 client_index; |
| 43 | u32 context; |
| 44 | vl_api_ip4_address_t src_address; |
| 45 | vl_api_ip4_address_t collector_address; |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 46 | u16 collector_port [default=514]; |
Matus Fabian | b4515b4 | 2018-11-19 04:25:32 -0800 | [diff] [blame] | 47 | u32 vrf_id; |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 48 | u32 max_msg_size [default=480]; |
Matus Fabian | b4515b4 | 2018-11-19 04:25:32 -0800 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | /** \brief Get syslog sender configuration |
| 52 | @param client_index - opaque cookie to identify the sender |
| 53 | @param context - sender context, to match reply w/ request |
| 54 | */ |
| 55 | define syslog_get_sender |
| 56 | { |
| 57 | u32 client_index; |
| 58 | u32 context; |
| 59 | }; |
| 60 | |
| 61 | /** \brief Get syslog sender configuration reply |
| 62 | @param context - sender context, to match reply w/ request |
| 63 | @param retval - return code for the request |
| 64 | @param src_address - IPv4 address of syslog sender (source) |
| 65 | @param collector_address - IPv4 address of syslog collector (destination) |
Paul Vinciguerra | c0e9441 | 2020-04-28 01:12:04 -0400 | [diff] [blame] | 66 | @param collector_port - UDP port of syslog collector (destination) |
Matus Fabian | b4515b4 | 2018-11-19 04:25:32 -0800 | [diff] [blame] | 67 | @param vrf_id - VRF/FIB table ID |
| 68 | @param max_msg_size - maximum message length |
| 69 | */ |
| 70 | define syslog_get_sender_reply |
| 71 | { |
| 72 | u32 context; |
| 73 | i32 retval; |
| 74 | vl_api_ip4_address_t src_address; |
| 75 | vl_api_ip4_address_t collector_address; |
| 76 | u16 collector_port; |
| 77 | u32 vrf_id; |
| 78 | u32 max_msg_size; |
| 79 | }; |
| 80 | |
| 81 | /** \brief Set syslog filter |
| 82 | @param client_index - opaque cookie to identify the sender |
| 83 | @param context - sender context, to match reply w/ request |
| 84 | @param severity - severity filter (specified severity and greater match) |
| 85 | */ |
| 86 | autoreply define syslog_set_filter |
| 87 | { |
| 88 | u32 client_index; |
| 89 | u32 context; |
| 90 | vl_api_syslog_severity_t severity; |
| 91 | }; |
| 92 | |
| 93 | /** \brief Get syslog filter |
| 94 | @param client_index - opaque cookie to identify the sender |
| 95 | @param context - sender context, to match reply w/ request |
| 96 | */ |
| 97 | define syslog_get_filter |
| 98 | { |
| 99 | u32 client_index; |
| 100 | u32 context; |
| 101 | }; |
| 102 | |
| 103 | /** \brief Get syslog filter reply |
| 104 | @param context - sender context, to match reply w/ request |
| 105 | @param retval - return code for the request |
| 106 | @param severity - severity filter (specified severity and greater match) |
| 107 | */ |
| 108 | define syslog_get_filter_reply |
| 109 | { |
| 110 | u32 context; |
| 111 | i32 retval; |
| 112 | vl_api_syslog_severity_t severity; |
| 113 | }; |
| 114 | |
| 115 | /* |
| 116 | * Local Variables: |
| 117 | * eval: (c-set-style "gnu") |
| 118 | * End: |
| 119 | */ |