diff options
author | Steve Shin <jonshin@cisco.com> | 2017-07-01 04:16:20 +0000 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-07-05 00:56:54 +0000 |
commit | 99a0e60eb6f6acd7eabd5a4cb7ded1e0419ccd54 (patch) | |
tree | 6dc402ff8e3c1c8293fa92863a60d1adfb2891a0 /src/vnet/lldp/lldp.api | |
parent | a016216753c955683bda76ed250daa540ff35107 (diff) |
Add API support for LLDP config/interface set
Add API methods to configure LLDP and set interface to enable/disable.
Also add port description TLV for LLDP.
Change-Id: Ib959d488c2ab8a0069f143558871f41fcc43a5d3
Signed-off-by: Steve Shin <jonshin@cisco.com>
Diffstat (limited to 'src/vnet/lldp/lldp.api')
-rw-r--r-- | src/vnet/lldp/lldp.api | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/vnet/lldp/lldp.api b/src/vnet/lldp/lldp.api new file mode 100644 index 00000000000..02fe32ca742 --- /dev/null +++ b/src/vnet/lldp/lldp.api @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017 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. + */ + +/** \brief configure global parameter for LLDP + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param system_name - VPP system name + @param tx_hold - multiplier for tx_interval when setting time-to-live (TTL) + value in the LLDP packets + @param tx_interval - time interval, in seconds, between each LLDP frames +*/ +autoreply define lldp_config +{ + u32 client_index; + u32 context; + u8 system_name[256]; + u32 tx_hold; + u32 tx_interval; +}; + +/** \brief Interface set LLDP request + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param sw_if_index - interface for which to enable/disable LLDP + @param port_desc - local port description + @param enable - if non-zero enable, else disable +*/ +autoreply define sw_interface_set_lldp +{ + u32 client_index; + u32 context; + u32 sw_if_index; + u8 port_desc[256]; + u8 enable; +}; |