Add rx broadcast bitrate to DLEP
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Wed, 25 Oct 2017 07:24:41 +0000 (09:24 +0200)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Wed, 25 Oct 2017 07:24:41 +0000 (09:24 +0200)
src-plugins/generic/dlep/dlep_iana.h
src-plugins/generic/dlep/ext_l2_statistics/l2_statistics.c

index 76a3c7c..497d0ee 100644 (file)
@@ -294,6 +294,11 @@ enum dlep_tlvs {
 
   /*! true if radio can only send unicast traffic */
   DLEP_TX_ONLY_UNICAST,
+
+  /* more layer1 statistics */
+
+  /*! rx broadcast bitrate */
+  DLEP_CDRR_BC_TLV,
 };
 
 enum dlep_peer_type_flags {
index 8d3e99f..72f2895 100644 (file)
@@ -62,6 +62,7 @@ static const uint16_t _session_initack_tlvs[] = {
     DLEP_BYTES_R_TLV,
     DLEP_BYTES_T_TLV,
     DLEP_THROUGHPUT_T_TLV,
+    DLEP_CDRR_BC_TLV,
 };
 
 /* peer update */
@@ -73,6 +74,7 @@ static const uint16_t _peer_session_tlvs[] = {
     DLEP_BYTES_R_TLV,
     DLEP_BYTES_T_TLV,
     DLEP_THROUGHPUT_T_TLV,
+    DLEP_CDRR_BC_TLV,
 };
 
 /* destination up/update */
@@ -85,6 +87,7 @@ static const uint16_t _dst_tlvs[] = {
     DLEP_BYTES_R_TLV,
     DLEP_BYTES_T_TLV,
     DLEP_THROUGHPUT_T_TLV,
+    DLEP_CDRR_BC_TLV,
 };
 static const uint16_t _dst_mandatory[] = {
     DLEP_MAC_ADDRESS_TLV,
@@ -187,6 +190,13 @@ static struct dlep_neighbor_mapping _neigh_mappings[] = {
         .from_tlv      = dlep_reader_map_identity,
         .to_tlv        = dlep_writer_map_identity,
     },
+    {
+        .dlep          = DLEP_CDRR_BC_TLV,
+        .layer2        = OONF_LAYER2_NEIGH_RX_BC_BITRATE,
+        .length        = 8,
+        .from_tlv      = dlep_reader_map_identity,
+        .to_tlv        = dlep_writer_map_identity,
+    },
 };
 
 /* DLEP base extension, radio side */