www.beck-ipc.com

@CHIP-RTOS C Library V2.00 - TCP/IP API


IPMulticast_to_MacAddr

Map IP multicast address to Ethernet address.

int IPMulticast_to_MacAddr ( const unsigned long far *MulticastIP,
                             unsigned char far *MacAddress,
                             int *error );

Parameters

MulticastIP

Pointer to multicast IP address.

MacAddress

Output Parameter:  Pointer to a 6 byte array where the corresponding MAC address will be stored by this function.

error

Output parameter:  Failure code, 0 on success.

Return Value

0: success
-1: See reported error code.

Comments

This API function computes the MAC address in the following way:
To map an IP multicast address to a corresponding Ethernet multicast address, place the low-order 23 bits of the IP multicast address into the low order 23 bits of the special Ethernet multicast address
    01 00 5E 00 00 00

e.g. IP multicast address 224.0.0.1 becomes Ethernet address
    01 00 5E 00 00 01

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.


This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document