XilinxProcessorIPLib/drivers/axiethernet/examples/xaxiethernet_example_util.c
void AxiEthernetUtilFrameHdrFormatMAC(EthernetFrame *FramePtr, char *DestAddr)
{
	char *Frame = (char *) FramePtr;
	char *SourceAddress = AxiEthernetMAC;
	int Index;

	if (Padding) {
		for (Index = 0; Index < 8; Index++) {
			*Frame++ = 0;
		}
	}

	/*
	 * Destination address
	 */
	for (Index = 0; Index < XAE_MAC_ADDR_SIZE; Index++) {
		*Frame++ = *DestAddr++;
	}

	/*
	 * Source address
	 */
	for (Index = 0; Index < XAE_MAC_ADDR_SIZE; Index++) {
		*Frame++ = *SourceAddress++;
	}
}
/******************************************************************************/
/**
*
* Set the MAC addresses in the frame.
*
* @param	FramePtr is the pointer to the frame.
* @param	DestAddr is the Destination MAC address.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
Set the MAC addresses in the frame.
Set the MAC addresses in the frame .
void AxiEthernetUtilFrameHdrFormatMAC(EthernetFrame *FramePtr, char *DestAddr)
{
	char *Frame = (char *) FramePtr;
	char *SourceAddress = AxiEthernetMAC;
	int Index;
	if (Padding) {
		for (Index = 0; Index < 8; Index++) {
			*Frame++ = 0;
		}
	}
	for (Index = 0; Index < XAE_MAC_ADDR_SIZE; Index++) {
		*Frame++ = *DestAddr++;
	}
	for (Index = 0; Index < XAE_MAC_ADDR_SIZE; Index++) {
		*Frame++ = *SourceAddress++;
	}
}
void AxiEthernetUtilFrameHdrFormatMAC ( EthernetFrame * FramePtr , char * DestAddr ) { char * Frame = ( char * ) FramePtr ; char * SourceAddress = AxiEthernetMAC ; int Index ; if ( Padding ) { for ( Index = 0 ; Index < 8 ; Index ++ ) { * Frame ++ = 0 ; } } for ( Index = 0 ; Index < XAE_MAC_ADDR_SIZE ; Index ++ ) { * Frame ++ = * DestAddr ++ ; } for ( Index = 0 ; Index < XAE_MAC_ADDR_SIZE ; Index ++ ) { * Frame ++ = * SourceAddress ++ ; } }
Set the MAC addresses in the frame.
Set the MAC addresses in the frame .
/*
	 * Destination address
	 */ /*
	 * Source address
	 */