Hello
I am trying to create a proxy ARP entry using CreateProxyArpEntry()
call. Though the parameters seem to be correct, it is always
returning error code ERROR_INVALID_PARAMETER. Pls help me out !!!
I am using Win 2000 SP4. Following is the code :
#include “pcap.h”
#include “IPHlpApi.h”
#include <winsock.h>
#include <stdio.h>
void main(int argc, char argv)
{
IP_ADAPTER_INFO AdapterInfo;
ULONG buffLen;
IPAddr ipAddr;
ULONG pulMac[2];
char szMac[20]={0};
PBYTE pbHexMac = (PBYTE) pulMac;
DWORD address=0,mask=0,j;
char str[1000]={0};
ULONG index=0;
buffLen=sizeof(AdapterInfo);
GetAdaptersInfo(&AdapterInfo,&buffLen);
ipAddr = inet_addr(“172.16.77.152”);
mask = inet_addr(“255.255.255.0”);
j=CreateProxyArpEntry(ipAddr,mask,AdapterInfo.Index);
if(!j)
{
printf(“\nSuccess\n”);
}
else
{
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
j,
LANG_NEUTRAL,
(LPTSTR)&str,
1000,
NULL);
printf(“\nFailure : %s\n”,str);
}
}
********************* HSS-Unclassified *********************** </stdio.h></winsock.h>
This is a forum for typical device driver related questions. May be you
should repost your question on a Microsoft forum dedicated to network
programming. I am afread you will not get many answers here.
P.S. Please use a bigger fontsize …
----- Original Message -----
From: xxxxx@hssworld.com
To: Windows System Software Devs Interest List
Sent: Wednesday, September 01, 2004 1:02 PM
Subject: [ntdev] Error using CreateProxyArpEntry - pls ignore the previous mail
Hello
I am trying to create a proxy ARP entry using CreateProxyArpEntry()
call. Though the parameters seem to be correct, it is always
returning error code ERROR_INVALID_PARAMETER. Pls help me out !!!
I am using Win 2000 SP4. Following is the code :
#include “pcap.h”
#include “IPHlpApi.h”
#include <winsock.h>
#include <stdio.h>
void main(int argc, char argv)
{
IP_ADAPTER_INFO AdapterInfo;
ULONG buffLen;
IPAddr ipAddr;
ULONG pulMac[2];
char szMac[20]={0};
PBYTE pbHexMac = (PBYTE) pulMac;
DWORD address=0,mask=0,j;
char str[1000]={0};
ULONG index=0;
buffLen=sizeof(AdapterInfo);
GetAdaptersInfo(&AdapterInfo,&buffLen);
ipAddr = inet_addr(“172.16.77.152”);
mask = inet_addr(“255.255.255.0”);
j=CreateProxyArpEntry(ipAddr,mask,AdapterInfo.Index);
if(!j)
{
printf(“\nSuccess\n”);
}
else
{
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
j,
LANG_NEUTRAL,
(LPTSTR)&str,
1000,
NULL);
printf(“\nFailure : %s\n”,str);
}
}
********************* HSS-Unclassified *********************** — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@compaqnet.be To unsubscribe send a blank email to xxxxx@lists.osr.com</stdio.h></winsock.h>