mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:27:35 +00:00
Kernel: Implement IP multicast support
An IP socket can now join a multicast group by using the IP_ADD_MEMBERSHIP sockopt, which will cause it to start receiving packets sent to the multicast address, even though this address does not belong to this host.
This commit is contained in:
parent
b9c367e13b
commit
78459b92d5
5 changed files with 77 additions and 7 deletions
|
@ -22,6 +22,9 @@ in_addr_t inet_addr(const char*);
|
|||
#define IN_LOOPBACKNET 127
|
||||
|
||||
#define IP_TTL 2
|
||||
#define IP_MULTICAST_LOOP 3
|
||||
#define IP_ADD_MEMBERSHIP 4
|
||||
#define IP_DROP_MEMBERSHIP 5
|
||||
|
||||
#define IPPORT_RESERVED 1024
|
||||
#define IPPORT_USERRESERVED 5000
|
||||
|
@ -39,6 +42,11 @@ struct sockaddr_in {
|
|||
char sin_zero[8];
|
||||
};
|
||||
|
||||
struct ip_mreq {
|
||||
struct in_addr imr_multiaddr;
|
||||
struct in_addr imr_interface;
|
||||
};
|
||||
|
||||
struct in6_addr {
|
||||
uint8_t s6_addr[16];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue