compat_530.h (4126B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 6 * 7 * RPC Compatibility with sdk-5.3.0 routines 8 */ 9 10 #ifndef _COMPAT_530_H_ 11 #define _COMPAT_530_H_ 12 13 #ifdef BCM_RPC_SUPPORT 14 15 #include <bcm/types.h> 16 #include <bcm/l3.h> 17 #include <bcm/tunnel.h> 18 #include <bcm_int/compat/compat_6517.h> 19 #include <bcm_int/compat/compat_6516.h> 20 21 typedef struct bcm_compat530_l2_addr_s { 22 uint32 flags; /* BCM_L2_XXX flags */ 23 bcm_mac_t mac; /* 802.3 MAC address */ 24 bcm_vlan_t vid; /* VLAN identifier */ 25 int port; /* Zero-based port number */ 26 int modid; /* XGS: modid */ 27 bcm_trunk_t tgid; /* Trunk group ID */ 28 int rtag; /* Trunk port select formula */ 29 bcm_cos_t cos_dst; /* COS based on dst addr */ 30 bcm_cos_t cos_src; /* COS based on src addr */ 31 int l2mc_index; /* XGS: index in L2MC table */ 32 bcm_pbmp_t block_bitmap; /* XGS: blocked egress bitmap */ 33 int auth; /* Used if auth enabled on port */ 34 } bcm_compat530_l2_addr_t; 35 36 extern int bcm_compat530_l2_addr_add( 37 int unit, 38 bcm_compat530_l2_addr_t *l2addr); 39 extern int bcm_compat530_l2_conflict_get( 40 int unit, 41 bcm_compat530_l2_addr_t *addr, 42 bcm_compat530_l2_addr_t *cf_array, 43 int cf_max, 44 int *cf_count); 45 extern int bcm_compat530_l2_addr_get( 46 int unit, 47 bcm_mac_t mac_addr, 48 bcm_vlan_t vid, 49 bcm_compat530_l2_addr_t *l2addr); 50 51 52 #ifdef INCLUDE_L3 53 54 typedef struct bcm_compat530_l3_tunnel_initiator_s { 55 uint32 l3t_flags; /* Config flags */ 56 bcm_tunnel_type_t l3t_type; /* Tunnel type */ 57 int l3t_ttl; /* Tunnel header TTL */ 58 bcm_mac_t l3t_dmac; /* DA MAC */ 59 int l3t_ip4_df_sel; /* IP tunnel hdr DF bit for IPv4 */ 60 int l3t_ip6_df_sel; /* IP tunnel hdr DF bit for IPv6 */ 61 bcm_ip_t l3t_dip; /* Tunnel header DIP address */ 62 bcm_ip_t l3t_sip; /* Tunnel header SIP address */ 63 int l3t_dscp_sel; /* Tunnel header DSCP select */ 64 int l3t_dscp; /* Tunnel header DSCP value */ 65 } bcm_compat530_l3_tunnel_initiator_t; 66 67 typedef struct bcm_compat530_l3_tunnel_terminator_s { 68 uint32 l3t_flags; /* Config flags */ 69 bcm_ip_t l3t_sip; /* SIP for tunnel header match */ 70 bcm_ip_t l3t_dip; /* DIP for tunnel header match */ 71 bcm_ip_t l3t_sip_mask; /* SIP mask */ 72 bcm_ip_t l3t_dip_mask; /* DIP mask */ 73 uint32 l3t_udp_dst_port; /* UDP dst port for UDP packets */ 74 uint32 l3t_udp_src_port; /* UDP src port for UDP packets */ 75 bcm_tunnel_type_t l3t_type; /* Tunnel type */ 76 bcm_pbmp_t l3t_pbmp; /* Port bitmap for this tunnel */ 77 bcm_vlan_t l3t_vlan; /* The VLAN ID for IPMC lookup */ 78 } bcm_compat530_l3_tunnel_terminator_t; 79 80 extern int bcm_compat530_l3_tunnel_initiator_set( 81 int unit, 82 bcm_compat6517_l3_intf_t *intf, 83 bcm_compat530_l3_tunnel_initiator_t *tunnel); 84 extern int bcm_compat530_l3_tunnel_initiator_get( 85 int unit, 86 bcm_compat6517_l3_intf_t *intf, 87 bcm_compat530_l3_tunnel_initiator_t *tunnel); 88 extern int bcm_compat530_l3_tunnel_terminator_add( 89 int unit, 90 bcm_compat530_l3_tunnel_terminator_t *info); 91 extern int bcm_compat530_l3_tunnel_terminator_delete( 92 int unit, 93 bcm_compat530_l3_tunnel_terminator_t *info); 94 extern int bcm_compat530_l3_tunnel_terminator_update( 95 int unit, 96 bcm_compat530_l3_tunnel_terminator_t *info); 97 extern int bcm_compat530_l3_tunnel_terminator_get( 98 int unit, 99 bcm_compat530_l3_tunnel_terminator_t *info); 100 101 #endif /* INCLUDE_L3 */ 102 103 #endif /* BCM_RPC_SUPPORT */ 104 105 #endif /* !_COMPAT_530_H */