]> granicus.if.org Git - libnl/commitdiff
Provide TC_HANDLE(maj, min) macro to generate tc handles
authorThomas Graf <tgraf@suug.ch>
Fri, 1 Apr 2011 14:25:57 +0000 (16:25 +0200)
committerThomas Graf <tgraf@suug.ch>
Fri, 1 Apr 2011 14:25:57 +0000 (16:25 +0200)
include/netlink/route/tc.h

index 17021be71ee0eab6dce38fd8945a9e2c321af23d..6cf8cb890dc4a0867dfa02cba509c5ef7ea1c10c 100644 (file)
 extern "C" {
 #endif
 
+/**
+ * Compute tc handle based on major and minor parts
+ * @ingroup tc
+ */
+#define TC_HANDLE(maj, min)    (TC_H_MAJ((maj) << 16) | TC_H_MIN(min))
+
 /**
  * Traffic control object
  * @ingroup tc