XilinxProcessorIPLib/drivers/axiethernet/examples/xaxiethernet_example_util.c
void AxiEthernetUtilFrameHdrVlanFormatVid(EthernetFrame *FramePtr,
						u32 VlanNumber,	u32 Vid)
{
	char *Frame = (char *) FramePtr;

	/*
	 * Increment to type field
	 */
	Frame = Frame + 12 + (VlanNumber * 4);

	Vid = Xil_Htonl(Vid);

	/*
	 * Set the type
	 */
	*(u32 *) Frame = Vid;
}
/******************************************************************************/
/**
*
* Set the frame VLAN info for the specified frame.
*
* @param	FramePtr is the pointer to the frame.
* @param	VlanNumber is the VlanValue insertion position to set in frame.
* @param	Vid  is the 4 bytes Vlan value (TPID, Priority, CFI, VID)
*		to be set in frame.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
Set the frame VLAN info for the specified frame.
Set the frame VLAN info for the specified frame .
void AxiEthernetUtilFrameHdrVlanFormatVid(EthernetFrame *FramePtr,
						u32 VlanNumber,	u32 Vid)
{
	char *Frame = (char *) FramePtr;
	Frame = Frame + 12 + (VlanNumber * 4);
	Vid = Xil_Htonl(Vid);
	*(u32 *) Frame = Vid;
}
void AxiEthernetUtilFrameHdrVlanFormatVid ( EthernetFrame * FramePtr , u32 VlanNumber , u32 Vid ) { char * Frame = ( char * ) FramePtr ; Frame = Frame + 12 + ( VlanNumber * 4 ) ; Vid = Xil_Htonl ( Vid ) ; * ( u32 * ) Frame = Vid ; }
Set the frame VLAN info for the specified frame.
Set the frame VLAN info for the specified frame .
/*
	 * Increment to type field
	 */ /*
	 * Set the type
	 */