summaryrefslogtreecommitdiff
path: root/cesar/cp/mme.h
diff options
context:
space:
mode:
authorThierry Carré2012-02-14 16:32:05 +0100
committerThierry Carré2012-03-02 13:42:48 +0100
commit18817dacd0549423789aa4dc6ad04a98a2e700e4 (patch)
tree84bbdf457cd6b04e0099e220a191625cb08a10dc /cesar/cp/mme.h
parent0b664733c01c6c1cc23fde6730612951b21cc9a4 (diff)
cesar: redefine many size about ethernet packet, closes #2900
- Add the difference between a packet tagged or not (simple vlan). - Check the length of the last mme of vs_get_pb_stats.cnf (#2900). - Split in 2 fields the vlan_tag in cp_mme_peer, useful for new macro. - Write the HPAV_MTYPE_MME in little endian, and so remove many swap16. This commit prepare the work to do for #2894 (strongly linked)
Diffstat (limited to 'cesar/cp/mme.h')
-rw-r--r--cesar/cp/mme.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/cesar/cp/mme.h b/cesar/cp/mme.h
index b8af81153c..9536a7e0dd 100644
--- a/cesar/cp/mme.h
+++ b/cesar/cp/mme.h
@@ -358,8 +358,10 @@ struct cp_mme_peer_t
{
/** Peer MAC address. */
mac_t mac;
- /** VLAN tag or 0 if none. */
- u32 vlan_tag;
+ /* First Ethernet type found at offset ETH_TYPE_OFFSET */
+ u16 eth_type;
+ /* 0 if the eth_type isn't a vlan */
+ u16 vlan_tci;
/** Peer TEI, or 0xff if not TEI based. */
cp_tei_t tei;
};
@@ -461,11 +463,13 @@ typedef struct cp_mme_tx_t cp_mme_tx_t;
/** Construct a cp_mme_peer_t for unicast to all STA. */
#define CP_MME_PEER_ALL_STA \
- ((cp_mme_peer_t) { .mac = MAC_BROADCAST, .tei = MAC_TEI_MULTI_UNICAST })
+ ((cp_mme_peer_t) { .mac = MAC_BROADCAST, .eth_type = HPAV_MTYPE_MME, \
+ .tei = MAC_TEI_MULTI_UNICAST })
/** Construct a cp_mme_peer_t from a MAC address and a TEI. */
#define CP_MME_PEER(mac_, tei_) \
- ((cp_mme_peer_t) { .mac = mac_, .vlan_tag = 0, .tei = tei_ })
+ ((cp_mme_peer_t) { .mac = mac_, .eth_type = HPAV_MTYPE_MME, \
+ .vlan_tci = 0, .tei = tei_ })
/**
* Compare two cp_mme_peer_t.