2 * Copyright (C) 2012, Broadcom Corporation
5 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
6 * the contents of this file may not be disclosed to third parties, copied
7 * or duplicated in any form, in whole or in part, without the prior
8 * written permission of Broadcom Corporation.
10 * $Id: emf_cfg.h 390526 2013-03-12 15:53:29Z $
19 #define EMFCFG_MAX_ARG_SIZE 1024
21 #define EMFCFG_CMD_EMF_ENABLE 1
22 #define EMFCFG_CMD_MFDB_ADD 2
23 #define EMFCFG_CMD_MFDB_DEL 3
24 #define EMFCFG_CMD_MFDB_CLEAR 4
25 #define EMFCFG_CMD_MFDB_LIST 5
26 #define EMFCFG_CMD_BR_ADD 6
27 #define EMFCFG_CMD_BR_DEL 7
28 #define EMFCFG_CMD_BR_LIST 8
29 #define EMFCFG_CMD_IF_ADD 9
30 #define EMFCFG_CMD_IF_DEL 10
31 #define EMFCFG_CMD_IF_LIST 11
32 #define EMFCFG_CMD_UFFP_ADD 12
33 #define EMFCFG_CMD_UFFP_DEL 13
34 #define EMFCFG_CMD_UFFP_LIST 14
35 #define EMFCFG_CMD_RTPORT_ADD 15
36 #define EMFCFG_CMD_RTPORT_DEL 16
37 #define EMFCFG_CMD_RTPORT_LIST 17
38 #define EMFCFG_CMD_EMF_STATS 18
39 #define EMFCFG_CMD_MC_DATA_IND 19
41 #define EMFCFG_OPER_TYPE_GET 1
42 #define EMFCFG_OPER_TYPE_SET 2
44 #define EMFCFG_STATUS_SUCCESS 1
45 #define EMFCFG_STATUS_FAILURE 2
46 #define EMFCFG_STATUS_CMD_UNKNOWN 3
47 #define EMFCFG_STATUS_OPER_UNKNOWN 4
48 #define EMFCFG_STATUS_INVALID_IF 5
50 typedef struct emf_cfg_request
52 uint8 inst_id
[16]; /* Bridge name as instance identifier */
53 uint32 command_id
; /* Command identifier */
54 uint32 oper_type
; /* Operation type: GET, SET */
55 uint32 status
; /* Command status */
56 uint32 size
; /* Size of the argument */
57 /* Command arguments */
58 uint8 arg
[EMFCFG_MAX_ARG_SIZE
];
61 typedef struct emf_cfg_mfdb
63 uint32 mgrp_ip
; /* Multicast Group address */
64 uint8 if_name
[16]; /* Interface on which members are present */
65 void *if_ptr
; /* Interface pointer (kernel only) */
68 typedef struct emf_cfg_mfdb_list
70 uint32 num_entries
; /* Number of entries in MFDB */
73 uint32 mgrp_ip
; /* Multicast Group address */
74 uint8 if_name
[16]; /* Interface name */
75 uint32 pkts_fwd
; /* Number of packets forwarded */
76 void *if_ptr
; /* Interface pointer (kernel only) */
78 } emf_cfg_mfdb_list_t
;
80 typedef struct emf_cfg_if
82 uint8 if_name
[16]; /* Name of the interface */
85 typedef struct emf_cfg_if_list
87 uint32 num_entries
; /* Number of entries in EMF if list */
88 emf_cfg_if_t if_entry
[0]; /* Interface entry data */
91 typedef struct emf_cfg_uffp
93 uint8 if_name
[16]; /* Name of the interface */
94 void *if_ptr
; /* Interface pointer (kernel only) */
97 typedef struct emf_cfg_uffp_list
99 uint32 num_entries
; /* Number of entries in UFFP list */
100 emf_cfg_uffp_t uffp_entry
[0]; /* Interface entry data */
101 } emf_cfg_uffp_list_t
;
103 typedef struct emf_cfg_rtport
105 uint8 if_name
[16]; /* Name of the interface */
106 void *if_ptr
; /* Interface pointer (kernel only) */
109 typedef struct emf_cfg_rtport_list
111 uint32 num_entries
; /* Number of entries in UFFP list */
112 emf_cfg_rtport_t rtport_entry
[0]; /* Interface entry data */
113 } emf_cfg_rtport_list_t
;
116 * Multicast Forwarding Layer Statistics
118 typedef struct emf_stats
120 uint32 igmp_frames
; /* IGMP frames received */
121 uint32 igmp_frames_fwd
; /* IGMP membership quries received */
122 uint32 igmp_frames_sentup
; /* IGMP membership reports seen */
123 uint32 igmp_frames_dropped
; /* IGMP frames dropped */
124 uint32 mcast_data_frames
; /* Multicast data frames received */
125 uint32 mcast_data_fwd
; /* Multicast data frames forwarded */
126 uint32 mcast_data_flooded
; /* Multicast data frames flooded */
127 uint32 mcast_data_sentup
; /* Multicast data frames sent up */
128 uint32 mcast_data_dropped
; /* Multicast data frames dropped */
129 uint32 mfdb_cache_hits
; /* MFDB cache hits */
130 uint32 mfdb_cache_misses
; /* MFDB cache misses */
133 extern void emf_cfg_request_process(emf_cfg_request_t
*cfg
);
135 #endif /* _EMF_CFG_H_ */