why struct net_device has a field uc_promisc? How this field is used?
Thank you all!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When a device that doesn’t support unicast filtering has to listen to several unicast addresses, it is put on promiscous mode, according to
dev->uc_countanddev->uc_promisc. Check the__dev_set_rx_mode()function.Many devices implement
ndo_set_rx_mode(), and set their unicast (and multicast) filters viando_set_rx_mode(). For devices that don’t implement that, Linux sets the device to promiscuous mode, and keeps track of that fact withdev->uc_promisc.So there are several flags for promiscuous mode:
dev->flags & IFF_PROMISCmeans the device is in promiscuous mode.dev->gflags & IFF_PROMISCmeans the user has requested promiscuous mode.dev->uc_promiscmeans promiscuous mode has been enabled (actually, its reference count has been incremented) due to the need to listen to additional unicast address in a device that doesn’t implementndo_set_rx_mode().