组播在内核里面对应的一个重要的结构体是ip_mreq,如下:

struct ip_mreq 
{
    struct in_addr imr_multiaddr;    /* IP multicast address of group */
    struct in_addr imr_interface;    /* local IP address of interface */
};
View Code

相关文章: