#include "windefs.h"
#endif
+#include "openvswitch/types.h"
+
typedef enum {
SFL_DSCLASS_IFINDEX = 0,
SFL_DSCLASS_VLAN = 1,
typedef struct _SFLSampled_ethernet {
u_int32_t eth_len; /* The length of the MAC packet excluding
lower layer encapsulations */
- u_int8_t src_mac[8]; /* 6 bytes + 2 pad */
- u_int8_t dst_mac[8];
+ struct eth_addr src_mac; /* 6 bytes */
+ u_int8_t pad1[2]; /* 2 pad */
+ struct eth_addr dst_mac;
+ u_int8_t pad2[2];
u_int32_t eth_type;
} SFLSampled_ethernet;
} SFLLACP_portState;
typedef struct _SFLLACP_counters {
- uint8_t actorSystemID[8]; /* 6 bytes + 2 pad */
- uint8_t partnerSystemID[8]; /* 6 bytes + 2 pad */
+ struct eth_addr actorSystemID; /* 6 bytes */
+ uint8_t pad1[2];
+ struct eth_addr partnerSystemID; /* 6 bytes */
+ uint8_t pad2[2];
uint32_t attachedAggID;
SFLLACP_portState portState;
uint32_t LACPDUsRx;
#define SFL_CTR_LACP_XDR_SIZE 56
+/* Application resource counters */
+
+typedef struct _SFLAPPResources_counters {
+ uint32_t user_time; /* in milliseconds */
+ uint32_t system_time; /* in milliseconds */
+ uint64_t mem_used;
+ uint64_t mem_max;
+ uint32_t fd_open;
+ uint32_t fd_max;
+ uint32_t conn_open;
+ uint32_t conn_max;
+} SFLAPPResources_counters;
+
+#define SFL_CTR_APP_RESOURCES_XDR_SIZE 40
+
+/* OVS datapath stats */
+
+typedef struct _SFLOVSDP_counters {
+ uint32_t n_hit;
+ uint32_t n_missed;
+ uint32_t n_lost;
+ uint32_t n_mask_hit;
+ uint32_t n_flows;
+ uint32_t n_masks;
+} SFLOVSDP_counters;
+
+#define SFL_CTR_OVSDP_XDR_SIZE 24
+
/* Counters data */
enum SFLCounters_type_tag {
SFLCOUNTERS_VLAN = 5,
SFLCOUNTERS_LACP = 7,
SFLCOUNTERS_OPENFLOWPORT = 1004,
- SFLCOUNTERS_PORTNAME = 1005
+ SFLCOUNTERS_PORTNAME = 1005,
+ SFLCOUNTERS_APP_RESOURCES = 2203,
+ SFLCOUNTERS_OVSDP = 2207
};
typedef union _SFLCounters_type {
SFLLACP_counters lacp;
SFLOpenFlowPort ofPort;
SFLPortName portName;
+ SFLAPPResources_counters appResources;
+ SFLOVSDP_counters ovsdp;
} SFLCounters_type;
typedef struct _SFLCounters_sample_element {