Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_routing_config.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 * Licensed under the Apache License, Version 2.0 (the "License");
26 * you may not use this file except in compliance with the License.
27 * You may obtain a copy of the License at
28 *
29 * http://www.apache.org/licenses/LICENSE-2.0
30 *
31 * Unless required by applicable law or agreed to in writing, software
32 * distributed under the License is distributed on an "AS IS" BASIS,
33 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34 * See the License for the specific language governing permissions and
35 * limitations under the License.
36 *
37 **********************************************************************
38 *
39 * @filename openapi_routing_config.h
40 *
41 * @purpose Routing Configuration and Status
42 *
43 * @component OPEN
44 *
45 * @create 11/28/2012
46 *
47 * @end
48 *
49 **********************************************************************/
50 #ifndef OPENAPI_ROUTING_CONFIG_H_INCLUDED
51 #define OPENAPI_ROUTING_CONFIG_H_INCLUDED
52 
53 #include <stdio.h>
54 #include <stddef.h>
55 #include <sys/un.h>
56 
57 #include "openapi_common.h"
58 #include "openapi_mpls.h"
59 
61 typedef enum
62 {
67 
68 
69 #define OPEN_VRF_MIN_NAME_LEN 0
70 #define OPEN_VRF_MAX_NAME_LEN 64
71 #define OPEN_DEFAULT_VRF_NAME ""
73 /*****************************************************************/
101 open_error_t openapiRtrIntfIpAddrAdd(openapiClientHandle_t *client_handle,
102  OPEN_AF_t af, uint32_t intf,
103  OPEN_INTF_IP_ADDR_TYPE_t addrType,
104  open_inet_pfx_t *ipAddr,
105  OPEN_CONTROL_t extArg);
106 
107 /*****************************************************************/
135  OPEN_AF_t af,uint32_t intf,
136  OPEN_INTF_IP_ADDR_TYPE_t addrType,
137  open_inet_pfx_t *ipAddr,
138  OPEN_CONTROL_t extArg);
139 
140 /*****************************************************************/
157  OPEN_AF_t af, OPEN_CONTROL_t routingMode);
158 
159 /*****************************************************************/
179  open_inet_addr_t ipAddr,
180  open_buffdesc *mac_addr);
181 
182 /*****************************************************************/
199  open_inet_addr_t ipAddr);
200 
201 /*****************************************************************/
226  uint32_t *intf, open_inet_addr_t *ipAddr,
227  open_buffdesc *mac_addr);
228 
229 
230 /*****************************************************************/
246  OPEN_CONTROL_t redirectsMode);
247 
248 /*****************************************************************/
264  OPEN_CONTROL_t echoReplyMode);
265 
266 /*****************************************************************/
282  OPEN_CONTROL_t ipHelperMode);
283 
284 /*****************************************************************/
303  open_inet_addr_t ipAddr, uint32_t udpPort);
304 
305 
306 /*****************************************************************/
323  open_inet_addr_t ipAddr, uint32_t udpPort);
324 
325 
326 /*****************************************************************/
344  uint32_t intf, open_inet_addr_t ipAddr,
345  uint32_t udpPort);
346 
347 
348 /*****************************************************************/
366  uint32_t intf, open_inet_addr_t ipAddr,
367  uint32_t udpPort);
368 
369 /*****************************************************************/
386  uint32_t intf, uint32_t udpPort);
387 
388 
389 /*****************************************************************/
406  uint32_t intf, uint32_t udpPort);
407 
408 
409 /*****************************************************************/
428  OPEN_AF_t af, uint32_t intf, uint32_t MTU);
429 
430 /*****************************************************************/
447  uint32_t intf, OPEN_CONTROL_t ipNetBroadcastMode);
448 
449 /*****************************************************************/
466  uint32_t intf, OPEN_CONTROL_t ipProxyArpMode);
467 
468 
469 /*****************************************************************/
486  uint32_t intf, OPEN_CONTROL_t redirectsMode);
487 
488 
489 /*****************************************************************/
507  uint32_t intf, OPEN_CONTROL_t unreachableMode);
508 
509 
510 /*****************************************************************/
527  OPEN_CONTROL_t routingMode);
528 
529 /*****************************************************************/
554  OPEN_AF_t af, open_inet_pfx_t *ipAddr,
555  open_inet_addr_t *nextHop, uint32_t rtPref,
556  uint32_t intf, OPEN_MPLS_LABELS_t *mpls);
557 
558 /*****************************************************************/
580  OPEN_AF_t af, open_inet_pfx_t *ipAddr,
581  open_inet_addr_t *nextHop, uint32_t intf,
582  OPEN_MPLS_LABELS_t *mpls);
583 
584 /*****************************************************************/
603  uint32_t vlanId);
604 
605 /*****************************************************************/
622  uint32_t vlanId);
623 
624 /*****************************************************************/
640  uint32_t vlanId, uint32_t *intf);
641 
642 #endif /* OPENAPI_ROUTING_CONFIG_H_INCLUDED */
643 
open_error_t openapiRtrVlanIntfCreate(openapiClientHandle_t *client_handle, uint32_t vlanId)
Create a VLAN Routing Interface.
open_error_t openapiIpICMPEchoReplyModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t echoReplyMode)
Enables/Disables IP ICMP Echo Reply mode.
open_error_t openapiRtrIntfRtrAdminModeSet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_CONTROL_t routingMode)
Enables/Disables IP Routing mode (both v4 and v6) on a Router interface.
open_error_t openapiIpRedirectsModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t redirectsMode)
Enables/Disables generation of IP Redirects messages.
open_error_t openapiIpHelperAddressAdd(openapiClientHandle_t *client_handle, open_inet_addr_t ipAddr, uint32_t udpPort)
Adds IP Helper Address and UDP port number.
open_error_t openapiRtrIntfIpHelperDiscardDel(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t udpPort)
Deletes IP Helper Discard entry in an interface.
open_error_t openapiArpEntryNextGet(openapiClientHandle_t *client_handle, uint32_t *intf, open_inet_addr_t *ipAddr, open_buffdesc *mac_addr)
Get the next ARP entry.
open_error_t openapiArpEntryAdd(openapiClientHandle_t *client_handle, open_inet_addr_t ipAddr, open_buffdesc *mac_addr)
Add an ARP entry.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiRtrIntfIpHelperAddressAdd(openapiClientHandle_t *client_handle, uint32_t intf, open_inet_addr_t ipAddr, uint32_t udpPort)
Adds IP Helper Address and UDP port number on an interface.
open_error_t openapiRtrIntfMTUSet(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, uint32_t MTU)
Configures Router Interface MTU.
open_error_t openapiRtrIntfIpHelperDiscardAdd(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t udpPort)
Adds IP Helper Discard entry in an interface.
open_error_t openapiIpRouteAdd(openapiClientHandle_t *client_handle, OPEN_AF_t af, open_inet_pfx_t *ipAddr, open_inet_addr_t *nextHop, uint32_t rtPref, uint32_t intf, OPEN_MPLS_LABELS_t *mpls)
Add an IP Route for a given address family.
OPEN_AF_t
OPEN uses these enumerators to indicate address family, IPV4 or IPV6.
open_error_t openapiIpHelperModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t ipHelperMode)
Enables/Disables IP Helper mode.
open_error_t openapiRtrIntfIpProxyArpModeSet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_CONTROL_t ipProxyArpMode)
Enables/Disables IP Proxy Arp mode on a Router Interface.
open_error_t openapiRtrAdminModeSet(openapiClientHandle_t *client_handle, OPEN_AF_t af, OPEN_CONTROL_t routingMode)
Enables/Disables IP Routing Admin mode.
open_error_t openapiRtrIntfIpNetDirBroadcastModeSet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_CONTROL_t ipNetBroadcastMode)
Enables/Disables forwarding of Network-directed broadcast on a Router Interface.
OPEN_INTF_IP_ADDR_TYPE_t
Type of IP address.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiRtrVlanIntfIfNumGet(openapiClientHandle_t *client_handle, uint32_t vlanId, uint32_t *intf)
Get the interface number for a VLAN Routing Interface.
open_error_t openapiIpRouteDel(openapiClientHandle_t *client_handle, OPEN_AF_t af, open_inet_pfx_t *ipAddr, open_inet_addr_t *nextHop, uint32_t intf, OPEN_MPLS_LABELS_t *mpls)
Delete an IP Route for a given address family.
open_error_t openapiRtrIntfIpRedirectsModeSet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_CONTROL_t redirectsMode)
Enables/Disables generation of IP Redirects messages on a Router interface.
open_error_t openapiIpHelperAddressDel(openapiClientHandle_t *client_handle, open_inet_addr_t ipAddr, uint32_t udpPort)
Deletes IP Helper Address and UDP port number.
open_error_t openapiRtrVlanIntfDelete(openapiClientHandle_t *client_handle, uint32_t vlanId)
Delete a VLAN Routing Interface.
open_error_t openapiRtrIntfIpDestUnreachableModeSet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_CONTROL_t unreachableMode)
Enables/Disables generation of IP Destination Unreachable messages on a Router interface.
open_error_t openapiRtrIntfIpHelperAddressDel(openapiClientHandle_t *client_handle, uint32_t intf, open_inet_addr_t ipAddr, uint32_t udpPort)
Deletes IP Helper Address and UDP port number on an interface.
open_error_t openapiRtrIntfIpAddrDel(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, OPEN_INTF_IP_ADDR_TYPE_t addrType, open_inet_pfx_t *ipAddr, OPEN_CONTROL_t extArg)
Delete an IP address on a given router interface for a given address family.
open_error_t openapiArpEntryDel(openapiClientHandle_t *client_handle, open_inet_addr_t ipAddr)
Delete an ARP entry.