I am writing a module that extracts the MAC address of the Ethernet Mac header of wireless 802.11 packet. I extract the ethernetmac header as
ieee = (struct ieee80211_hdr *)skb_mac_header(sock_buff);
ieee->addr1[ETH_ALEN];
ieee->addr2[ETH_ALEN];
ieee->addr3[ETH_ALEN];
I want to print these addresses to see the values it contains. How do I do that using printk
and KERN_INFO
Currently i am using this statement but it causes kernel in panic mode
printk(KERN_INFO "The address is %x:%x:%x:%x:%x:%x", ieee->addr1[0],ieee->addr1[1],ieee->addr1[2],ieee->addr1[3],ieee->addr1[4],ieee->addr1[5]);