[lldp-devel] [PATCH] Add newer kernel routing attributes to lldpad

Mijo Safradin mijo at linux.vnet.ibm.com
Tue Apr 2 13:27:20 UTC 2013


  IFLA_NET_NS_FD
  IFLA_EXT_MASK
  IFLA_PROMISCUITY
  IFLA_NUM_TX_QUEUES
  IFLA_NUM_RX_QUEUES
  IFLA_CARRIER

Signed-off-by: Mijo Safradin <mijo at linux.vnet.ibm.com>
---
 event_iface.c           | 18 ++++++++++++++++++
 include/linux/if_link.h |  7 +++++++
 2 files changed, 25 insertions(+)

diff --git a/event_iface.c b/event_iface.c
index c9879c7..2cd4f0c 100644
--- a/event_iface.c
+++ b/event_iface.c
@@ -157,6 +157,24 @@ static void event_if_decode_rta(int type, struct rtattr *rta, int *ls, char *d)
 	case IFLA_GROUP:
 		LLDPAD_DBG(" IFLA_GROUP\n");
 		break;
+	case IFLA_NET_NS_FD:
+		LLDPAD_DBG(" IFLA_NET_NS_FD\n");
+		break;
+	case IFLA_EXT_MASK:
+		LLDPAD_DBG(" IFLA_EXT_MASK\n");
+		break;
+	case IFLA_PROMISCUITY:
+		LLDPAD_DBG(" IFLA_PROMISCUITY\n");
+		break;
+	case IFLA_NUM_TX_QUEUES:
+		LLDPAD_DBG(" IFLA_NUM_TX_QUEUES\n");
+		break;
+	case IFLA_NUM_RX_QUEUES:
+		LLDPAD_DBG(" IFLA_NUM_RX_QUEUES\n");
+		break;
+	case IFLA_CARRIER:
+		LLDPAD_DBG(" IFLA_CARRIER\n");
+		break;
 	default:
 		LLDPAD_DBG(" unknown type : 0x%02x\n", type);
 		break;
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 4fdfd38..5a33f41 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -118,6 +118,13 @@ enum {
 	IFLA_PORT_SELF,
         IFLA_AF_SPEC,
         IFLA_GROUP,             /* Group the device belongs to */
+        IFLA_NET_NS_FD,
+        IFLA_EXT_MASK,          /* Extended info mask, VFs, etc */
+        IFLA_PROMISCUITY,       /* Promiscuity count: > 0 means acts PROMISC */
+#define IFLA_PROMISCUITY IFLA_PROMISCUITY
+        IFLA_NUM_TX_QUEUES,
+        IFLA_NUM_RX_QUEUES,
+        IFLA_CARRIER,
 	__IFLA_MAX
 };
 
-- 
1.7.11.7



More information about the lldp-devel mailing list