mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
net/packet: add PACKET_<ADD|DROP>_MEMBERSHIP support
Some third-party network libraries use PACKET_ADD_MEMBERSHIP to add MAC addresses to devices, and this patch can add support for this. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -44,6 +44,13 @@
|
||||
#define PACKET_LOOPBACK 5
|
||||
#define PACKET_FASTROUTE 6
|
||||
|
||||
/* Packet socket options */
|
||||
|
||||
#define PACKET_ADD_MEMBERSHIP 1 /* Add a multicast address to the interface */
|
||||
#define PACKET_DROP_MEMBERSHIP 2 /* Drop a multicast address from the interface */
|
||||
|
||||
#define PACKET_MR_MULTICAST 0 /* Multicast address */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
@@ -59,4 +66,12 @@ struct sockaddr_ll
|
||||
unsigned char sll_addr[8];
|
||||
};
|
||||
|
||||
struct packet_mreq
|
||||
{
|
||||
int mr_ifindex;
|
||||
unsigned short mr_type;
|
||||
unsigned short mr_alen;
|
||||
unsigned char mr_address[8];
|
||||
};
|
||||
|
||||
#endif /* __INCLUDE_NETPACKET_PACKET_H */
|
||||
|
||||
Reference in New Issue
Block a user