VBoxNetARP.cpp revision 3c086cee27d5216042cc045c009537485c0339b5
/* $Id$ */
/** @file
* VBoxNetARP - IntNet ARP Client Routines.
*/
/*
* Copyright (C) 2009-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP LOG_GROUP_DEFAULT
#include "VBoxNetLib.h"
#include <VBox/intnetinline.h>
/**
* Deal with ARP queries.
*
* @returns true if ARP.
*
* @param pSession The support driver session.
* @param hIf The internal network interface handle.
* @param pBuf The internal network interface buffer.
* @param pMacAddr Our MAC address.
* @param IPv4Addr Our IPv4 address.
*/
bool VBoxNetArpHandleIt(PSUPDRVSESSION pSession, INTNETIFHANDLE hIf, PINTNETBUF pBuf, PCRTMAC pMacAddr, RTNETADDRIPV4 IPv4Addr)
{
/*
* Valid IntNet Ethernet frame? Skip GSO, no ARP in there.
*/
if ( !pHdr
return false;
/*
* Arp frame?
*/
return false;
)
return false;
return false;
return false;
return false;
return false;
return false;
/* It's ARP, alright. Anything we need to do something about. */
{
case RT_H2N_U16_C(RTNET_ARPOP_REQUEST):
break;
default:
return true;
}
/*
* Deal with the queries.
*/
{
/* 'Who has ar_tpa? Tell ar_spa.' */
case RT_H2N_U16_C(RTNET_ARPOP_REQUEST):
return true;
break;
return true;
break;
/** @todo RTNET_ARPOP_INVREQUEST */
return true;
//Reply.Hdr.ar_oper = RT_H2N_U16_C(RTNET_ARPOP_INVREPLY);
//break;
}
/*
* Complete the reply and send it.
*/
return true;
}