Hi,
> Hello,
>
> Here's a little makefile under MingWin that solves the issue where the
packet.a (Cygwin build) was not properly exporting "packet.dll" name for
MingWin.
>
> Just push the file to \winpcap\packetNtx\Dll and run make -f makefile.win
On my machine, it returns:
$ make -f makefile.win
makefile.win:17: *** missing separator. Stop.
Am I doing something wrong?
> BTW, wouldn't it be preferable that PacketSenPacket returns the actual
number of bytes transfered, as such :
>
> DWORD PacketSendPacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN
Sync)
> {
> DWORD BytesTransfered;
>
>
WriteFile(AdapterObject->hFile,lpPacket->Buffer,lpPacket->Length,&BytesTrans
fered,NULL);
>
> return (BytesTransfered);
> }
>
> Just my 2cents :-)
I'm currently wrting an improved version of PacketSendPacket(), I'll surely
tale in consideration you suggestion.
Loris
> Thanks for the great work !
>
> Cheers,
>
> Jitsu.
>
>
<-----------------------------------makefile.win----------------------------
--------->
> DLL_OBJS = ./Packet32.o
>
> DLL_NAME = packet.dll # created by dllwrap
> DLL_EXP_DEF = packet.def # created by enhanced dlltool
> DLL_EXP_LIB = packet.a # created by any version of dlltool
>
> DLLWRAP = dllwrap
> DLLTOOL = dlltool
> CC = gcc -Wall -mno-cygwin -fnative-struct -mwindows
>
> CFLAGS = -I../../Common -O
> DLL_LDLIBS = -lwsock32
>
> all : $(DLL_EXP_DEF) $(DLL_EXP_LIB)
>
> $(DLL_EXP_LIB): $(DLL_EXP_DEF)
> $(DLLWRAP) --output-lib $(DLL_EXP_LIB) --dllname $(DLL_NAME) \
> --driver-name $(CC) --def $(DLL_EXP_DEF) $(DLL_OBJS) $(DLL_LDLIBS)
>
> $(DLL_EXP_DEF): $(DLL_OBJS)
> $(DLLTOOL) --export-all --output-def $@ $(DLL_OBJS)
> <-----------------------------------cut
here------------------------------------->
>
> Resulting stuff (UUEncoded) :
>
>
----------------------------------------------------------------------------
----
> 12588 bytes
>