kernel version check in C
In a program or code, it is necessary to identify kernel version.For example, vlan_tx_tag_get is changed to skb_vlan_tag_get in kernel 4.0.0.We can do by using LINUX_VERSION_CODE and KERNEL_VERSION(a,b,c). In these case, we need to switch to new API. #include #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) ) /* vlan_tx_xx functions got renamed to skb_vlan */ #define vlan_tx_tag_get skb_vlan_ta..