IpJoinMulticastGroup
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
long IpJoinMulticastGroup( dword socket, dword ifIndex, dword ipv4address ); // form 1long IpJoinMulticastGroup( dword socket, dword ifIndex, byte ipv6Address[] ); // form 2long IpJoinMulticastGroup( dword socket, dword ifIndex, IP_Address multicastAddress ); // form 3
Description
Joins the multicast group on the given socket, to be able to receive multicast messages. To receive multicast messages, the multicast group has to be joined before. To leave a multicast group, call IpLeaveMulticastGroup. Before multicast messages can be sent, IpSetMulticastInterface has to be called. Note: The function is dependent on the selected stack. This functionality cannot be used in connection with the operating system TCP/IP stack.Parameters
- socket: The socket handle.
- ifIndex: The 1-based network interface index. All adapter addresses including the local loopback address are taken into account in the stack of the operating system. The order depends on how the operating system lists the adapters. All assigned addresses including the VLAN addresses are taken into account in the CANoe DE product stack.
- ipv4address: The numerical IPv4 address of the destination.
- ipv6Address: The local IPv6 address in a 16 byte array.
- multicastAddress: The IP multicast address of the destination.
Return Values
- 0: The function completed successfully.
- WSA_INVALID_PARAMETER (87): The specified network interface index was invalid.
- SOCKET_ERROR (-1): The function failed. Call IpGetLastSocketError to get a more specific error code.