compat_530.h (4024B)
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-2019 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 19 typedef struct bcm_compat530_l2_addr_s { 20 uint32 flags; /* BCM_L2_XXX flags */ 21 bcm_mac_t mac; /* 802.3 MAC address */ 22 bcm_vlan_t vid; /* VLAN identifier */ 23 int port; /* Zero-based port number */ 24 int modid; /* XGS: modid */ 25 bcm_trunk_t tgid; /* Trunk group ID */ 26 int rtag; /* Trunk port select formula */ 27 bcm_cos_t cos_dst; /* COS based on dst addr */ 28 bcm_cos_t cos_src; /* COS based on src addr */ 29 int l2mc_index; /* XGS: index in L2MC table */ 30 bcm_pbmp_t block_bitmap; /* XGS: blocked egress bitmap */ 31 int auth; /* Used if auth enabled on port */ 32 } bcm_compat530_l2_addr_t; 33 34 extern int bcm_compat530_l2_addr_add( 35 int unit, 36 bcm_compat530_l2_addr_t *l2addr); 37 extern int bcm_compat530_l2_conflict_get( 38 int unit, 39 bcm_compat530_l2_addr_t *addr, 40 bcm_compat530_l2_addr_t *cf_array, 41 int cf_max, 42 int *cf_count); 43 extern int bcm_compat530_l2_addr_get( 44 int unit, 45 bcm_mac_t mac_addr, 46 bcm_vlan_t vid, 47 bcm_compat530_l2_addr_t *l2addr); 48 49 50 #ifdef INCLUDE_L3 51 52 typedef struct bcm_compat530_l3_tunnel_initiator_s { 53 uint32 l3t_flags; /* Config flags */ 54 bcm_tunnel_type_t l3t_type; /* Tunnel type */ 55 int l3t_ttl; /* Tunnel header TTL */ 56 bcm_mac_t l3t_dmac; /* DA MAC */ 57 int l3t_ip4_df_sel; /* IP tunnel hdr DF bit for IPv4 */ 58 int l3t_ip6_df_sel; /* IP tunnel hdr DF bit for IPv6 */ 59 bcm_ip_t l3t_dip; /* Tunnel header DIP address */ 60 bcm_ip_t l3t_sip; /* Tunnel header SIP address */ 61 int l3t_dscp_sel; /* Tunnel header DSCP select */ 62 int l3t_dscp; /* Tunnel header DSCP value */ 63 } bcm_compat530_l3_tunnel_initiator_t; 64 65 typedef struct bcm_compat530_l3_tunnel_terminator_s { 66 uint32 l3t_flags; /* Config flags */ 67 bcm_ip_t l3t_sip; /* SIP for tunnel header match */ 68 bcm_ip_t l3t_dip; /* DIP for tunnel header match */ 69 bcm_ip_t l3t_sip_mask; /* SIP mask */ 70 bcm_ip_t l3t_dip_mask; /* DIP mask */ 71 uint32 l3t_udp_dst_port; /* UDP dst port for UDP packets */ 72 uint32 l3t_udp_src_port; /* UDP src port for UDP packets */ 73 bcm_tunnel_type_t l3t_type; /* Tunnel type */ 74 bcm_pbmp_t l3t_pbmp; /* Port bitmap for this tunnel */ 75 bcm_vlan_t l3t_vlan; /* The VLAN ID for IPMC lookup */ 76 } bcm_compat530_l3_tunnel_terminator_t; 77 78 extern int bcm_compat530_l3_tunnel_initiator_set( 79 int unit, 80 bcm_l3_intf_t *intf, 81 bcm_compat530_l3_tunnel_initiator_t *tunnel); 82 extern int bcm_compat530_l3_tunnel_initiator_get( 83 int unit, 84 bcm_l3_intf_t *intf, 85 bcm_compat530_l3_tunnel_initiator_t *tunnel); 86 extern int bcm_compat530_l3_tunnel_terminator_add( 87 int unit, 88 bcm_compat530_l3_tunnel_terminator_t *info); 89 extern int bcm_compat530_l3_tunnel_terminator_delete( 90 int unit, 91 bcm_compat530_l3_tunnel_terminator_t *info); 92 extern int bcm_compat530_l3_tunnel_terminator_update( 93 int unit, 94 bcm_compat530_l3_tunnel_terminator_t *info); 95 extern int bcm_compat530_l3_tunnel_terminator_get( 96 int unit, 97 bcm_compat530_l3_tunnel_terminator_t *info); 98 99 #endif /* INCLUDE_L3 */ 100 101 #endif /* BCM_RPC_SUPPORT */ 102 103 #endif /* !_COMPAT_530_H */