...
The following examples show how to join and leave an IPv4 multicast group with µC/TCP-IP:
Code Block |
---|
language | cpp |
---|
firstline | 1 |
---|
linenumbers | true |
---|
|
NET_IF_NBR if_nbr;
NET_IP_ADDR group_ip_addr;
NET_ERR err;
if_nbr = NET_IF_NBR_BASE_CFGD;
group_ip_addr = NetASCII_Str_to_IP("233.0.0.1", &err);
if (err != NET_ASCII_ERR_NONE) {
/* Handle error. */
}
NetIGMP_HostGrpJoin(if_nbr, group_ip_addr, &err);
if (err != NET_IGMP_ERR_NONE) {
/* Handle error. */
}
[...]
NetIGMP_HostGrpLeave(if_nbr, group_ip_addr, &err);
if (err != NET_IGMP_ERR_NONE) {
/* Handle error. */
} |
Info |
---|
Refer to functions NetIGMP_HostGrpJoin and NetIGMP_HostGrpLeave for more details. |
...
The following examples show how to join and leave an IPv6 multicast group with µC/TCP-IP:
Code Block |
---|
language | cpp |
---|
firstline | 1 |
---|
linenumbers | true |
---|
|
NET_IF_NBR if_nbr;
NET_IPv6_ADDR group_ip_addr;
NET_ERR err;
if_nbr = NET_IF_NBR_BASE_CFGD;
group_ip_addr = NetASCII_Str_to_IP("FF03::1", &err);
if (err != NET_ASCII_ERR_NONE) {
/* Handle error. */
}
NetMLDP_HostGrpJoin(if_nbr, group_ip_addr, &err);
if (err != NET_MDLP_ERR_NONE) {
/* Handle error. */
}
[...]
NetMLDP_HostGrpLeave(if_nbr, group_ip_addr, &err);
if (err != NET_MDLP_ERR_NONE) {
/* Handle error. */
} |
Info |
---|
Refer to functions NetMLDP_HostGrpJoin and NetMLDP_HostGrpLeave for more details. |
...