From c51ec7a18c5628e91c53afb51f159c579cd8eaae Mon Sep 17 00:00:00 2001 From: Gangphon Date: Tue, 6 Jun 2023 12:13:33 +0800 Subject: [PATCH] ledset --- LedOK/main.cpp | 5 +- .../WpdPack_4_1_2/Examples-pcap/GNUmakefile | 10 - .../WpdPack_4_1_2/Examples-pcap/MakeaAll.dsw | 137 - .../WpdPack_4_1_2/Examples-pcap/MakeaAll.sln | 116 - .../Examples-pcap/UDPdump/GNUmakefile | 17 - .../Examples-pcap/UDPdump/UDPdump.dsp | 110 - .../Examples-pcap/UDPdump/UDPdump.dsw | 29 - .../Examples-pcap/UDPdump/UDPdump.vcproj | 364 -- .../Examples-pcap/UDPdump/udpdump.c | 242 -- .../Examples-pcap/basic_dump/GNUmakefile | 17 - .../Examples-pcap/basic_dump/basic_dump.c | 109 - .../Examples-pcap/basic_dump/basic_dump.dsp | 110 - .../Examples-pcap/basic_dump/basic_dump.dsw | 29 - .../basic_dump/basic_dump.vcproj | 364 -- .../Examples-pcap/basic_dump_ex/GNUmakefile | 17 - .../basic_dump_ex/basic_dump_ex.c | 106 - .../basic_dump_ex/basic_dump_ex.dsp | 110 - .../basic_dump_ex/basic_dump_ex.dsw | 29 - .../basic_dump_ex/basic_dump_ex.vcproj | 364 -- .../Examples-pcap/iflist/GNUmakefile | 17 - .../Examples-pcap/iflist/iflist.c | 172 - .../Examples-pcap/iflist/iflist.dsp | 110 - .../Examples-pcap/iflist/iflist.dsw | 29 - .../Examples-pcap/iflist/iflist.vcproj | 364 -- .../Examples-pcap/pcap_filter/GNUmakefile | 17 - .../Examples-pcap/pcap_filter/pcap_filter.c | 179 - .../Examples-pcap/pcap_filter/pcap_filter.dsp | 110 - .../Examples-pcap/pcap_filter/pcap_filter.dsw | 29 - .../pcap_filter/pcap_filter.vcproj | 364 -- .../Examples-pcap/pktdump_ex/GNUmakefile | 14 - .../Examples-pcap/pktdump_ex/pktdump_ex.c | 166 - .../Examples-pcap/pktdump_ex/pktdump_ex.dsp | 110 - .../Examples-pcap/pktdump_ex/pktdump_ex.dsw | 29 - .../pktdump_ex/pktdump_ex.vcproj | 364 -- .../Examples-pcap/readfile/GNUmakefile | 17 - .../Examples-pcap/readfile/readfile.c | 61 - .../Examples-pcap/readfile/readfile.dsp | 110 - .../Examples-pcap/readfile/readfile.dsw | 29 - .../Examples-pcap/readfile/readfile.vcproj | 364 -- .../Examples-pcap/readfile_ex/GNUmakefile | 17 - .../Examples-pcap/readfile_ex/readfile_ex.c | 56 - .../Examples-pcap/readfile_ex/readfile_ex.dsp | 110 - .../Examples-pcap/readfile_ex/readfile_ex.dsw | 29 - .../readfile_ex/readfile_ex.vcproj | 364 -- .../Examples-pcap/savedump/GNUmakefile | 17 - .../Examples-pcap/savedump/savedump.c | 111 - .../Examples-pcap/savedump/savedump.dsp | 110 - .../Examples-pcap/savedump/savedump.dsw | 29 - .../Examples-pcap/savedump/savedump.vcproj | 364 -- .../Examples-pcap/sendpack/GNUmakefile | 17 - .../Examples-pcap/sendpack/sendpack.c | 68 - .../Examples-pcap/sendpack/sendpack.dsp | 110 - .../Examples-pcap/sendpack/sendpack.dsw | 29 - .../Examples-pcap/sendpack/sendpack.vcproj | 364 -- .../WpdPack_4_1_2/Examples-remote/MakeAll.sln | 196 -- .../Examples-remote/MakeaAll.dsw | 221 -- .../GetMacAddress/GetMacAddress.c | 152 - .../GetMacAddress/GetMacAddress.dsp | 105 - .../GetMacAddress/GetMacAddress.vcproj | 364 -- .../TestPacketCapture/TestPacketCapture.c | 244 -- .../TestPacketCapture/TestPacketCapture.dsp | 105 - .../TestPacketCapture.vcproj | 364 -- .../TestPacketSend/TestPacketSend.c | 235 -- .../TestPacketSend/TestPacketSend.dsp | 107 - .../TestPacketSend/TestPacketSend.vcproj | 364 -- .../Examples-remote/PacketDriver/readme.txt | 2 - .../Examples-remote/UDPdump/UDPdump.dsp | 110 - .../Examples-remote/UDPdump/UDPdump.dsw | 29 - .../Examples-remote/UDPdump/UDPdump.vcproj | 364 -- .../Examples-remote/UDPdump/udpdump.c | 230 -- .../UserLevelBridge/UserBridge.c | 467 --- .../UserLevelBridge/UserBridge.dsp | 106 - .../UserLevelBridge/UserBridge.dsw | 29 - .../UserLevelBridge/UserBridge.vcproj | 364 -- .../Examples-remote/iflist/iflist.c | 176 - .../Examples-remote/iflist/iflist.dsp | 110 - .../Examples-remote/iflist/iflist.dsw | 29 - .../Examples-remote/iflist/iflist.vcproj | 364 -- .../Examples-remote/misc/MakeAll.sln | 76 - .../Examples-remote/misc/MakeaAll.dsw | 89 - .../Examples-remote/misc/basic_dump.c | 100 - .../Examples-remote/misc/basic_dump.dsp | 110 - .../Examples-remote/misc/basic_dump.vcproj | 364 -- .../Examples-remote/misc/basic_dump_ex.c | 99 - .../Examples-remote/misc/basic_dump_ex.dsp | 110 - .../Examples-remote/misc/basic_dump_ex.vcproj | 364 -- .../Examples-remote/misc/readfile.c | 78 - .../Examples-remote/misc/readfile.dsp | 110 - .../Examples-remote/misc/readfile.vcproj | 364 -- .../Examples-remote/misc/readfile_ex.c | 73 - .../Examples-remote/misc/readfile_ex.dsp | 110 - .../Examples-remote/misc/readfile_ex.vcproj | 364 -- .../Examples-remote/misc/savedump.c | 104 - .../Examples-remote/misc/savedump.dsp | 110 - .../Examples-remote/misc/savedump.vcproj | 364 -- .../Examples-remote/misc/sendpack.c | 64 - .../Examples-remote/misc/sendpack.dsp | 110 - .../Examples-remote/misc/sendpack.vcproj | 364 -- .../Examples-remote/pcap_filter/pcap_filter.c | 169 - .../pcap_filter/pcap_filter.dsp | 110 - .../pcap_filter/pcap_filter.dsw | 29 - .../pcap_filter/pcap_filter.vcproj | 364 -- .../Examples-remote/pcap_fopen/pcap_fopen.cpp | 94 - .../pcap_fopen/pcap_fopen.vcproj | 364 -- .../Examples-remote/pktdump_ex/pktdump_ex.c | 163 - .../Examples-remote/pktdump_ex/pktdump_ex.dsp | 110 - .../Examples-remote/pktdump_ex/pktdump_ex.dsw | 29 - .../pktdump_ex/pktdump_ex.vcproj | 364 -- .../Examples-remote/sendcap/sencap.dsw | 29 - .../Examples-remote/sendcap/sendcap.c | 184 -- .../Examples-remote/sendcap/sendcap.dsp | 110 - .../Examples-remote/sendcap/sendcap.vcproj | 364 -- .../Examples-remote/smp_1/smp_1.c | 134 - .../Examples-remote/smp_1/smp_1.dsp | 102 - .../Examples-remote/smp_1/smp_1.dsw | 29 - .../Examples-remote/smp_1/smp_1.vcproj | 364 -- .../Examples-remote/tcptop/tcptop.c | 158 - .../Examples-remote/tcptop/tcptop.dsp | 110 - .../Examples-remote/tcptop/tcptop.dsw | 29 - .../Examples-remote/tcptop/tcptop.vcproj | 364 -- ledset/WpdPack_4_1_2/Include/Packet32.h | 359 -- .../WpdPack_4_1_2/Include/Win32-Extensions.h | 113 - ledset/WpdPack_4_1_2/Include/bittypes.h | 137 - ledset/WpdPack_4_1_2/Include/ip6_misc.h | 163 - ledset/WpdPack_4_1_2/Include/pcap-stdinc.h | 93 - ledset/WpdPack_4_1_2/Include/pcap/bpf.h | 934 ------ ledset/WpdPack_4_1_2/Include/pcap/pcap.h | 407 --- ledset/WpdPack_4_1_2/Include/remote-ext.h | 444 --- ledset/WpdPack_4_1_2/Lib/Packet.lib | Bin 8450 -> 0 bytes ledset/WpdPack_4_1_2/Lib/wpcap.lib | Bin 19320 -> 0 bytes ledset/WpdPack_4_1_2/Lib/x64/Packet.lib | Bin 8290 -> 0 bytes ledset/WpdPack_4_1_2/Lib/x64/wpcap.lib | Bin 18892 -> 0 bytes ledset/WpdPack_4_1_2/docs/WinPcap_docs.html | 9 - ledset/WpdPack_4_1_2/docs/html/Packet_8h.html | 201 -- .../docs/html/Packet_8h_source.html | 572 ---- .../docs/html/Win32-Extensions_8h.html | 700 ---- .../docs/html/Win32-Extensions_8h_source.html | 139 - ledset/WpdPack_4_1_2/docs/html/annotated.html | 70 - ledset/WpdPack_4_1_2/docs/html/classes.html | 45 - ledset/WpdPack_4_1_2/docs/html/daemon_8h.html | 81 - .../docs/html/daemon_8h_source.html | 82 - .../WpdPack_4_1_2/docs/html/deprecated.html | 51 - ledset/WpdPack_4_1_2/docs/html/doxygen.png | Bin 1281 -> 0 bytes .../docs/html/doxygen__groups_8txt.html | 36 - ledset/WpdPack_4_1_2/docs/html/dump.gif | Bin 6353 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/encoding.gif | Bin 2777 -> 0 bytes .../WpdPack_4_1_2/docs/html/fileconf_8h.html | 78 - .../docs/html/fileconf_8h_source.html | 74 - ledset/WpdPack_4_1_2/docs/html/files.html | 50 - ledset/WpdPack_4_1_2/docs/html/ftv2blank.png | Bin 174 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/ftv2doc.png | Bin 255 -> 0 bytes .../docs/html/ftv2folderclosed.png | Bin 259 -> 0 bytes .../docs/html/ftv2folderopen.png | Bin 261 -> 0 bytes .../WpdPack_4_1_2/docs/html/ftv2lastnode.png | Bin 233 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/ftv2link.png | Bin 358 -> 0 bytes .../WpdPack_4_1_2/docs/html/ftv2mlastnode.png | Bin 160 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/ftv2mnode.png | Bin 194 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/ftv2node.png | Bin 235 -> 0 bytes .../WpdPack_4_1_2/docs/html/ftv2plastnode.png | Bin 165 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/ftv2pnode.png | Bin 200 -> 0 bytes .../WpdPack_4_1_2/docs/html/ftv2vertline.png | Bin 229 -> 0 bytes .../docs/html/funcs_2pcap_8h.html | 176 - .../docs/html/funcs_2pcap_8h_source.html | 206 -- ledset/WpdPack_4_1_2/docs/html/functions.html | 627 ---- .../docs/html/functions_vars.html | 627 ---- ledset/WpdPack_4_1_2/docs/html/globals.html | 114 - .../WpdPack_4_1_2/docs/html/globals_0x62.html | 204 -- .../WpdPack_4_1_2/docs/html/globals_0x63.html | 99 - .../WpdPack_4_1_2/docs/html/globals_0x64.html | 96 - .../WpdPack_4_1_2/docs/html/globals_0x65.html | 105 - .../WpdPack_4_1_2/docs/html/globals_0x66.html | 78 - .../WpdPack_4_1_2/docs/html/globals_0x67.html | 96 - .../WpdPack_4_1_2/docs/html/globals_0x68.html | 75 - .../WpdPack_4_1_2/docs/html/globals_0x69.html | 81 - .../WpdPack_4_1_2/docs/html/globals_0x6a.html | 99 - .../WpdPack_4_1_2/docs/html/globals_0x6b.html | 75 - .../WpdPack_4_1_2/docs/html/globals_0x6d.html | 128 - .../WpdPack_4_1_2/docs/html/globals_0x6e.html | 195 -- .../WpdPack_4_1_2/docs/html/globals_0x6f.html | 81 - .../WpdPack_4_1_2/docs/html/globals_0x70.html | 486 --- .../WpdPack_4_1_2/docs/html/globals_0x72.html | 210 -- .../WpdPack_4_1_2/docs/html/globals_0x73.html | 105 - .../WpdPack_4_1_2/docs/html/globals_0x74.html | 81 - .../WpdPack_4_1_2/docs/html/globals_0x75.html | 81 - .../WpdPack_4_1_2/docs/html/globals_defs.html | 707 ---- .../WpdPack_4_1_2/docs/html/globals_enum.html | 50 - .../WpdPack_4_1_2/docs/html/globals_eval.html | 56 - .../WpdPack_4_1_2/docs/html/globals_func.html | 526 --- .../WpdPack_4_1_2/docs/html/globals_type.html | 125 - .../WpdPack_4_1_2/docs/html/globals_vars.html | 71 - .../WpdPack_4_1_2/docs/html/group__NPF.html | 301 -- .../docs/html/group__NPF__code.html | 1667 ---------- .../docs/html/group__NPF__include.html | 756 ----- .../docs/html/group__NPF__ioctl.html | 376 --- .../docs/html/group__NPF__jitter.html | 1652 --------- .../docs/html/group__compilation.html | 242 -- .../docs/html/group__internals.html | 98 - .../docs/html/group__language.html | 633 ---- .../docs/html/group__packetapi.html | 87 - .../docs/html/group__remote.html | 386 --- .../html/group__remote__auth__methods.html | 76 - .../docs/html/group__remote__open__flags.html | 135 - .../docs/html/group__remote__pri__func.html | 33 - .../docs/html/group__remote__pri__struct.html | 1033 ------ .../html/group__remote__samp__methods.html | 95 - .../docs/html/group__remote__source__ID.html | 95 - .../html/group__remote__source__string.html | 112 - .../docs/html/group__remote__struct.html | 85 - .../docs/html/group__remotefunc.html | 33 - .../WpdPack_4_1_2/docs/html/group__wpcap.html | 81 - .../docs/html/group__wpcap__def.html | 279 -- .../docs/html/group__wpcap__tut.html | 34 - .../docs/html/group__wpcap__tut1.html | 81 - .../docs/html/group__wpcap__tut2.html | 216 -- .../docs/html/group__wpcap__tut3.html | 140 - .../docs/html/group__wpcap__tut4.html | 137 - .../docs/html/group__wpcap__tut5.html | 62 - .../docs/html/group__wpcap__tut6.html | 279 -- .../docs/html/group__wpcap__tut7.html | 438 --- .../docs/html/group__wpcap__tut8.html | 292 -- .../docs/html/group__wpcap__tut9.html | 206 -- .../docs/html/group__wpcapfunc.html | 2452 -------------- .../docs/html/group__wpcapsamps.html | 500 --- .../docs/html/incs_2pcap_8h.html | 78 - .../docs/html/incs_2pcap_8h_source.html | 155 - ledset/WpdPack_4_1_2/docs/html/index.hhc | 171 - ledset/WpdPack_4_1_2/docs/html/index.hhk | 2939 ----------------- ledset/WpdPack_4_1_2/docs/html/index.hhp | 160 - ledset/WpdPack_4_1_2/docs/html/index.html | 16 - .../docs/html/internals-arch.gif | Bin 4650 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/ioctls_8h.html | 73 - .../docs/html/ioctls_8h_source.html | 105 - ledset/WpdPack_4_1_2/docs/html/jitter_8h.html | 160 - .../docs/html/jitter_8h_source.html | 321 -- ledset/WpdPack_4_1_2/docs/html/main.html | 237 -- ledset/WpdPack_4_1_2/docs/html/main_8txt.html | 36 - ledset/WpdPack_4_1_2/docs/html/modules.html | 73 - ledset/WpdPack_4_1_2/docs/html/npf-dump.gif | Bin 4656 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/npf-ndis.gif | Bin 3572 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/npf-npf.gif | Bin 8463 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/pages.html | 32 - .../docs/html/pcap-remote_8h.html | 626 ---- .../docs/html/pcap-remote_8h_source.html | 307 -- .../docs/html/remote-ext_8h.html | 444 --- .../docs/html/remote-ext_8h_source.html | 171 - ledset/WpdPack_4_1_2/docs/html/rpcapd_8h.html | 162 - .../docs/html/rpcapd_8h_source.html | 88 - ledset/WpdPack_4_1_2/docs/html/stats.gif | Bin 5431 -> 0 bytes .../WpdPack_4_1_2/docs/html/stats_wpcap.gif | Bin 5267 -> 0 bytes .../docs/html/structJIT__BPF__Filter.html | 88 - .../docs/html/structPacketHeader.html | 92 - .../docs/html/struct__DEVICE__EXTENSION.html | 90 - .../docs/html/struct__INTERNAL__REQUEST.html | 124 - .../docs/html/struct__OPEN__INSTANCE.html | 978 ------ .../docs/html/struct__PACKET__OID__DATA.html | 107 - .../docs/html/struct__PACKET__RESERVED.html | 147 - .../html/struct____CPU__Private__Data.html | 257 -- .../docs/html/structactive__pars.html | 94 - .../docs/html/structactivehosts.html | 102 - .../docs/html/structbinary__stream.html | 129 - .../docs/html/structdaemon__slpars.html | 126 - .../docs/html/structpacket__file__header.html | 187 -- .../docs/html/structpcap__addr.html | 148 - .../docs/html/structpcap__file__header.html | 192 -- .../docs/html/structpcap__if.html | 148 - .../docs/html/structpcap__pkthdr.html | 111 - .../docs/html/structpcap__rmtauth.html | 115 - .../docs/html/structpcap__samp.html | 89 - .../docs/html/structpcap__send__queue.html | 107 - .../docs/html/structpcap__stat.html | 130 - .../docs/html/structrpcap__auth.html | 129 - .../docs/html/structrpcap__filter.html | 110 - .../html/structrpcap__filterbpf__insn.html | 129 - .../html/structrpcap__findalldevs__if.html | 148 - .../structrpcap__findalldevs__ifaddr.html | 129 - .../docs/html/structrpcap__header.html | 129 - .../docs/html/structrpcap__openreply.html | 92 - .../docs/html/structrpcap__pkthdr.html | 149 - .../docs/html/structrpcap__sampling.html | 129 - .../docs/html/structrpcap__startcapreply.html | 110 - .../docs/html/structrpcap__startcapreq.html | 129 - .../docs/html/structrpcap__stats.html | 129 - .../docs/html/structsf__pkthdr.html | 108 - ledset/WpdPack_4_1_2/docs/html/style.css | 360 -- ledset/WpdPack_4_1_2/docs/html/tab_b.gif | Bin 35 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/tab_l.gif | Bin 706 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/tab_r.gif | Bin 2585 -> 0 bytes ledset/WpdPack_4_1_2/docs/html/tabs.css | 105 - ledset/WpdPack_4_1_2/docs/html/tree.html | 175 - ledset/WpdPack_4_1_2/docs/html/utils_8h.html | 74 - .../docs/html/utils_8h_source.html | 77 - .../WpdPack_4_1_2/docs/html/win32-svc_8h.html | 59 - .../docs/html/win32-svc_8h_source.html | 65 - ledset/WpdPack_4_1_2/docs/html/winpcap.gif | Bin 10723 -> 0 bytes .../WpdPack_4_1_2/docs/html/winpcap_small.gif | Bin 2160 -> 0 bytes .../docs/html/wpcap__remote_8htm.html | 180 - .../docs/html/wpcap__remote_8htm_source.html | 382 --- .../docs/html/wpcap__tut1_8txt.html | 36 - .../docs/html/wpcap__tut2_8txt.html | 36 - .../docs/html/wpcap__tut3_8txt.html | 36 - .../docs/html/wpcap__tut4_8txt.html | 36 - .../docs/html/wpcap__tut5_8txt.html | 36 - .../docs/html/wpcap__tut6_8txt.html | 36 - .../docs/html/wpcap__tut7_8txt.html | 36 - .../docs/html/wpcap__tut8_8txt.html | 36 - .../docs/html/wpcap__tut9_8txt.html | 36 - .../docs/html/wpcap__tut_8txt.html | 36 - ledset/expertsmartpointsetwin.cpp | 643 ++-- ledset/expertsmartpointsetwin.h | 4 +- ledset/globalfunc.cpp | 1 - ledset/globalfunc.h | 17 +- ledset/gutil/qgui.cpp | 6 +- ledset/gutil/qgui.h | 34 +- ledset/ledset.pro | 26 +- ledset/main.cpp | 5 - ledset/mainwin.cpp | 15 +- ledset/npcap-sdk-1.13/Include/Packet32.h | 448 +++ .../Include/pcap-bpf.h | 4 +- .../Include/pcap-namedb.h | 2 - .../Include/pcap.h | 2 - .../Include/pcap/bluetooth.h | 26 +- ledset/npcap-sdk-1.13/Include/pcap/bpf.h | 298 ++ .../Include/pcap/can_socketcan.h | 61 + .../Include/pcap/compiler-tests.h | 189 ++ ledset/npcap-sdk-1.13/Include/pcap/dlt.h | 1586 +++++++++ .../npcap-sdk-1.13/Include/pcap/funcattrs.h | 341 ++ ledset/npcap-sdk-1.13/Include/pcap/ipnet.h | 43 + .../Include/pcap/namedb.h | 37 +- ledset/npcap-sdk-1.13/Include/pcap/nflog.h | 94 + .../Include/pcap/pcap-inttypes.h | 101 + ledset/npcap-sdk-1.13/Include/pcap/pcap.h | 1220 +++++++ .../Include/pcap/sll.h | 50 +- ledset/npcap-sdk-1.13/Include/pcap/socket.h | 84 + .../Include/pcap/usb.h | 97 +- .../Include/pcap/vlan.h | 8 +- ledset/npcap-sdk-1.13/Lib/ARM64/Packet.lib | Bin 0 -> 9708 bytes ledset/npcap-sdk-1.13/Lib/ARM64/wpcap.lib | Bin 0 -> 26362 bytes ledset/npcap-sdk-1.13/Lib/Packet.lib | Bin 0 -> 9898 bytes ledset/npcap-sdk-1.13/Lib/wpcap.lib | Bin 0 -> 26940 bytes ledset/npcap-sdk-1.13/Lib/x64/Packet.lib | Bin 0 -> 9708 bytes ledset/npcap-sdk-1.13/Lib/x64/wpcap.lib | Bin 0 -> 26362 bytes ledset/npcap-sdk-1.13/Npcap_Guide.html | 16 + ledset/pcaprethread.cpp | 56 +- ledset/pcaprethread.h | 31 +- ledset/videowin.cpp | 1 - ledset/videowin.h | 1 - ledset/waitingdlg.cpp | 100 + ledset/waitingdlg.h | 49 + 348 files changed, 5228 insertions(+), 56302 deletions(-) delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/MakeaAll.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/MakeaAll.sln delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/udpdump.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/iflist/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/savedump/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/sendpack/GNUmakefile delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/MakeAll.sln delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/MakeaAll.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/readme.txt delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/UDPdump/udpdump.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/MakeAll.sln delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/MakeaAll.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.cpp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/sendcap/sencap.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.c delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsp delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsw delete mode 100644 ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.vcproj delete mode 100644 ledset/WpdPack_4_1_2/Include/Packet32.h delete mode 100644 ledset/WpdPack_4_1_2/Include/Win32-Extensions.h delete mode 100644 ledset/WpdPack_4_1_2/Include/bittypes.h delete mode 100644 ledset/WpdPack_4_1_2/Include/ip6_misc.h delete mode 100644 ledset/WpdPack_4_1_2/Include/pcap-stdinc.h delete mode 100644 ledset/WpdPack_4_1_2/Include/pcap/bpf.h delete mode 100644 ledset/WpdPack_4_1_2/Include/pcap/pcap.h delete mode 100644 ledset/WpdPack_4_1_2/Include/remote-ext.h delete mode 100644 ledset/WpdPack_4_1_2/Lib/Packet.lib delete mode 100644 ledset/WpdPack_4_1_2/Lib/wpcap.lib delete mode 100644 ledset/WpdPack_4_1_2/Lib/x64/Packet.lib delete mode 100644 ledset/WpdPack_4_1_2/Lib/x64/wpcap.lib delete mode 100644 ledset/WpdPack_4_1_2/docs/WinPcap_docs.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/Packet_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/Packet_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/Win32-Extensions_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/Win32-Extensions_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/annotated.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/classes.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/daemon_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/daemon_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/deprecated.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/doxygen.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/doxygen__groups_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/dump.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/encoding.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/fileconf_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/fileconf_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/files.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2blank.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2doc.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2folderclosed.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2folderopen.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2lastnode.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2link.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2mlastnode.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2mnode.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2node.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2plastnode.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2pnode.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ftv2vertline.png delete mode 100644 ledset/WpdPack_4_1_2/docs/html/funcs_2pcap_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/funcs_2pcap_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/functions.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/functions_vars.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x62.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x63.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x64.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x65.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x66.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x67.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x68.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x69.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x6a.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x6b.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x6d.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x6e.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x6f.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x70.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x72.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x73.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x74.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_0x75.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_defs.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_enum.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_eval.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_func.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_type.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/globals_vars.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__NPF.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__NPF__code.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__NPF__include.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__NPF__ioctl.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__NPF__jitter.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__compilation.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__internals.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__language.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__packetapi.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remote.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remote__auth__methods.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remote__open__flags.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remote__pri__func.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remote__pri__struct.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remote__samp__methods.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remote__source__ID.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remote__source__string.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remote__struct.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__remotefunc.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__def.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut1.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut2.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut3.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut4.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut5.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut6.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut7.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut8.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut9.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcapfunc.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/group__wpcapsamps.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/incs_2pcap_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/incs_2pcap_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/index.hhc delete mode 100644 ledset/WpdPack_4_1_2/docs/html/index.hhk delete mode 100644 ledset/WpdPack_4_1_2/docs/html/index.hhp delete mode 100644 ledset/WpdPack_4_1_2/docs/html/index.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/internals-arch.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ioctls_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/ioctls_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/jitter_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/jitter_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/main.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/main_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/modules.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/npf-dump.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/npf-ndis.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/npf-npf.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/pages.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/pcap-remote_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/pcap-remote_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/remote-ext_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/remote-ext_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/rpcapd_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/rpcapd_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/stats.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/stats_wpcap.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structJIT__BPF__Filter.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structPacketHeader.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/struct__DEVICE__EXTENSION.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/struct__INTERNAL__REQUEST.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/struct__OPEN__INSTANCE.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/struct__PACKET__OID__DATA.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/struct__PACKET__RESERVED.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/struct____CPU__Private__Data.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structactive__pars.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structactivehosts.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structbinary__stream.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structdaemon__slpars.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structpacket__file__header.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structpcap__addr.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structpcap__file__header.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structpcap__if.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structpcap__pkthdr.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structpcap__rmtauth.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structpcap__samp.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structpcap__send__queue.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structpcap__stat.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__auth.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__filter.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__filterbpf__insn.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__findalldevs__if.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__findalldevs__ifaddr.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__header.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__openreply.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__pkthdr.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__sampling.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__startcapreply.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__startcapreq.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structrpcap__stats.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/structsf__pkthdr.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/style.css delete mode 100644 ledset/WpdPack_4_1_2/docs/html/tab_b.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/tab_l.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/tab_r.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/tabs.css delete mode 100644 ledset/WpdPack_4_1_2/docs/html/tree.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/utils_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/utils_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/win32-svc_8h.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/win32-svc_8h_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/winpcap.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/winpcap_small.gif delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__remote_8htm.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__remote_8htm_source.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut1_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut2_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut3_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut4_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut5_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut6_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut7_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut8_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut9_8txt.html delete mode 100644 ledset/WpdPack_4_1_2/docs/html/wpcap__tut_8txt.html create mode 100644 ledset/npcap-sdk-1.13/Include/Packet32.h rename ledset/{WpdPack_4_1_2 => npcap-sdk-1.13}/Include/pcap-bpf.h (95%) rename ledset/{WpdPack_4_1_2 => npcap-sdk-1.13}/Include/pcap-namedb.h (95%) rename ledset/{WpdPack_4_1_2 => npcap-sdk-1.13}/Include/pcap.h (95%) rename ledset/{WpdPack_4_1_2 => npcap-sdk-1.13}/Include/pcap/bluetooth.h (78%) create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/bpf.h create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/can_socketcan.h create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/compiler-tests.h create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/dlt.h create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/funcattrs.h create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/ipnet.h rename ledset/{WpdPack_4_1_2 => npcap-sdk-1.13}/Include/pcap/namedb.h (74%) create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/nflog.h create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/pcap-inttypes.h create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/pcap.h rename ledset/{WpdPack_4_1_2 => npcap-sdk-1.13}/Include/pcap/sll.h (74%) create mode 100644 ledset/npcap-sdk-1.13/Include/pcap/socket.h rename ledset/{WpdPack_4_1_2 => npcap-sdk-1.13}/Include/pcap/usb.h (51%) rename ledset/{WpdPack_4_1_2 => npcap-sdk-1.13}/Include/pcap/vlan.h (91%) create mode 100644 ledset/npcap-sdk-1.13/Lib/ARM64/Packet.lib create mode 100644 ledset/npcap-sdk-1.13/Lib/ARM64/wpcap.lib create mode 100644 ledset/npcap-sdk-1.13/Lib/Packet.lib create mode 100644 ledset/npcap-sdk-1.13/Lib/wpcap.lib create mode 100644 ledset/npcap-sdk-1.13/Lib/x64/Packet.lib create mode 100644 ledset/npcap-sdk-1.13/Lib/x64/wpcap.lib create mode 100644 ledset/npcap-sdk-1.13/Npcap_Guide.html create mode 100644 ledset/waitingdlg.cpp create mode 100644 ledset/waitingdlg.h diff --git a/LedOK/main.cpp b/LedOK/main.cpp index 26502ac..506c14d 100644 --- a/LedOK/main.cpp +++ b/LedOK/main.cpp @@ -1,4 +1,4 @@ -#include "mainwindow.h" +#include "mainwindow.h" #include #include #include @@ -8,9 +8,6 @@ #ifdef _MSC_VER //MSVC编译器 #include #include -#if _MSC_VER >= 1600 - #pragma execution_character_set("utf-8") -#endif LONG WINAPI handleException(_EXCEPTION_POINTERS *excep) { auto errCode = QString::number(excep->ExceptionRecord->ExceptionCode, 16); auto errAddr = QString::number((uint)excep->ExceptionRecord->ExceptionAddress, 16); diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/GNUmakefile deleted file mode 100644 index 9bf8252..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -# Makefile for cygwin gcc -# Nate Lawson - -SUBDIRS = basic_dump basic_dump_ex iflist pcap_filter pktdump_ex readfile readfile_ex savedump sendpack UDPdump - -all clean install uninstall: ${SUBDIRS} - for subdir in ${SUBDIRS}; do \ - echo "Entering $$subdir"; \ - (cd $$subdir && ${MAKE} $@) \ - done; diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/MakeaAll.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/MakeaAll.dsw deleted file mode 100644 index 3a595ac..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/MakeaAll.dsw +++ /dev/null @@ -1,137 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "UDPdump"=.\UDPdump\UDPdump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump"=.\basic_dump\basic_dump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump_ex"=.\basic_dump_ex\basic_dump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "iflist"=.\iflist\iflist.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "pcap_filter"=.\pcap_filter\pcap_filter.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "pktdump_ex"=.\pktdump_ex\pktdump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile"=.\readfile\readfile.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile_ex"=.\readfile_ex\readfile_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "savedump"=.\savedump\savedump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "sendpack"=.\sendpack\sendpack.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/MakeaAll.sln b/ledset/WpdPack_4_1_2/Examples-pcap/MakeaAll.sln deleted file mode 100644 index 9bef01e..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/MakeaAll.sln +++ /dev/null @@ -1,116 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UDPdump", "UDPdump\UDPdump.vcproj", "{B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "basic_dump\basic_dump.vcproj", "{80E57A40-2069-4261-8470-A56A94EA4D48}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "basic_dump_ex\basic_dump_ex.vcproj", "{6C124B8E-5310-4294-9148-0D62AF96A649}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iflist", "iflist\iflist.vcproj", "{AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_filter", "pcap_filter\pcap_filter.vcproj", "{1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pktdump_ex", "pktdump_ex\pktdump_ex.vcproj", "{E501F12B-2CAD-4B65-BFB9-E012553BE0A2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "readfile\readfile.vcproj", "{D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "readfile_ex\readfile_ex.vcproj", "{C34F10C8-A733-4D64-B1AF-2AAA53FA6506}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "savedump\savedump.vcproj", "{FC4AF1CF-72A5-4862-9F38-5063A588B2A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "sendpack\sendpack.vcproj", "{58E5469B-4C43-43C5-9E63-86D92D870D19}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|Win32.ActiveCfg = Debug|Win32 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|Win32.Build.0 = Debug|Win32 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|x64.ActiveCfg = Debug|x64 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|x64.Build.0 = Debug|x64 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|Win32.ActiveCfg = Release|Win32 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|Win32.Build.0 = Release|Win32 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|x64.ActiveCfg = Release|x64 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|x64.Build.0 = Release|x64 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|Win32.ActiveCfg = Debug|Win32 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|Win32.Build.0 = Debug|Win32 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|x64.ActiveCfg = Debug|x64 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|x64.Build.0 = Debug|x64 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|Win32.ActiveCfg = Release|Win32 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|Win32.Build.0 = Release|Win32 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|x64.ActiveCfg = Release|x64 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|x64.Build.0 = Release|x64 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|Win32.ActiveCfg = Debug|Win32 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|Win32.Build.0 = Debug|Win32 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|x64.ActiveCfg = Debug|x64 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|x64.Build.0 = Debug|x64 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|Win32.ActiveCfg = Release|Win32 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|Win32.Build.0 = Release|Win32 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|x64.ActiveCfg = Release|x64 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|x64.Build.0 = Release|x64 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|Win32.Build.0 = Debug|Win32 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|x64.ActiveCfg = Debug|x64 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|x64.Build.0 = Debug|x64 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|Win32.ActiveCfg = Release|Win32 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|Win32.Build.0 = Release|Win32 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|x64.ActiveCfg = Release|x64 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|x64.Build.0 = Release|x64 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|Win32.ActiveCfg = Debug|Win32 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|Win32.Build.0 = Debug|Win32 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|x64.ActiveCfg = Debug|x64 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|x64.Build.0 = Debug|x64 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|Win32.ActiveCfg = Release|Win32 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|Win32.Build.0 = Release|Win32 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|x64.ActiveCfg = Release|x64 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|x64.Build.0 = Release|x64 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|Win32.Build.0 = Debug|Win32 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|x64.ActiveCfg = Debug|x64 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|x64.Build.0 = Debug|x64 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|Win32.ActiveCfg = Release|Win32 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|Win32.Build.0 = Release|Win32 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|x64.ActiveCfg = Release|x64 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|x64.Build.0 = Release|x64 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|Win32.ActiveCfg = Debug|Win32 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|Win32.Build.0 = Debug|Win32 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|x64.ActiveCfg = Debug|x64 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|x64.Build.0 = Debug|x64 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|Win32.ActiveCfg = Release|Win32 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|Win32.Build.0 = Release|Win32 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|x64.ActiveCfg = Release|x64 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|x64.Build.0 = Release|x64 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|Win32.ActiveCfg = Debug|Win32 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|Win32.Build.0 = Debug|Win32 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|x64.ActiveCfg = Debug|x64 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|x64.Build.0 = Debug|x64 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|Win32.ActiveCfg = Release|Win32 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|Win32.Build.0 = Release|Win32 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|x64.ActiveCfg = Release|x64 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|x64.Build.0 = Release|x64 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|Win32.Build.0 = Debug|Win32 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|x64.ActiveCfg = Debug|x64 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|x64.Build.0 = Debug|x64 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|Win32.ActiveCfg = Release|Win32 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|Win32.Build.0 = Release|Win32 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|x64.ActiveCfg = Release|x64 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|x64.Build.0 = Release|x64 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|Win32.ActiveCfg = Debug|Win32 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|Win32.Build.0 = Debug|Win32 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|x64.ActiveCfg = Debug|x64 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|x64.Build.0 = Debug|x64 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|Win32.ActiveCfg = Release|Win32 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|Win32.Build.0 = Release|Win32 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|x64.ActiveCfg = Release|x64 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/GNUmakefile deleted file mode 100644 index d9e75f0..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for cygwin gcc -# Loris Degioanni - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = udpdump.o -LIBS = -L ${PCAP_PATH} -lwpcap -lwsock32 - -all: ${OBJS} - ${CC} ${CFLAGS} -o udpdump.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} udpdump.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsp deleted file mode 100644 index b955312..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="UDPdump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=UDPdump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "UDPdump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "UDPdump.mak" CFG="UDPdump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "UDPdump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "UDPdump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "UDPdump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "UDPdump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "UDPdump - Win32 Release" -# Name "UDPdump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\udpdump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsw deleted file mode 100644 index 8981cf4..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "UDPdump"=.\UDPdump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.vcproj deleted file mode 100644 index ae73936..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/udpdump.c b/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/udpdump.c deleted file mode 100644 index e627add..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/UDPdump/udpdump.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -/* 4 bytes IP address */ -typedef struct ip_address -{ - u_char byte1; - u_char byte2; - u_char byte3; - u_char byte4; -}ip_address; - -/* IPv4 header */ -typedef struct ip_header -{ - u_char ver_ihl; // Version (4 bits) + Internet header length (4 bits) - u_char tos; // Type of service - u_short tlen; // Total length - u_short identification; // Identification - u_short flags_fo; // Flags (3 bits) + Fragment offset (13 bits) - u_char ttl; // Time to live - u_char proto; // Protocol - u_short crc; // Header checksum - ip_address saddr; // Source address - ip_address daddr; // Destination address - u_int op_pad; // Option + Padding -}ip_header; - -/* UDP header*/ -typedef struct udp_header -{ - u_short sport; // Source port - u_short dport; // Destination port - u_short len; // Datagram length - u_short crc; // Checksum -}udp_header; - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum; - int i=0; - pcap_t *adhandle; - char errbuf[PCAP_ERRBUF_SIZE]; - u_int netmask; - char packet_filter[] = "ip and udp"; - struct bpf_program fcode; - - /* Retrieve the device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - /* Check if the user specified a valid adapter */ - if(inum < 1 || inum > i) - { - printf("\nAdapter number out of range.\n"); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the adapter */ - if ((adhandle= pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Check the link layer. We support only Ethernet for simplicity. */ - if(pcap_datalink(adhandle) != DLT_EN10MB) - { - fprintf(stderr,"\nThis program works only on Ethernet networks.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(d->addresses != NULL) - /* Retrieve the mask of the first address of the interface */ - netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; - else - /* If the interface is without addresses we suppose to be in a C class network */ - netmask=0xffffff; - - - //compile the filter - if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - //set the filter - if (pcap_setfilter(adhandle, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, NULL); - - return 0; -} - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct tm *ltime; - char timestr[16]; - ip_header *ih; - udp_header *uh; - u_int ip_len; - u_short sport,dport; - time_t local_tv_sec; - - /* - * unused parameter - */ - (VOID)(param); - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - ltime=localtime(&local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", ltime); - - /* print timestamp and length of the packet */ - printf("%s.%.6d len:%d ", timestr, header->ts.tv_usec, header->len); - - /* retireve the position of the ip header */ - ih = (ip_header *) (pkt_data + - 14); //length of ethernet header - - /* retireve the position of the udp header */ - ip_len = (ih->ver_ihl & 0xf) * 4; - uh = (udp_header *) ((u_char*)ih + ip_len); - - /* convert from network byte order to host byte order */ - sport = ntohs( uh->sport ); - dport = ntohs( uh->dport ); - - /* print ip addresses and udp ports */ - printf("%d.%d.%d.%d.%d -> %d.%d.%d.%d.%d\n", - ih->saddr.byte1, - ih->saddr.byte2, - ih->saddr.byte3, - ih->saddr.byte4, - sport, - ih->daddr.byte1, - ih->daddr.byte2, - ih->daddr.byte3, - ih->daddr.byte4, - dport); -} diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/GNUmakefile deleted file mode 100644 index 11951f4..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = basic_dump.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o basic_dump.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} basic_dump.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.c b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.c deleted file mode 100644 index 2980fd2..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.c +++ /dev/null @@ -1,109 +0,0 @@ -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum; - int i=0; - pcap_t *adhandle; - char errbuf[PCAP_ERRBUF_SIZE]; - - /* Retrieve the device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - /* Open the adapter */ - if ((adhandle= pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, NULL); - - pcap_close(adhandle); - return 0; -} - - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct tm *ltime; - char timestr[16]; - time_t local_tv_sec; - - /* - * unused parameters - */ - (VOID)(param); - (VOID)(pkt_data); - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - ltime=localtime(&local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", ltime); - - printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); - -} diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsp deleted file mode 100644 index 7e74aaa..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="basic_dump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=basic_dump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "basic_dump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "basic_dump.mak" CFG="basic_dump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "basic_dump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "basic_dump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "basic_dump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "basic_dump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "basic_dump - Win32 Release" -# Name "basic_dump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\basic_dump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsw deleted file mode 100644 index 3494209..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "basic_dump"=.\basic_dump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.vcproj deleted file mode 100644 index 6a3fe3d..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/GNUmakefile deleted file mode 100644 index aeeeea6..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = basic_dump_ex.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o basic_dump_ex.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} basic_dump_ex.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.c b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.c deleted file mode 100644 index d4e6117..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.c +++ /dev/null @@ -1,106 +0,0 @@ -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum; - int i=0; - pcap_t *adhandle; - int res; - char errbuf[PCAP_ERRBUF_SIZE]; - struct tm *ltime; - char timestr[16]; - struct pcap_pkthdr *header; - const u_char *pkt_data; - time_t local_tv_sec; - - - /* Retrieve the device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - return -1; - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the adapter */ - if ((adhandle= pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* Retrieve the packets */ - while((res = pcap_next_ex( adhandle, &header, &pkt_data)) >= 0){ - - if(res == 0) - /* Timeout elapsed */ - continue; - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - ltime=localtime(&local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", ltime); - - printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); - } - - if(res == -1){ - printf("Error reading the packets: %s\n", pcap_geterr(adhandle)); - return -1; - } - - pcap_close(adhandle); - return 0; -} diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp deleted file mode 100644 index 0405d29..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="basic_dump_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=basic_dump_ex - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "basic_dump_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "basic_dump_ex.mak" CFG="basic_dump_ex - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "basic_dump_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "basic_dump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "basic_dump_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "basic_dump_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "basic_dump_ex - Win32 Release" -# Name "basic_dump_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\basic_dump_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw deleted file mode 100644 index ff590dd..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "basic_dump_ex"=.\basic_dump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj deleted file mode 100644 index a8f42f2..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/iflist/GNUmakefile deleted file mode 100644 index 01766bd..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = iflist.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o iflist.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} iflist.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.c b/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.c deleted file mode 100644 index d462afb..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -#ifndef WIN32 - #include - #include -#else - #include -#endif - - -// Function prototypes -void ifprint(pcap_if_t *d); -char *iptos(u_long in); -char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen); - - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - char errbuf[PCAP_ERRBUF_SIZE+1]; - - /* Retrieve the device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Scan the list printing every entry */ - for(d=alldevs;d;d=d->next) - { - ifprint(d); - } - - /* Free the device list */ - pcap_freealldevs(alldevs); - - return 1; -} - - - -/* Print all the available information on the given interface */ -void ifprint(pcap_if_t *d) -{ - pcap_addr_t *a; - char ip6str[128]; - - /* Name */ - printf("%s\n",d->name); - - /* Description */ - if (d->description) - printf("\tDescription: %s\n",d->description); - - /* Loopback Address*/ - printf("\tLoopback: %s\n",(d->flags & PCAP_IF_LOOPBACK)?"yes":"no"); - - /* IP addresses */ - for(a=d->addresses;a;a=a->next) { - printf("\tAddress Family: #%d\n",a->addr->sa_family); - - switch(a->addr->sa_family) - { - case AF_INET: - printf("\tAddress Family Name: AF_INET\n"); - if (a->addr) - printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr)); - if (a->netmask) - printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr)); - if (a->broadaddr) - printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr)); - if (a->dstaddr) - printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr)); - break; - - case AF_INET6: - printf("\tAddress Family Name: AF_INET6\n"); -#ifndef __MINGW32__ /* Cygnus doesn't have IPv6 */ - if (a->addr) - printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str))); -#endif - break; - - default: - printf("\tAddress Family Name: Unknown\n"); - break; - } - } - printf("\n"); -} - -/* From tcptraceroute, convert a numeric IP address to a string */ -#define IPTOSBUFFERS 12 -char *iptos(u_long in) -{ - static char output[IPTOSBUFFERS][3*4+3+1]; - static short which; - u_char *p; - - p = (u_char *)∈ - which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); - sprintf(output[which], "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); - return output[which]; -} - -#ifndef __MINGW32__ /* Cygnus doesn't have IPv6 */ -char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen) -{ - socklen_t sockaddrlen; - - #ifdef WIN32 - sockaddrlen = sizeof(struct sockaddr_in6); - #else - sockaddrlen = sizeof(struct sockaddr_storage); - #endif - - - if(getnameinfo(sockaddr, - sockaddrlen, - address, - addrlen, - NULL, - 0, - NI_NUMERICHOST) != 0) address = NULL; - - return address; -} -#endif /* __MINGW32__ */ - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsp deleted file mode 100644 index 4182364..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="iflist" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=iflist - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "iflist.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "iflist.mak" CFG="iflist - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "iflist - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "iflist - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "iflist - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "iflist - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "iflist - Win32 Release" -# Name "iflist - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\iflist.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsw deleted file mode 100644 index 1425db2..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "iflist"=.\iflist.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.vcproj deleted file mode 100644 index 709a804..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/iflist/iflist.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/GNUmakefile deleted file mode 100644 index 2252393..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = pcap_filter.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o pf.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} pf.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.c b/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.c deleted file mode 100644 index d2f6e36..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include - -#include - -#define MAX_PRINT 80 -#define MAX_LINE 16 - - -void usage(); - - -int main(int argc, char **argv) -{ - pcap_t *fp; - char errbuf[PCAP_ERRBUF_SIZE]; - char *source = NULL; - char *ofilename = NULL; - char *filter = NULL; - int i; - pcap_dumper_t *dumpfile; - struct bpf_program fcode; - bpf_u_int32 NetMask; - int res; - struct pcap_pkthdr *header; - const u_char *pkt_data; - - if (argc == 1) - { - usage(); - return -1; - } - - /* Parse parameters */ - for(i=1;i < argc; i+= 2) - { - switch (argv[i] [1]) - { - case 's': - { - source=argv[i+1]; - }; - break; - - case 'o': - { - ofilename=argv[i+1]; - }; - break; - - case 'f': - { - filter=argv[i+1]; - }; - break; - } - } - - // open a capture from the network - if (source != NULL) - { - if ((fp = pcap_open_live(source, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter.\n"); - return -2; - } - } - else usage(); - - if (filter != NULL) - { - // We should loop through the adapters returned by the pcap_findalldevs_ex() - // in order to locate the correct one. - // - // Let's do things simpler: we suppose to be in a C class network ;-) - NetMask=0xffffff; - - //compile the filter - if(pcap_compile(fp, &fcode, filter, 1, NetMask) < 0) - { - fprintf(stderr,"\nError compiling filter: wrong syntax.\n"); - - pcap_close(fp); - return -3; - } - - //set the filter - if(pcap_setfilter(fp, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter\n"); - - pcap_close(fp); - return -4; - } - - } - - //open the dump file - if (ofilename != NULL) - { - dumpfile= pcap_dump_open(fp, ofilename); - - if (dumpfile == NULL) - { - fprintf(stderr,"\nError opening output file\n"); - - pcap_close(fp); - return -5; - } - } - else usage(); - - //start the capture - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - - if(res == 0) - /* Timeout elapsed */ - continue; - - //save the packet on the dump file - pcap_dump((unsigned char *) dumpfile, header, pkt_data); - - } - - pcap_close(fp); - pcap_dump_close(dumpfile); - - return 0; -} - - -void usage() -{ - - printf("\npf - Generic Packet Filter.\n"); - printf("\nUsage:\npf -s source -o output_file_name [-f filter_string]\n\n"); - exit(0); -} diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsp deleted file mode 100644 index c01d2e7..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pcap_filter" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pcap_filter - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pcap_filter.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pcap_filter.mak" CFG="pcap_filter - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pcap_filter - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pcap_filter - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pcap_filter - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 /out:"Release/pf.exe" - -!ELSEIF "$(CFG)" == "pcap_filter - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/pf.exe" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "pcap_filter - Win32 Release" -# Name "pcap_filter - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\pcap_filter.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsw deleted file mode 100644 index 1d39119..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "pcap_filter"=.\pcap_filter.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.vcproj deleted file mode 100644 index e6fe721..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/GNUmakefile deleted file mode 100644 index db276c5..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = pktdump_ex.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o pktdump_ex.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} pktdump_ex.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.c b/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.c deleted file mode 100644 index 383eaa9..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include -#include - -#include - -#define LINE_LEN 16 - - -int main(int argc, char **argv) -{ - pcap_if_t *alldevs, *d; - pcap_t *fp; - u_int inum, i=0; - char errbuf[PCAP_ERRBUF_SIZE]; - int res; - struct pcap_pkthdr *header; - const u_char *pkt_data; - - printf("pktdump_ex: prints the packets of the network using WinPcap.\n"); - printf(" Usage: pktdump_ex [-s source]\n\n" - " Examples:\n" - " pktdump_ex -s file.acp\n" - " pktdump_ex -s \\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n"); - - if(argc < 3) - { - printf("\nNo adapter selected: printing the device list:\n"); - /* The user didn't provide a packet source: Retrieve the local device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s\n ", ++i, d->name); - - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if (i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - if (inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for (d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the adapter */ - if ((fp = pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nError opening adapter\n"); - return -1; - } - } - else - { - /* Do not check for the switch type ('-s') */ - if ((fp = pcap_open_live(argv[2], // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nError opening adapter\n"); - return -1; - } - } - - /* Read the packets */ - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - - if(res == 0) - /* Timeout elapsed */ - continue; - - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - } - - if(res == -1) - { - printf("Error reading the packets: %s\n", pcap_geterr(fp)); - return -1; - } - - pcap_close(fp); - return 0; -} diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsp deleted file mode 100644 index a9800e6..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pktdump_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pktdump_ex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pktdump_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pktdump_ex.mak" CFG="pktdump_ex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pktdump_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pktdump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pktdump_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "pktdump_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "pktdump_ex - Win32 Release" -# Name "pktdump_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\pktdump_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsw deleted file mode 100644 index ec24733..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "pktdump_ex"=.\pktdump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.vcproj deleted file mode 100644 index f477c04..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/readfile/GNUmakefile deleted file mode 100644 index 967bc18..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = readfile.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o readfile.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} readfile.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.c b/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.c deleted file mode 100644 index c62dc46..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.c +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include - -#define LINE_LEN 16 - -void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); - -int main(int argc, char **argv) -{ - pcap_t *fp; - char errbuf[PCAP_ERRBUF_SIZE]; - - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - - } - - /* Open the capture file */ - if ((fp = pcap_open_offline(argv[1], // name of the device - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", argv[1]); - return -1; - } - - /* read and dispatch packets until EOF is reached */ - pcap_loop(fp, 0, dispatcher_handler, NULL); - - pcap_close(fp); - return 0; -} - - - -void dispatcher_handler(u_char *temp1, - const struct pcap_pkthdr *header, - const u_char *pkt_data) -{ - u_int i=0; - - /* - * unused variable - */ - (VOID*)temp1; - - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - -} diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsp deleted file mode 100644 index 5d45bde..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="readfile" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=readfile - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "readfile.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "readfile.mak" CFG="readfile - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "readfile - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "readfile - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "readfile - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "readfile - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "readfile - Win32 Release" -# Name "readfile - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\readfile.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsw deleted file mode 100644 index 7565dbd..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "readfile"=.\readfile.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.vcproj deleted file mode 100644 index 20b30c3..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile/readfile.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/GNUmakefile deleted file mode 100644 index 3eaba96..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = readfile_ex.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o readfile_ex.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} readfile_ex.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.c b/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.c deleted file mode 100644 index 9b6e9ed..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include - -#define LINE_LEN 16 - -int main(int argc, char **argv) -{ - pcap_t *fp; - char errbuf[PCAP_ERRBUF_SIZE]; - struct pcap_pkthdr *header; - const u_char *pkt_data; - u_int i=0; - int res; - - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - - } - - /* Open the capture file */ - if ((fp = pcap_open_offline(argv[1], // name of the device - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", argv[1]); - return -1; - } - - /* Retrieve the packets from the file */ - while((res = pcap_next_ex(fp, &header, &pkt_data)) >= 0) - { - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - } - - - if (res == -1) - { - printf("Error reading the packets: %s\n", pcap_geterr(fp)); - } - - pcap_close(fp); - return 0; -} - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsp deleted file mode 100644 index 07dcf9f..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="readfile_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=readfile_ex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "readfile_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "readfile_ex.mak" CFG="readfile_ex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "readfile_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "readfile_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "readfile_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "readfile_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "readfile_ex - Win32 Release" -# Name "readfile_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\readfile_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsw deleted file mode 100644 index 8e4c306..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "readfile_ex"=.\readfile_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.vcproj deleted file mode 100644 index d7c16b4..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/savedump/GNUmakefile deleted file mode 100644 index 86bbaa0..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = savedump.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o savedump.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} savedump.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.c b/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.c deleted file mode 100644 index 17456a7..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.c +++ /dev/null @@ -1,111 +0,0 @@ -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int main(int argc, char **argv) -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum; - int i=0; - pcap_t *adhandle; - char errbuf[PCAP_ERRBUF_SIZE]; - pcap_dumper_t *dumpfile; - - - /* Check command line */ - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - } - - /* Retrieve the device list on the local machine */ - if (pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - - /* Open the adapter */ - if ((adhandle= pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Open the dump file */ - dumpfile = pcap_dump_open(adhandle, argv[1]); - - if(dumpfile==NULL) - { - fprintf(stderr,"\nError opening output file\n"); - return -1; - } - - printf("\nlistening on %s... Press Ctrl+C to stop...\n", d->description); - - /* At this point, we no longer need the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, (unsigned char *)dumpfile); - - pcap_close(adhandle); - return 0; -} - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *dumpfile, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - /* save the packet on the dump file */ - pcap_dump(dumpfile, header, pkt_data); -} diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsp deleted file mode 100644 index 22d5d39..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="savedump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=savedump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "savedump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "savedump.mak" CFG="savedump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "savedump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "savedump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "savedump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "savedump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "savedump - Win32 Release" -# Name "savedump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\savedump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsw deleted file mode 100644 index b0e9fc6..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "savedump"=.\savedump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.vcproj deleted file mode 100644 index 0087328..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/savedump/savedump.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/GNUmakefile b/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/GNUmakefile deleted file mode 100644 index 60fd211..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/GNUmakefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = sendpack.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o sendpack.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} sendpack.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.c b/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.c deleted file mode 100644 index 7c68c91..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.c +++ /dev/null @@ -1,68 +0,0 @@ -#include -#include - -#include - - -int main(int argc, char **argv) -{ - pcap_t *fp; - char errbuf[PCAP_ERRBUF_SIZE]; - u_char packet[100]; - int i; - - /* Check the validity of the command line */ - if (argc != 2) - { - printf("usage: %s interface", argv[0]); - return 1; - } - - /* Open the adapter */ - if ((fp = pcap_open_live(argv[1], // name of the device - 65536, // portion of the packet to capture. It doesn't matter in this case - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", argv[1]); - return 2; - } - - /* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */ - packet[0]=1; - packet[1]=1; - packet[2]=1; - packet[3]=1; - packet[4]=1; - packet[5]=1; - - /* set mac source to 2:2:2:2:2:2 */ - packet[6]=2; - packet[7]=2; - packet[8]=2; - packet[9]=2; - packet[10]=2; - packet[11]=2; - - /* Fill the rest of the packet */ - for(i=12;i<100;i++) - { - packet[i]= (u_char)i; - } - - /* Send down the packet */ - if (pcap_sendpacket(fp, // Adapter - packet, // buffer with the packet - 100 // size - ) != 0) - { - fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp)); - return 3; - } - - pcap_close(fp); - return 0; -} - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsp b/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsp deleted file mode 100644 index 95022e3..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sendpack" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sendpack - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "sendpack.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sendpack.mak" CFG="sendpack - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sendpack - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sendpack - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sendpack - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "sendpack - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "sendpack - Win32 Release" -# Name "sendpack - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\sendpack.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsw b/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsw deleted file mode 100644 index 1ccadc7..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "sendpack"=.\sendpack.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.vcproj b/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.vcproj deleted file mode 100644 index 6a6b1c2..0000000 --- a/ledset/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/MakeAll.sln b/ledset/WpdPack_4_1_2/Examples-remote/MakeAll.sln deleted file mode 100644 index f22bc47..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/MakeAll.sln +++ /dev/null @@ -1,196 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iflist", "iflist\iflist.vcproj", "{B0C740E1-73A3-43C7-B0CB-B715A4E691DD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "misc\basic_dump.vcproj", "{66297062-96A0-4F0E-B147-3C8384031232}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "misc\basic_dump_ex.vcproj", "{92849630-6B09-409C-A7AD-E91E682558B1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "misc\readfile.vcproj", "{161E7606-F4CD-4A04-AB6B-5837F7818EE1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "misc\readfile_ex.vcproj", "{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "misc\savedump.vcproj", "{1B8791CB-DD15-46BF-B0A2-879892085538}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "misc\sendpack.vcproj", "{1C376689-5F61-48E7-AE83-0DED9EE9E458}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_filter", "pcap_filter\pcap_filter.vcproj", "{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pktdump_ex", "pktdump_ex\pktdump_ex.vcproj", "{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendcap", "sendcap\sendcap.vcproj", "{C6712171-F9B8-4A1E-A774-5D93C9116CEE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smp_1", "smp_1\smp_1.vcproj", "{21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcptop", "tcptop\tcptop.vcproj", "{B671D5DF-3A80-4A21-BC01-79E3FB73D372}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UDPdump", "UDPdump\UDPdump.vcproj", "{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserBridge", "UserLevelBridge\UserBridge.vcproj", "{BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetMacAddress", "PacketDriver\GetMacAddress\GetMacAddress.vcproj", "{0E6A3C08-86E8-495B-976B-2666AB16501C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPacketCapture", "PacketDriver\TestPacketCapture\TestPacketCapture.vcproj", "{79942922-E02C-486D-9EE3-A13C0876C4C2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPacketSend", "PacketDriver\TestPacketSend\TestPacketSend.vcproj", "{1E3BED58-2F2C-463A-B9FD-9A55235C6840}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_fopen", "pcap_fopen\pcap_fopen.vcproj", "{DD317CB5-6337-498F-A560-553B5558E133}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|Win32.ActiveCfg = Debug|Win32 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|Win32.Build.0 = Debug|Win32 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|x64.ActiveCfg = Debug|x64 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|x64.Build.0 = Debug|x64 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|Win32.ActiveCfg = Release|Win32 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|Win32.Build.0 = Release|Win32 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|x64.ActiveCfg = Release|x64 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|x64.Build.0 = Release|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.ActiveCfg = Debug|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.Build.0 = Debug|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.ActiveCfg = Debug|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.Build.0 = Debug|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.ActiveCfg = Release|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.Build.0 = Release|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.ActiveCfg = Release|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.Build.0 = Release|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.ActiveCfg = Debug|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.Build.0 = Debug|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.ActiveCfg = Debug|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.Build.0 = Debug|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.ActiveCfg = Release|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.Build.0 = Release|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.ActiveCfg = Release|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.Build.0 = Release|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.ActiveCfg = Debug|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.Build.0 = Debug|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.ActiveCfg = Debug|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.Build.0 = Debug|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.ActiveCfg = Release|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.Build.0 = Release|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.ActiveCfg = Release|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.Build.0 = Release|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.ActiveCfg = Debug|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.Build.0 = Debug|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.ActiveCfg = Debug|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.Build.0 = Debug|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.ActiveCfg = Release|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.Build.0 = Release|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.ActiveCfg = Release|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.Build.0 = Release|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.ActiveCfg = Debug|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.Build.0 = Debug|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.ActiveCfg = Debug|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.Build.0 = Debug|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.ActiveCfg = Release|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.Build.0 = Release|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.ActiveCfg = Release|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.Build.0 = Release|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.ActiveCfg = Debug|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.Build.0 = Debug|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.ActiveCfg = Debug|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.Build.0 = Debug|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.ActiveCfg = Release|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.Build.0 = Release|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.ActiveCfg = Release|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.Build.0 = Release|x64 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|Win32.ActiveCfg = Debug|Win32 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|Win32.Build.0 = Debug|Win32 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x64.ActiveCfg = Debug|x64 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x64.Build.0 = Debug|x64 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|Win32.ActiveCfg = Release|Win32 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|Win32.Build.0 = Release|Win32 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x64.ActiveCfg = Release|x64 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x64.Build.0 = Release|x64 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|Win32.ActiveCfg = Debug|Win32 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|Win32.Build.0 = Debug|Win32 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x64.ActiveCfg = Debug|x64 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x64.Build.0 = Debug|x64 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|Win32.ActiveCfg = Release|Win32 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|Win32.Build.0 = Release|Win32 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x64.ActiveCfg = Release|x64 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x64.Build.0 = Release|x64 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|Win32.ActiveCfg = Debug|Win32 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|Win32.Build.0 = Debug|Win32 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|x64.ActiveCfg = Debug|x64 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|x64.Build.0 = Debug|x64 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|Win32.ActiveCfg = Release|Win32 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|Win32.Build.0 = Release|Win32 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|x64.ActiveCfg = Release|x64 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|x64.Build.0 = Release|x64 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|Win32.ActiveCfg = Debug|Win32 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|Win32.Build.0 = Debug|Win32 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|x64.ActiveCfg = Debug|x64 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|x64.Build.0 = Debug|x64 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|Win32.ActiveCfg = Release|Win32 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|Win32.Build.0 = Release|Win32 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|x64.ActiveCfg = Release|x64 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|x64.Build.0 = Release|x64 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|Win32.ActiveCfg = Debug|Win32 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|Win32.Build.0 = Debug|Win32 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|x64.ActiveCfg = Debug|x64 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|x64.Build.0 = Debug|x64 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|Win32.ActiveCfg = Release|Win32 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|Win32.Build.0 = Release|Win32 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|x64.ActiveCfg = Release|x64 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|x64.Build.0 = Release|x64 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|Win32.ActiveCfg = Debug|Win32 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|Win32.Build.0 = Debug|Win32 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x64.ActiveCfg = Debug|x64 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x64.Build.0 = Debug|x64 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|Win32.ActiveCfg = Release|Win32 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|Win32.Build.0 = Release|Win32 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x64.ActiveCfg = Release|x64 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x64.Build.0 = Release|x64 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|Win32.ActiveCfg = Debug|Win32 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|Win32.Build.0 = Debug|Win32 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|x64.ActiveCfg = Debug|x64 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|x64.Build.0 = Debug|x64 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|Win32.ActiveCfg = Release|Win32 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|Win32.Build.0 = Release|Win32 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|x64.ActiveCfg = Release|x64 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|x64.Build.0 = Release|x64 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|Win32.Build.0 = Debug|Win32 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|x64.ActiveCfg = Debug|x64 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|x64.Build.0 = Debug|x64 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|Win32.ActiveCfg = Release|Win32 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|Win32.Build.0 = Release|Win32 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|x64.ActiveCfg = Release|x64 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|x64.Build.0 = Release|x64 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|Win32.ActiveCfg = Debug|Win32 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|Win32.Build.0 = Debug|Win32 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|x64.ActiveCfg = Debug|x64 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|x64.Build.0 = Debug|x64 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|Win32.ActiveCfg = Release|Win32 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|Win32.Build.0 = Release|Win32 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|x64.ActiveCfg = Release|x64 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|x64.Build.0 = Release|x64 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|Win32.ActiveCfg = Debug|Win32 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|Win32.Build.0 = Debug|Win32 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|x64.ActiveCfg = Debug|x64 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|x64.Build.0 = Debug|x64 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|Win32.ActiveCfg = Release|Win32 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|Win32.Build.0 = Release|Win32 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|x64.ActiveCfg = Release|x64 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|x64.Build.0 = Release|x64 - {DD317CB5-6337-498F-A560-553B5558E133}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD317CB5-6337-498F-A560-553B5558E133}.Debug|Win32.Build.0 = Debug|Win32 - {DD317CB5-6337-498F-A560-553B5558E133}.Debug|x64.ActiveCfg = Debug|x64 - {DD317CB5-6337-498F-A560-553B5558E133}.Debug|x64.Build.0 = Debug|x64 - {DD317CB5-6337-498F-A560-553B5558E133}.Release|Win32.ActiveCfg = Release|Win32 - {DD317CB5-6337-498F-A560-553B5558E133}.Release|Win32.Build.0 = Release|Win32 - {DD317CB5-6337-498F-A560-553B5558E133}.Release|x64.ActiveCfg = Release|x64 - {DD317CB5-6337-498F-A560-553B5558E133}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ledset/WpdPack_4_1_2/Examples-remote/MakeaAll.dsw b/ledset/WpdPack_4_1_2/Examples-remote/MakeaAll.dsw deleted file mode 100644 index 3236b64..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/MakeaAll.dsw +++ /dev/null @@ -1,221 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "GetMacAddress"=".\PacketDriver\GetMacAddress\GetMacAddress.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "TestPacketCapture"=".\PacketDriver\TestPacketCapture\TestPacketCapture.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "TestPacketSend"=".\PacketDriver\TestPacketSend\TestPacketSend.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "UDPdump"=".\UDPdump\UDPdump.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "UserBridge"=".\UserLevelBridge\UserBridge.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump"=".\misc\basic_dump.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump_ex"=".\misc\basic_dump_ex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "iflist"=".\iflist\iflist.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "pcap_filter"=".\pcap_filter\pcap_filter.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "pktdump_ex"=".\pktdump_ex\pktdump_ex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile"=".\misc\readfile.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile_ex"=".\misc\readfile_ex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "savedump"=".\misc\savedump.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "sendcap"=".\sendcap\sendcap.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "sendpack"=".\misc\sendpack.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "smp_1"=".\smp_1\smp_1.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "tcptop"=".\tcptop\tcptop.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c b/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c deleted file mode 100644 index 014da74..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include "..\..\..\Include\packet32.h" -#include - -#define Max_Num_Adapter 10 -char AdapterList[Max_Num_Adapter][1024]; - -int main() -{ - LPADAPTER lpAdapter = 0; - int i; - DWORD dwErrorCode; - char AdapterName[8192]; - char *temp,*temp1; - int AdapterNum=0,Open; - ULONG AdapterLength; - PPACKET_OID_DATA OidData; - BOOLEAN Status; - - // - // Obtain the name of the adapters installed on this machine - // - - printf("Packet.dll test application. Library version:%s\n", PacketGetVersion()); - - printf("Adapters installed:\n"); - i=0; - - AdapterLength = sizeof(AdapterName); - - if(PacketGetAdapterNames(AdapterName,&AdapterLength)==FALSE){ - printf("Unable to retrieve the list of the adapters!\n"); - return -1; - } - temp=AdapterName; - temp1=AdapterName; - - while ((*temp!='\0')||(*(temp-1)!='\0')) - { - if (*temp=='\0') - { - memcpy(AdapterList[i],temp1,temp-temp1); - temp1=temp+1; - i++; - } - temp++; - } - - AdapterNum=i; - for (i=0;iAdapterNum) printf("\nThe number must be smaller than %d",AdapterNum); - } while (Open>AdapterNum); - - - // - // Open the selected adapter - // - - lpAdapter = PacketOpenAdapter(AdapterList[Open-1]); - - if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) - { - dwErrorCode=GetLastError(); - printf("Unable to open the adapter, Error Code : %lx\n",dwErrorCode); - - return -1; - } - - // - // Allocate a buffer to get the MAC adress - // - - OidData = malloc(6 + sizeof(PACKET_OID_DATA)); - if (OidData == NULL) - { - printf("error allocating memory!\n"); - PacketCloseAdapter(lpAdapter); - return -1; - } - - // - // Retrieve the adapter MAC querying the NIC driver - // - - OidData->Oid = OID_802_3_CURRENT_ADDRESS; - - OidData->Length = 6; - ZeroMemory(OidData->Data, 6); - - Status = PacketRequest(lpAdapter, FALSE, OidData); - if(Status) - { - printf("The MAC address of the adapter is %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", - (OidData->Data)[0], - (OidData->Data)[1], - (OidData->Data)[2], - (OidData->Data)[3], - (OidData->Data)[4], - (OidData->Data)[5]); - } - else - { - printf("error retrieving the MAC address of the adapter!\n"); - } - - free(OidData); - PacketCloseAdapter(lpAdapter); - return (0); -} - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp b/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp deleted file mode 100644 index d701290..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp +++ /dev/null @@ -1,105 +0,0 @@ -# Microsoft Developer Studio Project File - Name="GetMacAddress" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=GetMacAddress - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GetMacAddress.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GetMacAddress.mak" CFG="GetMacAddress - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GetMacAddress - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "GetMacAddress - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GetMacAddress - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "GetMacAddress - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "GetMacAddress - Win32 Release" -# Name "GetMacAddress - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\GetMacAddress.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\lib\Packet.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj deleted file mode 100644 index 4130c3f..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c b/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c deleted file mode 100644 index 4bc676d..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include - - -#include "..\..\..\Include\packet32.h" -#include - -#define Max_Num_Adapter 10 - -// Prototypes - -void PrintPackets(LPPACKET lpPacket); - -char AdapterList[Max_Num_Adapter][1024]; - -int main() -{ -//define a pointer to an ADAPTER structure - -LPADAPTER lpAdapter = 0; - -//define a pointer to a PACKET structure - -LPPACKET lpPacket; - -int i; -DWORD dwErrorCode; - -//ascii strings -char AdapterName[8192]; // string that contains a list of the network adapters -char *temp,*temp1; - - -int AdapterNum=0,Open; -ULONG AdapterLength; - -char buffer[256000]; // buffer to hold the data coming from the driver - -struct bpf_stat stat; - - // - // Obtain the name of the adapters installed on this machine - // - printf("Packet.dll test application. Library version:%s\n", PacketGetVersion()); - - printf("Adapters installed:\n"); - i=0; - - AdapterLength = sizeof(AdapterName); - - if(PacketGetAdapterNames(AdapterName,&AdapterLength)==FALSE){ - printf("Unable to retrieve the list of the adapters!\n"); - return -1; - } - temp=AdapterName; - temp1=AdapterName; - - while ((*temp!='\0')||(*(temp-1)!='\0')) - { - if (*temp=='\0') - { - memcpy(AdapterList[i],temp1,temp-temp1); - temp1=temp+1; - i++; - } - temp++; - } - - AdapterNum=i; - for (i=0;iAdapterNum) printf("\nThe number must be smaller than %d",AdapterNum); - } while (Open>AdapterNum); - - - - - lpAdapter = PacketOpenAdapter(AdapterList[Open-1]); - - if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) - { - dwErrorCode=GetLastError(); - printf("Unable to open the adapter, Error Code : %lx\n",dwErrorCode); - - return -1; - } - - // set the network adapter in promiscuous mode - - if(PacketSetHwFilter(lpAdapter,NDIS_PACKET_TYPE_PROMISCUOUS)==FALSE){ - printf("Warning: unable to set promiscuous mode!\n"); - } - - // set a 512K buffer in the driver - if(PacketSetBuff(lpAdapter,512000)==FALSE){ - printf("Unable to set the kernel buffer!\n"); - return -1; - } - - // set a 1 second read timeout - if(PacketSetReadTimeout(lpAdapter,1000)==FALSE){ - printf("Warning: unable to set the read tiemout!\n"); - } - - //allocate and initialize a packet structure that will be used to - //receive the packets. - if((lpPacket = PacketAllocatePacket())==NULL){ - printf("\nError: failed to allocate the LPPACKET structure."); - return (-1); - } - PacketInitPacket(lpPacket,(char*)buffer,256000); - - //main capture loop - while(!_kbhit()) - { - // capture the packets - if(PacketReceivePacket(lpAdapter,lpPacket,TRUE)==FALSE){ - printf("Error: PacketReceivePacket failed"); - return (-1); - } - - PrintPackets(lpPacket); - } - - - //print the capture statistics - if(PacketGetStats(lpAdapter,&stat)==FALSE){ - printf("Warning: unable to get stats from the kernel!\n"); - } - else - printf("\n\n%d packets received.\n%d Packets lost",stat.bs_recv,stat.bs_drop); - - PacketFreePacket(lpPacket); - - // close the adapter and exit - - PacketCloseAdapter(lpAdapter); - return (0); -} - -// this function prints the content of a block of packets received from the driver - -void PrintPackets(LPPACKET lpPacket) -{ - - ULONG i, j, ulLines, ulen, ulBytesReceived; - char *pChar, *pLine, *base; - char *buf; - u_int off=0; - u_int tlen,tlen1; - struct bpf_hdr *hdr; - - ulBytesReceived = lpPacket->ulBytesReceived; - - - buf = lpPacket->Buffer; - - off=0; - - while(offbh_datalen; - tlen=hdr->bh_caplen; - printf("Packet length, captured portion: %ld, %ld\n", tlen1, tlen); - off+=hdr->bh_hdrlen; - - ulLines = (tlen + 15) / 16; - - pChar =(char*)(buf+off); - base=pChar; - off=Packet_WORDALIGN(off+tlen); - - for ( i=0; i 16 ) ? 16 : ulen; - tlen -= ulen; - - for ( j=0; j -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=TestPacketCapture - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "TestPacketCapture.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "TestPacketCapture.mak" CFG="TestPacketCapture - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "TestPacketCapture - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "TestPacketCapture - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "TestPacketCapture - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "TestPacketCapture - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "TestPacketCapture - Win32 Release" -# Name "TestPacketCapture - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\TestPacketCapture.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\lib\Packet.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj deleted file mode 100644 index ab5783c..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c b/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c deleted file mode 100644 index b4a73bc..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include - -#include "..\..\..\Include\packet32.h" - - -#define Max_Num_Adapter 10 - -// Prototypes - -void PrintPackets(LPPACKET lpPacket); - -char AdapterList[Max_Num_Adapter][8192]; - - - -int main(int argc, char **argv) -{ -char packetbuff[5000]; - -// define a pointer to a ADAPTER structure - -LPADAPTER lpAdapter = 0; - -// define a pointer to a PACKET structure - -LPPACKET lpPacket; - -int i,npacks,Snaplen; -DWORD dwErrorCode; - -//ascii strings -char AdapterName[8192]; // string that contains a list of the network adapters -char *temp,*temp1; - -int AdapterNum=0,Open; -ULONG AdapterLength; - -float cpu_time; - - printf("Traffic Generator v 0.9999\nCopyright 1999 Loris Degioanni (loris@netgroup-serv.polito.it)"); - printf("\nSends a set of packets to the network using packet.dll API.\n"); - - if (argc == 1){ - printf("\n\n Usage: TestpacketSend [-i adapter] -n npacks -s size"); - printf("\n size is between 60 and 1514\n\n"); - return -1; - } - - - AdapterName[0]=0; - - //get the command line parameters - for(i=1;iAdapterNum) printf("\nThe number must be smaller than %d",AdapterNum); - } while (Open>AdapterNum); - - - - - lpAdapter = PacketOpenAdapter(AdapterList[Open-1]); - - if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) - { - dwErrorCode=GetLastError(); - printf("Unable to open the driver, Error Code : %lx\n",dwErrorCode); - - return(-1); - } - - } - else{ - - lpAdapter = PacketOpenAdapter(AdapterName); - - if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) - { - dwErrorCode=GetLastError(); - printf("Unable to open the driver, Error Code : %lx\n",dwErrorCode); - - return(-1); - } - - } - - if((lpPacket = PacketAllocatePacket())==NULL){ - printf("\nError:failed to allocate the LPPACKET structure."); - return (-1); - } - - packetbuff[0]=1; - packetbuff[1]=1; - packetbuff[2]=1; - packetbuff[3]=1; - packetbuff[4]=1; - packetbuff[5]=1; - - packetbuff[6]=2; - packetbuff[7]=2; - packetbuff[8]=2; - packetbuff[9]=2; - packetbuff[10]=2; - packetbuff[11]=2; - - for(i=12;i<1514;i++){ - packetbuff[i]= (char)i; - } - - PacketInitPacket(lpPacket,packetbuff,Snaplen); - // capture the packet - - - if(PacketSetNumWrites(lpAdapter,npacks)==FALSE){ - printf("warning: Unable to send more than one packet in a single write!\n"); - } - - printf("\n\nGenerating %d packets...",npacks); - - cpu_time = (float)clock (); - - if(PacketSendPacket(lpAdapter,lpPacket,TRUE)==FALSE){ - printf("Error sending the packets!\n"); - return -1; - } - - cpu_time = (clock() - cpu_time)/CLK_TCK; - - printf ("\n\nElapsed time: %5.3f\n", cpu_time); - printf ("\nTotal packets generated = %d", npacks); - printf ("\nTotal bytes generated = %d", (Snaplen+24)*npacks); - printf ("\nTotal bits generated = %d", (Snaplen+24)*npacks*8); - printf ("\nAverage packets per second = %d", (int)((double)npacks/cpu_time)); - printf ("\nAverage bytes per second = %d", (int)((double)((Snaplen+24)*npacks)/cpu_time)); - printf ("\nAverage bits per second = %d", (int)((double)((Snaplen+24)*npacks*8)/cpu_time)); - printf ("\n"); - - PacketFreePacket(lpPacket); - - // close the adapter and exit - - PacketCloseAdapter(lpAdapter); - return (0); -} diff --git a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp b/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp deleted file mode 100644 index ee2c6f4..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp +++ /dev/null @@ -1,107 +0,0 @@ -# Microsoft Developer Studio Project File - Name="TestPacketSend" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=TestPacketSend - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "TestPacketSend.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "TestPacketSend.mak" CFG="TestPacketSend - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "TestPacketSend - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "TestPacketSend - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "TestPacketSend - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"Release/TestPacketSend.exe" /machine:I386 -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "TestPacketSend - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "TestPacketSend - Win32 Release" -# Name "TestPacketSend - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\TestPacketSend.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\lib\Packet.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj deleted file mode 100644 index 35feca2..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/readme.txt b/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/readme.txt deleted file mode 100644 index e64371e..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/PacketDriver/readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -These files use the packet.dll API instead of wpcap.dll. -The use of packet.dll API is strongly discouraged. diff --git a/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsp b/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsp deleted file mode 100644 index b955312..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="UDPdump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=UDPdump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "UDPdump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "UDPdump.mak" CFG="UDPdump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "UDPdump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "UDPdump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "UDPdump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "UDPdump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "UDPdump - Win32 Release" -# Name "UDPdump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\udpdump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsw b/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsw deleted file mode 100644 index 8981cf4..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "UDPdump"=.\UDPdump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.vcproj deleted file mode 100644 index 4b12a25..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/udpdump.c b/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/udpdump.c deleted file mode 100644 index f6479ea..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/UDPdump/udpdump.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "pcap.h" - -/* 4 bytes IP address */ -typedef struct ip_address{ - u_char byte1; - u_char byte2; - u_char byte3; - u_char byte4; -}ip_address; - -/* IPv4 header */ -typedef struct ip_header{ - u_char ver_ihl; // Version (4 bits) + Internet header length (4 bits) - u_char tos; // Type of service - u_short tlen; // Total length - u_short identification; // Identification - u_short flags_fo; // Flags (3 bits) + Fragment offset (13 bits) - u_char ttl; // Time to live - u_char proto; // Protocol - u_short crc; // Header checksum - ip_address saddr; // Source address - ip_address daddr; // Destination address - u_int op_pad; // Option + Padding -}ip_header; - -/* UDP header*/ -typedef struct udp_header{ - u_short sport; // Source port - u_short dport; // Destination port - u_short len; // Datagram length - u_short crc; // Checksum -}udp_header; - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - - -int main() -{ -pcap_if_t *alldevs; -pcap_if_t *d; -int inum; -int i=0; -pcap_t *adhandle; -char errbuf[PCAP_ERRBUF_SIZE]; -u_int netmask; -char packet_filter[] = "ip and udp"; -struct bpf_program fcode; - - /* Retrieve the device list */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the adapter */ - if ( (adhandle= pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // remote authentication - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Check the link layer. We support only Ethernet for simplicity. */ - if(pcap_datalink(adhandle) != DLT_EN10MB) - { - fprintf(stderr,"\nThis program works only on Ethernet networks.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(d->addresses != NULL) - /* Retrieve the mask of the first address of the interface */ - netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; - else - /* If the interface is without addresses we suppose to be in a C class network */ - netmask=0xffffff; - - - //compile the filter - if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - //set the filter - if (pcap_setfilter(adhandle, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, NULL); - - return 0; -} - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct tm ltime; - char timestr[16]; - ip_header *ih; - udp_header *uh; - u_int ip_len; - u_short sport,dport; - time_t local_tv_sec; - - /* - * Unused variable - */ - (VOID)(param); - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - localtime_s(<ime, &local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); - - /* print timestamp and length of the packet */ - printf("%s.%.6d len:%d ", timestr, header->ts.tv_usec, header->len); - - /* retireve the position of the ip header */ - ih = (ip_header *) (pkt_data + - 14); //length of ethernet header - - /* retireve the position of the udp header */ - ip_len = (ih->ver_ihl & 0xf) * 4; - uh = (udp_header *) ((u_char*)ih + ip_len); - - /* convert from network byte order to host byte order */ - sport = ntohs( uh->sport ); - dport = ntohs( uh->dport ); - - /* print ip addresses and udp ports */ - printf("%d.%d.%d.%d.%d -> %d.%d.%d.%d.%d\n", - ih->saddr.byte1, - ih->saddr.byte2, - ih->saddr.byte3, - ih->saddr.byte4, - sport, - ih->daddr.byte1, - ih->daddr.byte2, - ih->daddr.byte3, - ih->daddr.byte4, - dport); -} \ No newline at end of file diff --git a/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.c b/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.c deleted file mode 100644 index 471f850..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.c +++ /dev/null @@ -1,467 +0,0 @@ -/* - * Copyright (c) 2005 - 2006 - * CACE Technologies, Davis, CA - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of CACE Technologies nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* - * This simple program implements a user-level bridge. - * It opens two adapters specified by the user and starts two threads. - * The first thread receives packets from adapter 1 and sends them down to - * adapter 2. The second thread does the same, but in the opposite - * direction. - */ - -#include -#include "pcap.h" - -/* Storage data structure used to pass parameters to the threads */ -typedef struct _in_out_adapters -{ - unsigned int state; /* Some simple state information */ - pcap_t *input_adapter; - pcap_t *output_adapter; -}in_out_adapters; - -/* Prototypes */ -DWORD WINAPI CaptureAndForwardThread(LPVOID lpParameter); -void ctrlc_handler(int sig); - -/* This prevents the two threads to mess-up when they do printfs */ -CRITICAL_SECTION print_cs; - -/* Thread handlers. Global because we wait on the threads from the CTRL+C handler */ -HANDLE threads[2]; - -/* This global variable tells the forwarder threads they must terminate */ -volatile int kill_forwaders = 0; - - -/*******************************************************************/ - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum1, inum2; - int i=0; - pcap_t *adhandle1, *adhandle2; - char errbuf[PCAP_ERRBUF_SIZE]; - u_int netmask1, netmask2; - char packet_filter[256]; - struct bpf_program fcode; - in_out_adapters couple0, couple1; - - /* - * Retrieve the device list - */ - - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. ", ++i); - if (d->description) - printf("%s\n", d->description); - else - printf("\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - - /* - * Get input from the user - */ - - /* Get the filter*/ - printf("\nSpecify filter (hit return for no filter):"); - - fgets(packet_filter, sizeof(packet_filter), stdin); - - /* Get the first interface number*/ - printf("\nEnter the number of the first interface to use (1-%d):",i); - scanf_s("%d", &inum1); - - if(inum1 < 1 || inum1 > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Get the second interface number*/ - printf("Enter the number of the first interface to use (1-%d):",i); - scanf_s("%d", &inum2); - - if(inum2 < 1 || inum2 > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(inum1 == inum2 ) - { - printf("\nCannot bridge packets on the same interface.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - - /* - * Open the specified couple of adapters - */ - - /* Jump to the first selected adapter */ - for(d = alldevs, i = 0; i< inum1 - 1 ;d = d->next, i++); - - /* - * Open the first adapter. - * *NOTICE* the flags we are using, they are important for the behavior of the prgram: - * - PCAP_OPENFLAG_PROMISCUOUS: tells the adapter to go in promiscuous mode. - * This means that we are capturing all the traffic, not only the one to or from - * this machine. - * - PCAP_OPENFLAG_NOCAPTURE_LOCAL: prevents the adapter from capturing again the packets - * transmitted by itself. This avoids annoying loops. - * - PCAP_OPENFLAG_MAX_RESPONSIVENESS: configures the adapter to provide minimum latency, - * at the cost of higher CPU usage. - */ - if((adhandle1 = pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on every link layer. - PCAP_OPENFLAG_PROMISCUOUS | // flags. We specify that we don't want to capture loopback packets, and that the driver should deliver us the packets as fast as possible - PCAP_OPENFLAG_NOCAPTURE_LOCAL | - PCAP_OPENFLAG_MAX_RESPONSIVENESS, - 500, // read timeout - NULL, // remote authentication - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->description); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(d->addresses != NULL) - { - /* Retrieve the mask of the first address of the interface */ - netmask1 = ((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; - } - else - { - /* If the interface is without addresses we suppose to be in a C class network */ - netmask1 = 0xffffff; - } - - /* Jump to the second selected adapter */ - for(d = alldevs, i = 0; i< inum2 - 1 ;d = d->next, i++); - - /* Open the second adapter */ - if((adhandle2 = pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on every link layer. - PCAP_OPENFLAG_PROMISCUOUS | // flags. We specify that we don't want to capture loopback packets, and that the driver should deliver us the packets as fast as possible - PCAP_OPENFLAG_NOCAPTURE_LOCAL | - PCAP_OPENFLAG_MAX_RESPONSIVENESS, - 500, // read timeout - NULL, // remote authentication - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->description); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(d->addresses != NULL) - { - /* Retrieve the mask of the first address of the interface */ - netmask2 = ((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; - } - else - { - /* If the interface is without addresses we suppose to be in a C class network */ - netmask2 = 0xffffff; - } - - - /* - * Compile and set the filters - */ - - /* compile the filter for the first adapter */ - if (pcap_compile(adhandle1, &fcode, packet_filter, 1, netmask1) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* set the filter for the first adapter*/ - if (pcap_setfilter(adhandle1, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* compile the filter for the second adapter */ - if (pcap_compile(adhandle2, &fcode, packet_filter, 1, netmask2) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* set the filter for the second adapter*/ - if (pcap_setfilter(adhandle2, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* At this point, we don't need the device list any more. Free it */ - pcap_freealldevs(alldevs); - - /* - * Start the threads that will forward the packets - */ - - /* Initialize the critical section that will be used by the threads for console output */ - InitializeCriticalSection(&print_cs); - - /* Init input parameters of the threads */ - couple0.state = 0; - couple0.input_adapter = adhandle1; - couple0.output_adapter = adhandle2; - couple1.state = 1; - couple1.input_adapter = adhandle2; - couple1.output_adapter = adhandle1; - - /* Start first thread */ - if((threads[0] = CreateThread( - NULL, - 0, - CaptureAndForwardThread, - &couple0, - 0, - NULL)) == NULL) - { - fprintf(stderr, "error creating the first forward thread"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Start second thread */ - if((threads[1] = CreateThread( - NULL, - 0, - CaptureAndForwardThread, - &couple1, - 0, - NULL)) == NULL) - { - fprintf(stderr, "error creating the second forward thread"); - - /* Kill the first thread. Not very gentle at all...*/ - TerminateThread(threads[0], 0); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* - * Install a CTRL+C handler that will do the cleanups on exit - */ - signal(SIGINT, ctrlc_handler); - - /* - * Done! - * Wait for the Greek calends... - */ - printf("\nStart bridging the two adapters...\n", d->description); - Sleep(INFINITE); - return 0; -} - -/******************************************************************* - * Forwarding thread. - * Gets the packets from the input adapter and sends them to the output one. - *******************************************************************/ -DWORD WINAPI CaptureAndForwardThread(LPVOID lpParameter) -{ - struct pcap_pkthdr *header; - const u_char *pkt_data; - int res = 0; - in_out_adapters* ad_couple = lpParameter; - unsigned int n_fwd = 0; - - /* - * Loop receiving packets from the first input adapter - */ - - while((!kill_forwaders) && (res = pcap_next_ex(ad_couple->input_adapter, &header, &pkt_data)) >= 0) - { - if(res != 0) /* Note: res=0 means "read timeout elapsed"*/ - { - /* - * Print something, just to show when we have activity. - * BEWARE: acquiring a critical section and printing strings with printf - * is something inefficient that you seriously want to avoid in your packet loop! - * However, since this is a *sample program*, we privilege visual output to efficiency. - */ - EnterCriticalSection(&print_cs); - - if(ad_couple->state == 0) - printf(">> Len: %u\n", header->caplen); - else - printf("<< Len: %u\n", header->caplen); - - LeaveCriticalSection(&print_cs); - - /* - * Send the just received packet to the output adaper - */ - if(pcap_sendpacket(ad_couple->output_adapter, pkt_data, header->caplen) != 0) - { - EnterCriticalSection(&print_cs); - - printf("Error sending a %u bytes packets on interface %u: %s\n", - header->caplen, - ad_couple->state, - pcap_geterr(ad_couple->output_adapter)); - - LeaveCriticalSection(&print_cs); - } - else - { - n_fwd++; - } - } - } - - /* - * We're out of the main loop. Check the reason. - */ - if(res < 0) - { - EnterCriticalSection(&print_cs); - - printf("Error capturing the packets: %s\n", pcap_geterr(ad_couple->input_adapter)); - fflush(stdout); - - LeaveCriticalSection(&print_cs); - } - else - { - EnterCriticalSection(&print_cs); - - printf("End of bridging on interface %u. Forwarded packets:%u\n", - ad_couple->state, - n_fwd); - fflush(stdout); - - LeaveCriticalSection(&print_cs); - } - - return 0; -} - -/******************************************************************* - * CTRL+C hanlder. - * We order the threads to die and then we patiently wait for their - * suicide. - *******************************************************************/ -void ctrlc_handler(int sig) -{ - /* - * unused variable - */ - (VOID)(sig); - - kill_forwaders = 1; - - WaitForMultipleObjects(2, - threads, - TRUE, /* Wait for all the handles */ - 5000); /* Timeout */ - - exit(0); -} \ No newline at end of file diff --git a/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsp b/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsp deleted file mode 100644 index f8ef34a..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsp +++ /dev/null @@ -1,106 +0,0 @@ -# Microsoft Developer Studio Project File - Name="UserBridge" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=UserBridge - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "UserBridge.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "UserBridge.mak" CFG="UserBridge - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "UserBridge - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "UserBridge - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "UserBridge - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "UserBridge - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "UserBridge - Win32 Release" -# Name "UserBridge - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\UserBridge.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsw b/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsw deleted file mode 100644 index 7104a54..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "UserBridge"=.\UserBridge.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.vcproj deleted file mode 100644 index 06e00b2..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.c b/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.c deleted file mode 100644 index 391dda1..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include "pcap.h" - -#ifndef WIN32 - #include - #include -#else - #include -#endif - - -// Function prototypes -void ifprint(pcap_if_t *d); -char *iptos(u_long in); -char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen); - - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - char errbuf[PCAP_ERRBUF_SIZE+1]; - char source[PCAP_ERRBUF_SIZE+1]; - - printf("Enter the device you want to list:\n" - "rpcap:// ==> lists interfaces in the local machine\n" - "rpcap://hostname:port ==> lists interfaces in a remote machine\n" - " (rpcapd daemon must be up and running\n" - " and it must accept 'null' authentication)\n" - "file://foldername ==> lists all pcap files in the give folder\n\n" - "Enter your choice: "); - - fgets(source, PCAP_ERRBUF_SIZE, stdin); - source[PCAP_ERRBUF_SIZE] = '\0'; - - /* Retrieve the interfaces list */ - if (pcap_findalldevs_ex(source, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n",errbuf); - exit(1); - } - - /* Scan the list printing every entry */ - for(d=alldevs;d;d=d->next) - { - ifprint(d); - } - - pcap_freealldevs(alldevs); - - return 1; -} - - - -/* Print all the available information on the given interface */ -void ifprint(pcap_if_t *d) -{ - pcap_addr_t *a; - char ip6str[128]; - - /* Name */ - printf("%s\n",d->name); - - /* Description */ - if (d->description) - printf("\tDescription: %s\n",d->description); - - /* Loopback Address*/ - printf("\tLoopback: %s\n",(d->flags & PCAP_IF_LOOPBACK)?"yes":"no"); - - /* IP addresses */ - for(a=d->addresses;a;a=a->next) { - printf("\tAddress Family: #%d\n",a->addr->sa_family); - - switch(a->addr->sa_family) - { - case AF_INET: - printf("\tAddress Family Name: AF_INET\n"); - if (a->addr) - printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr)); - if (a->netmask) - printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr)); - if (a->broadaddr) - printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr)); - if (a->dstaddr) - printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr)); - break; - - case AF_INET6: - printf("\tAddress Family Name: AF_INET6\n"); - if (a->addr) - printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str))); - break; - - default: - printf("\tAddress Family Name: Unknown\n"); - break; - } - } - printf("\n"); -} - - - -/* From tcptraceroute, convert a numeric IP address to a string */ -#define IPTOSBUFFERS 12 -char *iptos(u_long in) -{ - static char output[IPTOSBUFFERS][3*4+3+1]; - static short which; - u_char *p; - - p = (u_char *)∈ - which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); - _snprintf_s(output[which], sizeof(output[which]), sizeof(output[which]),"%d.%d.%d.%d", p[0], p[1], p[2], p[3]); - return output[which]; -} - -char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen) -{ - socklen_t sockaddrlen; - - #ifdef WIN32 - sockaddrlen = sizeof(struct sockaddr_in6); - #else - sockaddrlen = sizeof(struct sockaddr_storage); - #endif - - - if(getnameinfo(sockaddr, - sockaddrlen, - address, - addrlen, - NULL, - 0, - NI_NUMERICHOST) != 0) address = NULL; - - return address; -} - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsp b/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsp deleted file mode 100644 index 4182364..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="iflist" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=iflist - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "iflist.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "iflist.mak" CFG="iflist - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "iflist - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "iflist - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "iflist - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "iflist - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "iflist - Win32 Release" -# Name "iflist - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\iflist.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsw b/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsw deleted file mode 100644 index 1425db2..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "iflist"=.\iflist.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.vcproj deleted file mode 100644 index 2b41203..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/iflist/iflist.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/MakeAll.sln b/ledset/WpdPack_4_1_2/Examples-remote/misc/MakeAll.sln deleted file mode 100644 index 8984e0f..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/MakeAll.sln +++ /dev/null @@ -1,76 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "basic_dump.vcproj", "{66297062-96A0-4F0E-B147-3C8384031232}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "basic_dump_ex.vcproj", "{92849630-6B09-409C-A7AD-E91E682558B1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "readfile.vcproj", "{161E7606-F4CD-4A04-AB6B-5837F7818EE1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "readfile_ex.vcproj", "{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "savedump.vcproj", "{1B8791CB-DD15-46BF-B0A2-879892085538}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "sendpack.vcproj", "{1C376689-5F61-48E7-AE83-0DED9EE9E458}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.ActiveCfg = Debug|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.Build.0 = Debug|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.ActiveCfg = Debug|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.Build.0 = Debug|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.ActiveCfg = Release|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.Build.0 = Release|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.ActiveCfg = Release|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.Build.0 = Release|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.ActiveCfg = Debug|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.Build.0 = Debug|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.ActiveCfg = Debug|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.Build.0 = Debug|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.ActiveCfg = Release|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.Build.0 = Release|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.ActiveCfg = Release|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.Build.0 = Release|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.ActiveCfg = Debug|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.Build.0 = Debug|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.ActiveCfg = Debug|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.Build.0 = Debug|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.ActiveCfg = Release|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.Build.0 = Release|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.ActiveCfg = Release|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.Build.0 = Release|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.ActiveCfg = Debug|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.Build.0 = Debug|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.ActiveCfg = Debug|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.Build.0 = Debug|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.ActiveCfg = Release|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.Build.0 = Release|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.ActiveCfg = Release|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.Build.0 = Release|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.ActiveCfg = Debug|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.Build.0 = Debug|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.ActiveCfg = Debug|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.Build.0 = Debug|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.ActiveCfg = Release|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.Build.0 = Release|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.ActiveCfg = Release|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.Build.0 = Release|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.ActiveCfg = Debug|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.Build.0 = Debug|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.ActiveCfg = Debug|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.Build.0 = Debug|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.ActiveCfg = Release|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.Build.0 = Release|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.ActiveCfg = Release|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/MakeaAll.dsw b/ledset/WpdPack_4_1_2/Examples-remote/misc/MakeaAll.dsw deleted file mode 100644 index 8223f54..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/MakeaAll.dsw +++ /dev/null @@ -1,89 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "basic_dump"=.\basic_dump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump_ex"=.\basic_dump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile"=.\readfile.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile_ex"=.\readfile_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "savedump"=.\savedump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "sendpack"=.\sendpack.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.c b/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.c deleted file mode 100644 index 8c660f3..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.c +++ /dev/null @@ -1,100 +0,0 @@ -#include "pcap.h" - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int main() -{ -pcap_if_t *alldevs; -pcap_if_t *d; -int inum; -int i=0; -pcap_t *adhandle; -char errbuf[PCAP_ERRBUF_SIZE]; - - /* Retrieve the device list on the local machine */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - if ( (adhandle= pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, NULL); - - return 0; -} - - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct tm ltime; - char timestr[16]; - time_t local_tv_sec; - - /* - * unused variables - */ - (VOID)(param); - (VOID)(pkt_data); - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - localtime_s(<ime, &local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); - - printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); - -} diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.dsp b/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.dsp deleted file mode 100644 index 7e74aaa..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="basic_dump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=basic_dump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "basic_dump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "basic_dump.mak" CFG="basic_dump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "basic_dump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "basic_dump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "basic_dump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "basic_dump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "basic_dump - Win32 Release" -# Name "basic_dump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\basic_dump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.vcproj deleted file mode 100644 index 6fb00fe..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.c b/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.c deleted file mode 100644 index ec047b3..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.c +++ /dev/null @@ -1,99 +0,0 @@ -#include "pcap.h" - - -int main() -{ -pcap_if_t *alldevs; -pcap_if_t *d; -int inum; -int i=0; -pcap_t *adhandle; -int res; -char errbuf[PCAP_ERRBUF_SIZE]; -struct tm ltime; -char timestr[16]; -struct pcap_pkthdr *header; -const u_char *pkt_data; -time_t local_tv_sec; - - - /* Retrieve the device list on the local machine */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - if ( (adhandle= pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* Retrieve the packets */ - while((res = pcap_next_ex( adhandle, &header, &pkt_data)) >= 0){ - - if(res == 0) - /* Timeout elapsed */ - continue; - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - localtime_s(<ime, &local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); - - printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); - } - - if(res == -1){ - printf("Error reading the packets: %s\n", pcap_geterr(adhandle)); - return -1; - } - - return 0; -} \ No newline at end of file diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.dsp b/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.dsp deleted file mode 100644 index 0405d29..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="basic_dump_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=basic_dump_ex - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "basic_dump_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "basic_dump_ex.mak" CFG="basic_dump_ex - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "basic_dump_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "basic_dump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "basic_dump_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "basic_dump_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "basic_dump_ex - Win32 Release" -# Name "basic_dump_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\basic_dump_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.vcproj deleted file mode 100644 index 5815203..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.c b/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.c deleted file mode 100644 index 7db43b4..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.c +++ /dev/null @@ -1,78 +0,0 @@ -#include -#include - -#define LINE_LEN 16 - -void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); - -int main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -char source[PCAP_BUF_SIZE]; - - if(argc != 2){ - - printf("usage: %s filename", argv[0]); - return -1; - - } - - /* Create the source string according to the new WinPcap syntax */ - if ( pcap_createsrcstr( source, // variable that will keep the source string - PCAP_SRC_FILE, // we want to open a file - NULL, // remote host - NULL, // port on the remote host - argv[1], // name of the file we want to open - errbuf // error buffer - ) != 0) - { - fprintf(stderr,"\nError creating a source string\n"); - return -1; - } - - /* Open the capture file */ - if ( (fp= pcap_open(source, // name of the device - 65536, // portion of the packet to capture - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", source); - return -1; - } - - // read and dispatch packets until EOF is reached - pcap_loop(fp, 0, dispatcher_handler, NULL); - - return 0; -} - - - -void dispatcher_handler(u_char *temp1, - const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - u_int i=0; - - /* - * Unused variable - */ - (VOID)temp1; - - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - -} diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.dsp b/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.dsp deleted file mode 100644 index 5d45bde..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="readfile" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=readfile - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "readfile.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "readfile.mak" CFG="readfile - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "readfile - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "readfile - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "readfile - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "readfile - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "readfile - Win32 Release" -# Name "readfile - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\readfile.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.vcproj deleted file mode 100644 index 34f7c1a..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.c b/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.c deleted file mode 100644 index 622bc9e..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.c +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include - -#define LINE_LEN 16 - -int main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -char source[PCAP_BUF_SIZE]; -struct pcap_pkthdr *header; -const u_char *pkt_data; -u_int i=0; -int res; - - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - } - - /* Create the source string according to the new WinPcap syntax */ - if ( pcap_createsrcstr( source, // variable that will keep the source string - PCAP_SRC_FILE, // we want to open a file - NULL, // remote host - NULL, // port on the remote host - argv[1], // name of the file we want to open - errbuf // error buffer - ) != 0) - { - fprintf(stderr,"\nError creating a source string\n"); - return -1; - } - - /* Open the capture file */ - if ( (fp= pcap_open(source, // name of the device - 65536, // portion of the packet to capture - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", source); - return -1; - } - - /* Retrieve the packets from the file */ - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - } - - - if (res == -1) - { - printf("Error reading the packets: %s\n", pcap_geterr(fp)); - } - - return 0; -} - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.dsp b/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.dsp deleted file mode 100644 index 07dcf9f..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="readfile_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=readfile_ex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "readfile_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "readfile_ex.mak" CFG="readfile_ex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "readfile_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "readfile_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "readfile_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "readfile_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "readfile_ex - Win32 Release" -# Name "readfile_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\readfile_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.vcproj deleted file mode 100644 index b194a62..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.c b/ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.c deleted file mode 100644 index 6316939..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.c +++ /dev/null @@ -1,104 +0,0 @@ -#include "pcap.h" - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int main(int argc, char **argv) -{ -pcap_if_t *alldevs; -pcap_if_t *d; -int inum; -int i=0; -pcap_t *adhandle; -char errbuf[PCAP_ERRBUF_SIZE]; -pcap_dumper_t *dumpfile; - - - - /* Check command line */ - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - } - - /* Retrieve the device list on the local machine */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - - /* Open the device */ - if ( (adhandle= pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Open the dump file */ - dumpfile = pcap_dump_open(adhandle, argv[1]); - - if(dumpfile==NULL) - { - fprintf(stderr,"\nError opening output file\n"); - return -1; - } - - printf("\nlistening on %s... Press Ctrl+C to stop...\n", d->description); - - /* At this point, we no longer need the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, (unsigned char *)dumpfile); - - return 0; -} - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *dumpfile, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - /* save the packet on the dump file */ - pcap_dump(dumpfile, header, pkt_data); -} diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.dsp b/ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.dsp deleted file mode 100644 index 22d5d39..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="savedump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=savedump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "savedump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "savedump.mak" CFG="savedump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "savedump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "savedump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "savedump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "savedump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "savedump - Win32 Release" -# Name "savedump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\savedump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.vcproj deleted file mode 100644 index fd4c12a..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/savedump.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.c b/ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.c deleted file mode 100644 index 55b1a5b..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.c +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include - -#include - - -void main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -u_char packet[100]; -int i; - - /* Check the validity of the command line */ - if (argc != 2) - { - printf("usage: %s interface (e.g. 'rpcap://eth0')", argv[0]); - return; - } - - /* Open the output device */ - if ( (fp= pcap_open(argv[1], // name of the device - 100, // portion of the packet to capture (only the first 100 bytes) - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", argv[1]); - return; - } - - /* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */ - packet[0]=1; - packet[1]=1; - packet[2]=1; - packet[3]=1; - packet[4]=1; - packet[5]=1; - - /* set mac source to 2:2:2:2:2:2 */ - packet[6]=2; - packet[7]=2; - packet[8]=2; - packet[9]=2; - packet[10]=2; - packet[11]=2; - - /* Fill the rest of the packet */ - for(i=12;i<100;i++) - { - packet[i]=(u_char)i; - } - - /* Send down the packet */ - if (pcap_sendpacket(fp, packet, 100 /* size */) != 0) - { - fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp)); - return; - } - - return; -} diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.dsp b/ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.dsp deleted file mode 100644 index 95022e3..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sendpack" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sendpack - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "sendpack.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sendpack.mak" CFG="sendpack - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sendpack - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sendpack - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sendpack - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "sendpack - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "sendpack - Win32 Release" -# Name "sendpack - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\sendpack.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.vcproj deleted file mode 100644 index ee5d3ae..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/misc/sendpack.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.c b/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.c deleted file mode 100644 index ad83a16..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.c +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include - -#include - -#define MAX_PRINT 80 -#define MAX_LINE 16 - - -void usage(); - - -void main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -char *source=NULL; -char *ofilename=NULL; -char *filter=NULL; -int i; -pcap_dumper_t *dumpfile; -struct bpf_program fcode; -bpf_u_int32 NetMask; -int res; -struct pcap_pkthdr *header; -const u_char *pkt_data; - - if (argc == 1) - { - usage(); - return; - } - - for(i=1;i < argc; i+= 2) - { - - switch (argv[i] [1]) - { - case 's': - { - source=argv[i+1]; - }; - break; - - case 'o': - { - ofilename=argv[i+1]; - }; - break; - - case 'f': - { - filter=argv[i+1]; - }; - break; - } - } - - // open a capture from the network - if (source != NULL) - { - if ( (fp= pcap_open(source, - 1514 /*snaplen*/, - PCAP_OPENFLAG_PROMISCUOUS /*flags*/, - 20 /*read timeout*/, - NULL /* remote authentication */, - errbuf) - ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter.\n"); - return; - } - } - - else usage(); - - if (filter != NULL) - { - // We should loop through the adapters returned by the pcap_findalldevs_ex() - // in order to locate the correct one. - // - // Let's do things simpler: we suppose to be in a C class network ;-) - NetMask=0xffffff; - - //compile the filter - if(pcap_compile(fp, &fcode, filter, 1, NetMask) < 0) - { - fprintf(stderr,"\nError compiling filter: wrong syntax.\n"); - return; - } - - //set the filter - if(pcap_setfilter(fp, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter\n"); - return; - } - - } - - //open the dump file - if (ofilename != NULL) - { - dumpfile= pcap_dump_open(fp, ofilename); - - if (dumpfile == NULL) - { - fprintf(stderr,"\nError opening output file\n"); - return; - } - } - else usage(); - - //start the capture - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - - if(res == 0) - /* Timeout elapsed */ - continue; - - //save the packet on the dump file - pcap_dump((unsigned char *) dumpfile, header, pkt_data); - - } -} - - -void usage() -{ - - printf("\npf - Generic Packet Filter.\n"); - printf("\nUsage:\npf -s source -o output_file_name [-f filter_string]\n\n"); - exit(0); -} \ No newline at end of file diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsp b/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsp deleted file mode 100644 index c01d2e7..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pcap_filter" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pcap_filter - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pcap_filter.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pcap_filter.mak" CFG="pcap_filter - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pcap_filter - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pcap_filter - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pcap_filter - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 /out:"Release/pf.exe" - -!ELSEIF "$(CFG)" == "pcap_filter - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/pf.exe" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "pcap_filter - Win32 Release" -# Name "pcap_filter - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\pcap_filter.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsw b/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsw deleted file mode 100644 index 1d39119..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "pcap_filter"=.\pcap_filter.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.vcproj deleted file mode 100644 index ff322b5..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.cpp b/ledset/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.cpp deleted file mode 100644 index 0476e40..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2008 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of CACE Technologies nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This sample was contributed by - * Marcin Okraszewski (Marcin.OkraszewskiATpl.compuware.com) - * - */ - -#include -#include -#include - -/** Prints packet timestaps regardless of format*/ -int _tmain(int argc, _TCHAR* argv[]) -{ - char errbuf[PCAP_ERRBUF_SIZE]; - wchar_t cmd[1024]; - wchar_t tshark_path[MAX_PATH]; - wchar_t file_path[MAX_PATH]; - - if ( argc != 3 ) { - wprintf(L"Prints packet timestaps regardless of format.\n"); - wprintf(L"Usage:\n\t%ls \n", argv[0]); - return 1; - } - - // conversion to short path name in case there are spaces - if ( ! GetShortPathNameW(argv[1], tshark_path, MAX_PATH) || - ! GetShortPathNameW(argv[2], file_path, MAX_PATH) ) - { - printf("Failed to convert paths to short form."); - return 1; - } - - // create tshark command, which will make the trace conversion and print in libpcap format to stdout - if ( swprintf_s(cmd, 1024, L"%ls -r %ls -w - -F libpcap", tshark_path, file_path) < 0 ) { - wprintf(L"Failed to create command\n"); - return 1; - } - - // start tshark - FILE *tshark_out = _wpopen(cmd, L"rb"); - if ( tshark_out == NULL ) { - strerror_s(errbuf, PCAP_ERRBUF_SIZE, errno); - printf("Failed run tshark: %s\n", errbuf); - wprintf(L"Command: %ls", cmd); - return 1; - } - - // open stdout from tshark - pcap_t *pcap = pcap_fopen_offline(tshark_out, errbuf); - if ( pcap == NULL ) { - printf("Error opening stream from tshark: %s\n", errbuf); - return 1; - } - - // print information about every packet int trace - struct pcap_pkthdr hdr; - while ( pcap_next(pcap, &hdr) ) { - printf("packet: ts: %u.%06u, len: %4u, caplen: %4u\n", hdr.ts.tv_sec, hdr.ts.tv_usec, hdr.len, hdr.caplen); - } - - // clean up - pcap_close(pcap); - _pclose(tshark_out); - return 0; -} - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.vcproj deleted file mode 100644 index 73f4c6e..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.c b/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.c deleted file mode 100644 index 6198e7d..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.c +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include - -// -// NOTE: remember to include WPCAP and HAVE_REMOTE among your -// preprocessor definitions. -// - -#include - -#define LINE_LEN 16 - -int main(int argc, char **argv) -{ -pcap_if_t *alldevs, *d; -pcap_t *fp; -u_int inum, i=0; -char errbuf[PCAP_ERRBUF_SIZE]; -int res; -struct pcap_pkthdr *header; -const u_char *pkt_data; - - printf("pktdump_ex: prints the packets of the network using WinPcap.\n"); - printf(" Usage: pktdump_ex [-s source]\n\n" - " Examples:\n" - " pktdump_ex -s file://c:/temp/file.acp\n" - " pktdump_ex -s rpcap://\\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n"); - - if(argc < 3) - { - - printf("\nNo adapter selected: printing the device list:\n"); - /* The user didn't provide a packet source: Retrieve the local device list */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf); - return -1; - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s\n ", ++i, d->name); - - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if (i==0) - { - fprintf(stderr,"No interfaces found! Exiting.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if (inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for (d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - if ( (fp= pcap_open(d->name, - 100 /*snaplen*/, - PCAP_OPENFLAG_PROMISCUOUS /*flags*/, - 20 /*read timeout*/, - NULL /* remote authentication */, - errbuf) - ) == NULL) - { - fprintf(stderr,"\nError opening adapter\n"); - return -1; - } - } - else - { - // Do not check for the switch type ('-s') - if ( (fp= pcap_open(argv[2], - 100 /*snaplen*/, - PCAP_OPENFLAG_PROMISCUOUS /*flags*/, - 20 /*read timeout*/, - NULL /* remote authentication */, - errbuf) - ) == NULL) - { - fprintf(stderr,"\nError opening source: %s\n", errbuf); - return -1; - } - } - - /* Read the packets */ - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - - if(res == 0) - /* Timeout elapsed */ - continue; - - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - } - - if(res == -1) - { - fprintf(stderr, "Error reading the packets: %s\n", pcap_geterr(fp)); - return -1; - } - - return 0; -} diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsp b/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsp deleted file mode 100644 index a9800e6..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="pktdump_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pktdump_ex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pktdump_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pktdump_ex.mak" CFG="pktdump_ex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pktdump_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pktdump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pktdump_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "pktdump_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "pktdump_ex - Win32 Release" -# Name "pktdump_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\pktdump_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsw b/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsw deleted file mode 100644 index ec24733..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "pktdump_ex"=.\pktdump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.vcproj deleted file mode 100644 index d99862f..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sencap.dsw b/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sencap.dsw deleted file mode 100644 index eae0bc2..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sencap.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "sendcap"=.\sendcap.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.c b/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.c deleted file mode 100644 index 876c6d8..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include - -#include - -void usage(); - -void main(int argc, char **argv) -{ - pcap_t *indesc,*outdesc; - char errbuf[PCAP_ERRBUF_SIZE]; - char source[PCAP_BUF_SIZE]; - FILE *capfile; - int caplen, sync; - u_int res; - pcap_send_queue *squeue; - struct pcap_pkthdr *pktheader; - u_char *pktdata; - float cpu_time; - u_int npacks = 0; - errno_t fopen_error; - - /* Check the validity of the command line */ - if (argc <= 2 || argc >= 5) - { - usage(); - return; - } - - /* Retrieve the length of the capture file */ - fopen_error = fopen_s(&capfile, argv[1],"rb"); - if(fopen_error != 0){ - printf("Error opening the file, errno %d.\n", fopen_error); - return; - } - - fseek(capfile , 0, SEEK_END); - caplen= ftell(capfile)- sizeof(struct pcap_file_header); - fclose(capfile); - - /* Chek if the timestamps must be respected */ - if(argc == 4 && argv[3][0] == 's') - sync = TRUE; - else - sync = FALSE; - - /* Open the capture */ - /* Create the source string according to the new WinPcap syntax */ - if ( pcap_createsrcstr( source, // variable that will keep the source string - PCAP_SRC_FILE, // we want to open a file - NULL, // remote host - NULL, // port on the remote host - argv[1], // name of the file we want to open - errbuf // error buffer - ) != 0) - { - fprintf(stderr,"\nError creating a source string\n"); - return; - } - - /* Open the capture file */ - if ( (indesc= pcap_open(source, 65536, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", source); - return; - } - - /* Open the output adapter */ - if ( (outdesc= pcap_open(argv[2], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) - { - fprintf(stderr,"\nUnable to open adapter %s.\n", source); - return; - } - - /* Check the MAC type */ - if (pcap_datalink(indesc) != pcap_datalink(outdesc)) - { - printf("Warning: the datalink of the capture differs from the one of the selected interface.\n"); - printf("Press a key to continue, or CTRL+C to stop.\n"); - getchar(); - } - - /* Allocate a send queue */ - squeue = pcap_sendqueue_alloc(caplen); - - /* Fill the queue with the packets from the file */ - while ((res = pcap_next_ex( indesc, &pktheader, &pktdata)) == 1) - { - if (pcap_sendqueue_queue(squeue, pktheader, pktdata) == -1) - { - printf("Warning: packet buffer too small, not all the packets will be sent.\n"); - break; - } - - npacks++; - } - - if (res == -1) - { - printf("Corrupted input file.\n"); - pcap_sendqueue_destroy(squeue); - return; - } - - /* Transmit the queue */ - - cpu_time = (float)clock (); - - if ((res = pcap_sendqueue_transmit(outdesc, squeue, sync)) < squeue->len) - { - printf("An error occurred sending the packets: %s. Only %d bytes were sent\n", pcap_geterr(outdesc), res); - } - - cpu_time = (clock() - cpu_time)/CLK_TCK; - - printf ("\n\nElapsed time: %5.3f\n", cpu_time); - printf ("\nTotal packets generated = %d", npacks); - printf ("\nAverage packets per second = %d", (int)((double)npacks/cpu_time)); - printf ("\n"); - - /* free the send queue */ - pcap_sendqueue_destroy(squeue); - - /* Close the input file */ - pcap_close(indesc); - - /* - * lose the output adapter - * IMPORTANT: remember to close the adapter, otherwise there will be no guarantee that all the - * packets will be sent! - */ - pcap_close(outdesc); - - - return; -} - - -void usage() -{ - - printf("\nSendcap, sends a libpcap/tcpdump capture file to the net. Copyright (C) 2002 Loris Degioanni.\n"); - printf("\nUsage:\n"); - printf("\t sendcap file_name adapter [s]\n"); - printf("\nParameters:\n"); - printf("\nfile_name: the name of the dump file that will be sent to the network\n"); - printf("\nadapter: the device to use. Use \"WinDump -D\" for a list of valid devices\n"); - printf("\ns: if present, forces the packets to be sent synchronously, i.e. respecting the timestamps in the dump file. This option will work only under Windows NTx.\n\n"); - - exit(0); -} \ No newline at end of file diff --git a/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.dsp b/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.dsp deleted file mode 100644 index 230d09b..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sendcap" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sendcap - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "sendcap.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sendcap.mak" CFG="sendcap - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sendcap - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sendcap - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sendcap - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "PCAP_DONT_INCLUDE_PCAP_BPF_H" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "sendcap - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "PCAP_DONT_INCLUDE_PCAP_BPF_H" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "sendcap - Win32 Release" -# Name "sendcap - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\sendcap.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.vcproj deleted file mode 100644 index c95da3c..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.c b/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.c deleted file mode 100644 index 9b99114..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include -#include - -#include - - -int main() -{ -pcap_if_t *alldevs, *d; -pcap_t *fp; -u_int inum, i=0; -char errbuf[PCAP_ERRBUF_SIZE]; -int res; -struct pcap_pkthdr *header; -const u_char *pkt_data; -struct pcap_pkthdr old; - - printf("SMP_1\n"); - printf("\nThis program tests the WinPcap kernel driver on SMP machines.\n"); - printf("The program tests that timestamps on the captured packets are consistent,\n"); - printf("and that the caplen is equal to the packet length.\n"); - printf("If there is an error, it will print out a message saying \"Inconsistent XXX\"\n"); - - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - if ( (fp= pcap_open(d->name, 65536, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - old.ts.tv_sec=0; - old.ts.tv_usec=0; - - - /* Read the packets */ - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0){ - - if(res == 0) - continue; - - //check that caplen is equal to packet length - if (header->caplen!=header->len) - printf("Inconsistent header: CapLen %d\t Len %d\n",header->caplen,header->len); - - //check that timestamps always grow - if ( old.ts.tv_sec > header->ts.tv_sec || (old.ts.tv_sec == header->ts.tv_sec && old.ts.tv_usec > header->ts.tv_usec)) - printf("Inconsistent Timestamps! Old was %d.%.06d - New is %d.%.06d\n",old.ts.tv_sec,old.ts.tv_usec, header->ts.tv_sec,header->ts.tv_usec); - - old=*header; - - } - - if(res == -1){ - printf("Error reading the packets: %s\n", pcap_geterr(fp)); - return -1; - } - - _getch(); - - return 0; -} diff --git a/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsp b/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsp deleted file mode 100644 index e759c30..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsp +++ /dev/null @@ -1,102 +0,0 @@ -# Microsoft Developer Studio Project File - Name="smp_1" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=smp_1 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "smp_1.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "smp_1.mak" CFG="smp_1 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "smp_1 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "smp_1 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "smp_1 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wpcap.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\lib" - -!ELSEIF "$(CFG)" == "smp_1 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wpcap.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\lib" - -!ENDIF - -# Begin Target - -# Name "smp_1 - Win32 Release" -# Name "smp_1 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\SMP_1.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsw b/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsw deleted file mode 100644 index 36c8e46..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "smp_1"=.\smp_1.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.vcproj deleted file mode 100644 index f789df3..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.c b/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.c deleted file mode 100644 index 2d83c3f..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include - -#include - -void usage(); - -void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); - - -void main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -struct timeval st_ts; -u_int netmask; -struct bpf_program fcode; - - /* Check the validity of the command line */ - if (argc != 2) - { - usage(); - return; - } - - /* Open the output adapter */ - if ( (fp= pcap_open(argv[1], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) - { - fprintf(stderr,"\nUnable to open adapter %s.\n", errbuf); - return; - } - - /* Don't care about netmask, it won't be used for this filter */ - netmask=0xffffff; - - //compile the filter - if (pcap_compile(fp, &fcode, "tcp", 1, netmask) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - /* Free the device list */ - return; - } - - //set the filter - if (pcap_setfilter(fp, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - pcap_close(fp); - /* Free the device list */ - return; - } - - /* Put the interface in statstics mode */ - if (pcap_setmode(fp, MODE_STAT)<0) - { - fprintf(stderr,"\nError setting the mode.\n"); - pcap_close(fp); - /* Free the device list */ - return; - } - - - printf("TCP traffic summary:\n"); - - /* Start the main loop */ - pcap_loop(fp, 0, dispatcher_handler, (PUCHAR)&st_ts); - - pcap_close(fp); - return; -} - -void dispatcher_handler(u_char *state, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct timeval *old_ts = (struct timeval *)state; - u_int delay; - LARGE_INTEGER Bps,Pps; - struct tm ltime; - char timestr[16]; - time_t local_tv_sec; - - /* Calculate the delay in microseconds from the last sample. */ - /* This value is obtained from the timestamp that the associated with the sample. */ - delay=(header->ts.tv_sec - old_ts->tv_sec) * 1000000 - old_ts->tv_usec + header->ts.tv_usec; - /* Get the number of Bits per second */ - Bps.QuadPart=(((*(LONGLONG*)(pkt_data + 8)) * 8 * 1000000) / (delay)); - /* ^ ^ - | | - | | - | | - converts bytes in bits -- | - | - delay is expressed in microseconds -- - */ - - /* Get the number of Packets per second */ - Pps.QuadPart=(((*(LONGLONG*)(pkt_data)) * 1000000) / (delay)); - - /* Convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - localtime_s(<ime, &local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); - - /* Print timestamp*/ - printf("%s ", timestr); - - /* Print the samples */ - printf("BPS=%I64u ", Bps.QuadPart); - printf("PPS=%I64u\n", Pps.QuadPart); - - //store current timestamp - old_ts->tv_sec=header->ts.tv_sec; - old_ts->tv_usec=header->ts.tv_usec; -} - - -void usage() -{ - - printf("\nShows the TCP traffic load, in bits per second and packets per second.\nCopyright (C) 2002 Loris Degioanni.\n"); - printf("\nUsage:\n"); - printf("\t tcptop adapter\n"); - printf("\t You can use \"WinDump -D\" if you don't know the name of your adapters.\n"); - - exit(0); -} \ No newline at end of file diff --git a/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsp b/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsp deleted file mode 100644 index 95d9fcc..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsp +++ /dev/null @@ -1,110 +0,0 @@ -# Microsoft Developer Studio Project File - Name="tcptop" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tcptop - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tcptop.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tcptop.mak" CFG="tcptop - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tcptop - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tcptop - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tcptop - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "tcptop - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "tcptop - Win32 Release" -# Name "tcptop - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\tcptop.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project diff --git a/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsw b/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsw deleted file mode 100644 index d680f73..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "tcptop"=.\tcptop.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.vcproj b/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.vcproj deleted file mode 100644 index 5143b4a..0000000 --- a/ledset/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.vcproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ledset/WpdPack_4_1_2/Include/Packet32.h b/ledset/WpdPack_4_1_2/Include/Packet32.h deleted file mode 100644 index 64be055..0000000 --- a/ledset/WpdPack_4_1_2/Include/Packet32.h +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2007 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** @ingroup packetapi - * @{ - */ - -/** @defgroup packet32h Packet.dll definitions and data structures - * Packet32.h contains the data structures and the definitions used by packet.dll. - * The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included - * by the applications that use the functions of this library - * @{ - */ - -#ifndef __PACKET32 -#define __PACKET32 - -#include - -#ifdef HAVE_AIRPCAP_API -#include -#else -#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) -#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ -typedef struct _AirpcapHandle *PAirpcapHandle; -#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */ -#endif /* HAVE_AIRPCAP_API */ - -#ifdef HAVE_DAG_API -#include -#endif /* HAVE_DAG_API */ - -// Working modes -#define PACKET_MODE_CAPT 0x0 ///< Capture mode -#define PACKET_MODE_STAT 0x1 ///< Statistical mode -#define PACKET_MODE_MON 0x2 ///< Monitoring mode -#define PACKET_MODE_DUMP 0x10 ///< Dump mode -#define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT ///< Statistical dump Mode - - -/// Alignment macro. Defines the alignment size. -#define Packet_ALIGNMENT sizeof(int) -/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT. -#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1)) - -#define NdisMediumNull -1 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumCHDLC -2 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumPPPSerial -3 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumBare80211 -4 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumRadio80211 -5 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumPpi -6 ///< Custom linktype: NDIS doesn't provide an equivalent - -// Loopback behaviour definitions -#define NPF_DISABLE_LOOPBACK 1 ///< Drop the packets sent by the NPF driver -#define NPF_ENABLE_LOOPBACK 2 ///< Capture the packets sent by the NPF driver - -/*! - \brief Network type structure. - - This structure is used by the PacketGetNetType() function to return information on the current adapter's type and speed. -*/ -typedef struct NetType -{ - UINT LinkType; ///< The MAC of the current network adapter (see function PacketGetNetType() for more information) - ULONGLONG LinkSpeed; ///< The speed of the network in bits per second -}NetType; - - -//some definitions stolen from libpcap - -#ifndef BPF_MAJOR_VERSION - -/*! - \brief A BPF pseudo-assembly program. - - The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet. -*/ -struct bpf_program -{ - UINT bf_len; ///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow. - struct bpf_insn *bf_insns; ///< A pointer to the first instruction of the program. -}; - -/*! - \brief A single BPF pseudo-instruction. - - bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver. -*/ -struct bpf_insn -{ - USHORT code; ///< Instruction type and addressing mode. - UCHAR jt; ///< Jump if true - UCHAR jf; ///< Jump if false - int k; ///< Generic field used for various purposes. -}; - -/*! - \brief Structure that contains a couple of statistics values on the current capture. - - It is used by packet.dll to return statistics about a capture session. -*/ -struct bpf_stat -{ - UINT bs_recv; ///< Number of packets that the driver received from the network adapter - ///< from the beginning of the current capture. This value includes the packets - ///< lost by the driver. - UINT bs_drop; ///< number of packets that the driver lost from the beginning of a capture. - ///< Basically, a packet is lost when the the buffer of the driver is full. - ///< In this situation the packet cannot be stored and the driver rejects it. - UINT ps_ifdrop; ///< drops by interface. XXX not yet supported - UINT bs_capt; ///< number of packets that pass the filter, find place in the kernel buffer and - ///< thus reach the application. -}; - -/*! - \brief Packet header. - - This structure defines the header associated with every packet delivered to the application. -*/ -struct bpf_hdr -{ - struct timeval bh_tstamp; ///< The timestamp associated with the captured packet. - ///< It is stored in a TimeVal structure. - UINT bh_caplen; ///< Length of captured portion. The captured portion can be different - ///< from the original packet, because it is possible (with a proper filter) - ///< to instruct the driver to capture only a portion of the packets. - UINT bh_datalen; ///< Original length of packet - USHORT bh_hdrlen; ///< Length of bpf header (this struct plus alignment padding). In some cases, - ///< a padding could be added between the end of this structure and the packet - ///< data for performance reasons. This filed can be used to retrieve the actual data - ///< of the packet. -}; - -/*! - \brief Dump packet header. - - This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets(). - It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a - packet in a dump file. This makes straightforward sending WinPcap dump files to the network. -*/ -struct dump_bpf_hdr{ - struct timeval ts; ///< Time stamp of the packet - UINT caplen; ///< Length of captured portion. The captured portion can smaller than the - ///< the original packet, because it is possible (with a proper filter) to - ///< instruct the driver to capture only a portion of the packets. - UINT len; ///< Length of the original packet (off wire). -}; - - -#endif - -struct bpf_stat; - -#define DOSNAMEPREFIX TEXT("Packet_") ///< Prefix added to the adapters device names to create the WinPcap devices -#define MAX_LINK_NAME_LENGTH 64 //< Maximum length of the devices symbolic links -#define NMAX_PACKET 65535 - -/*! - \brief Addresses of a network adapter. - - This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with - an adapter. -*/ -typedef struct npf_if_addr { - struct sockaddr_storage IPAddress; ///< IP address. - struct sockaddr_storage SubnetMask; ///< Netmask for that address. - struct sockaddr_storage Broadcast; ///< Broadcast address. -}npf_if_addr; - - -#define ADAPTER_NAME_LENGTH 256 + 12 ///< Maximum length for the name of an adapter. The value is the same used by the IP Helper API. -#define ADAPTER_DESC_LENGTH 128 ///< Maximum length for the description of an adapter. The value is the same used by the IP Helper API. -#define MAX_MAC_ADDR_LENGTH 8 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. -#define MAX_NETWORK_ADDRESSES 16 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. - - -typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API -typedef WAN_ADAPTER *PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API - -#define INFO_FLAG_NDIS_ADAPTER 0 ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter -#define INFO_FLAG_NDISWAN_ADAPTER 1 ///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET -#define INFO_FLAG_DAG_CARD 2 ///< Flag for ADAPTER_INFO: this is a DAG card -#define INFO_FLAG_DAG_FILE 6 ///< Flag for ADAPTER_INFO: this is a DAG file -#define INFO_FLAG_DONT_EXPORT 8 ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones. -#define INFO_FLAG_AIRPCAP_CARD 16 ///< Flag for ADAPTER_INFO: this is an airpcap card -#define INFO_FLAG_NPFIM_DEVICE 32 - -/*! - \brief Describes an opened network adapter. - - This structure is the most important for the functioning of packet.dll, but the great part of its fields - should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters -*/ -typedef struct _ADAPTER { - HANDLE hFile; ///< \internal Handle to an open instance of the NPF driver. - CHAR SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened. - int NumWrites; ///< \internal Number of times a packets written on this adapter will be repeated - ///< on the wire. - HANDLE ReadEvent; ///< A notification event associated with the read calls on the adapter. - ///< It can be passed to standard Win32 functions (like WaitForSingleObject - ///< or WaitForMultipleObjects) to wait until the driver's buffer contains some - ///< data. It is particularly useful in GUI applications that need to wait - ///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy() - ///< function can be used to define the minimum amount of data in the kernel buffer - ///< that will cause the event to be signalled. - - UINT ReadTimeOut; ///< \internal The amount of time after which a read on the driver will be released and - ///< ReadEvent will be signaled, also if no packets were captured - CHAR Name[ADAPTER_NAME_LENGTH]; - PWAN_ADAPTER pWanAdapter; - UINT Flags; ///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API. - -#ifdef HAVE_AIRPCAP_API - PAirpcapHandle AirpcapAd; -#endif // HAVE_AIRPCAP_API - -#ifdef HAVE_NPFIM_API - void* NpfImHandle; -#endif // HAVE_NPFIM_API - -#ifdef HAVE_DAG_API - dagc_t *pDagCard; ///< Pointer to the dagc API adapter descriptor for this adapter - PCHAR DagBuffer; ///< Pointer to the buffer with the packets that is received from the DAG card - struct timeval DagReadTimeout; ///< Read timeout. The dagc API requires a timeval structure - unsigned DagFcsLen; ///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry - DWORD DagFastProcess; ///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps). -#endif // HAVE_DAG_API -} ADAPTER, *LPADAPTER; - -/*! - \brief Structure that contains a group of packets coming from the driver. - - This structure defines the header associated with every packet delivered to the application. -*/ -typedef struct _PACKET { - HANDLE hEvent; ///< \deprecated Still present for compatibility with old applications. - OVERLAPPED OverLapped; ///< \deprecated Still present for compatibility with old applications. - PVOID Buffer; ///< Buffer with containing the packets. See the PacketReceivePacket() for - ///< details about the organization of the data in this buffer - UINT Length; ///< Length of the buffer - DWORD ulBytesReceived; ///< Number of valid bytes present in the buffer, i.e. amount of data - ///< received by the last call to PacketReceivePacket() - BOOLEAN bIoComplete; ///< \deprecated Still present for compatibility with old applications. -} PACKET, *LPPACKET; - -/*! - \brief Structure containing an OID request. - - It is used by the PacketRequest() function to send an OID to the interface card driver. - It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, - the list of the multicast groups defined on it, and so on. -*/ -struct _PACKET_OID_DATA { - ULONG Oid; ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h - ///< for a complete list of valid codes. - ULONG Length; ///< Length of the data field - UCHAR Data[1]; ///< variable-lenght field that contains the information passed to or received - ///< from the adapter. -}; -typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @} - */ - -/* -BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName, - CHAR *Value, - UINT *pValueLen, - CHAR *DefaultVal); - -BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName, - WCHAR *Value, - UINT *pValueLen, - WCHAR *DefaultVal); -*/ - -//--------------------------------------------------------------------------- -// EXPORTED FUNCTIONS -//--------------------------------------------------------------------------- - -PCHAR PacketGetVersion(); -PCHAR PacketGetDriverVersion(); -BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject,int nbytes); -BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites); -BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode); -BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject,int timeout); -BOOLEAN PacketSetBpf(LPADAPTER AdapterObject,struct bpf_program *fp); -BOOLEAN PacketSetLoopbackBehavior(LPADAPTER AdapterObject, UINT LoopbackBehavior); -INT PacketSetSnapLen(LPADAPTER AdapterObject,int snaplen); -BOOLEAN PacketGetStats(LPADAPTER AdapterObject,struct bpf_stat *s); -BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s); -BOOLEAN PacketSetBuff(LPADAPTER AdapterObject,int dim); -BOOLEAN PacketGetNetType (LPADAPTER AdapterObject,NetType *type); -LPADAPTER PacketOpenAdapter(PCHAR AdapterName); -BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync); -INT PacketSendPackets(LPADAPTER AdapterObject,PVOID PacketBuff,ULONG Size, BOOLEAN Sync); -LPPACKET PacketAllocatePacket(void); -VOID PacketInitPacket(LPPACKET lpPacket,PVOID Buffer,UINT Length); -VOID PacketFreePacket(LPPACKET lpPacket); -BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync); -BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject,ULONG Filter); -BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG BufferSize); -BOOLEAN PacketGetNetInfoEx(PCHAR AdapterName, npf_if_addr* buffer, PLONG NEntries); -BOOLEAN PacketRequest(LPADAPTER AdapterObject,BOOLEAN Set,PPACKET_OID_DATA OidData); -HANDLE PacketGetReadEvent(LPADAPTER AdapterObject); -BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void *name, int len); -BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks); -BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync); -BOOL PacketStopDriver(); -VOID PacketCloseAdapter(LPADAPTER lpAdapter); -BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength); -BOOLEAN PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags); -PAirpcapHandle PacketGetAirPcapHandle(LPADAPTER AdapterObject); - -// -// Used by PacketStartOemEx -// -#define PACKET_START_OEM_NO_NETMON 0x00000001 - -#ifdef __cplusplus -} -#endif - -#endif //__PACKET32 diff --git a/ledset/WpdPack_4_1_2/Include/Win32-Extensions.h b/ledset/WpdPack_4_1_2/Include/Win32-Extensions.h deleted file mode 100644 index ad3be25..0000000 --- a/ledset/WpdPack_4_1_2/Include/Win32-Extensions.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino, CACE Technologies - * nor the names of its contributors may be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef __WIN32_EXTENSIONS_H__ -#define __WIN32_EXTENSIONS_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Definitions */ - -/*! - \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). -*/ -struct pcap_send_queue -{ - u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field. - u_int len; ///< Current size of the queue, in bytes. - char *buffer; ///< Buffer containing the packets to be sent. -}; - -typedef struct pcap_send_queue pcap_send_queue; - -/*! - \brief This typedef is a support for the pcap_get_airpcap_handle() function -*/ -#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) -#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ -typedef struct _AirpcapHandle *PAirpcapHandle; -#endif - -#define BPF_MEM_EX_IMM 0xc0 -#define BPF_MEM_EX_IND 0xe0 - -/*used for ST*/ -#define BPF_MEM_EX 0xc0 -#define BPF_TME 0x08 - -#define BPF_LOOKUP 0x90 -#define BPF_EXECUTE 0xa0 -#define BPF_INIT 0xb0 -#define BPF_VALIDATE 0xc0 -#define BPF_SET_ACTIVE 0xd0 -#define BPF_RESET 0xe0 -#define BPF_SET_MEMORY 0x80 -#define BPF_GET_REGISTER_VALUE 0x70 -#define BPF_SET_REGISTER_VALUE 0x60 -#define BPF_SET_WORKING 0x50 -#define BPF_SET_ACTIVE_READ 0x40 -#define BPF_SET_AUTODELETION 0x30 -#define BPF_SEPARATION 0xff - -/* Prototypes */ -pcap_send_queue* pcap_sendqueue_alloc(u_int memsize); - -void pcap_sendqueue_destroy(pcap_send_queue* queue); - -int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data); - -u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync); - -HANDLE pcap_getevent(pcap_t *p); - -struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size); - -int pcap_setuserbuffer(pcap_t *p, int size); - -int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks); - -int pcap_live_dump_ended(pcap_t *p, int sync); - -int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int pcap_start_oem(char* err_str, int flags); - -PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p); - -#ifdef __cplusplus -} -#endif - -#endif //__WIN32_EXTENSIONS_H__ diff --git a/ledset/WpdPack_4_1_2/Include/bittypes.h b/ledset/WpdPack_4_1_2/Include/bittypes.h deleted file mode 100644 index 558a0b5..0000000 --- a/ledset/WpdPack_4_1_2/Include/bittypes.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (C) 1999 WIDE Project. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the project nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#ifndef _BITTYPES_H -#define _BITTYPES_H - -#ifndef HAVE_U_INT8_T - -#if SIZEOF_CHAR == 1 -typedef unsigned char u_int8_t; -typedef signed char int8_t; -#elif SIZEOF_INT == 1 -typedef unsigned int u_int8_t; -typedef signed int int8_t; -#else /* XXX */ -#error "there's no appropriate type for u_int8_t" -#endif -#define HAVE_U_INT8_T 1 -#define HAVE_INT8_T 1 - -#endif /* HAVE_U_INT8_T */ - -#ifndef HAVE_U_INT16_T - -#if SIZEOF_SHORT == 2 -typedef unsigned short u_int16_t; -typedef signed short int16_t; -#elif SIZEOF_INT == 2 -typedef unsigned int u_int16_t; -typedef signed int int16_t; -#elif SIZEOF_CHAR == 2 -typedef unsigned char u_int16_t; -typedef signed char int16_t; -#else /* XXX */ -#error "there's no appropriate type for u_int16_t" -#endif -#define HAVE_U_INT16_T 1 -#define HAVE_INT16_T 1 - -#endif /* HAVE_U_INT16_T */ - -#ifndef HAVE_U_INT32_T - -#if SIZEOF_INT == 4 -typedef unsigned int u_int32_t; -typedef signed int int32_t; -#elif SIZEOF_LONG == 4 -typedef unsigned long u_int32_t; -typedef signed long int32_t; -#elif SIZEOF_SHORT == 4 -typedef unsigned short u_int32_t; -typedef signed short int32_t; -#else /* XXX */ -#error "there's no appropriate type for u_int32_t" -#endif -#define HAVE_U_INT32_T 1 -#define HAVE_INT32_T 1 - -#endif /* HAVE_U_INT32_T */ - -#ifndef HAVE_U_INT64_T -#if SIZEOF_LONG_LONG == 8 -typedef unsigned long long u_int64_t; -typedef long long int64_t; -#elif defined(_MSC_EXTENSIONS) -typedef unsigned _int64 u_int64_t; -typedef _int64 int64_t; -#elif SIZEOF_INT == 8 -typedef unsigned int u_int64_t; -#elif SIZEOF_LONG == 8 -typedef unsigned long u_int64_t; -#elif SIZEOF_SHORT == 8 -typedef unsigned short u_int64_t; -#else /* XXX */ -#error "there's no appropriate type for u_int64_t" -#endif - -#endif /* HAVE_U_INT64_T */ - -#ifndef PRId64 -#ifdef _MSC_EXTENSIONS -#define PRId64 "I64d" -#else /* _MSC_EXTENSIONS */ -#define PRId64 "lld" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRId64 */ - -#ifndef PRIo64 -#ifdef _MSC_EXTENSIONS -#define PRIo64 "I64o" -#else /* _MSC_EXTENSIONS */ -#define PRIo64 "llo" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIo64 */ - -#ifndef PRIx64 -#ifdef _MSC_EXTENSIONS -#define PRIx64 "I64x" -#else /* _MSC_EXTENSIONS */ -#define PRIx64 "llx" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIx64 */ - -#ifndef PRIu64 -#ifdef _MSC_EXTENSIONS -#define PRIu64 "I64u" -#else /* _MSC_EXTENSIONS */ -#define PRIu64 "llu" -#endif /* _MSC_EXTENSIONS */ -#endif /* PRIu64 */ - -#endif /* _BITTYPES_H */ diff --git a/ledset/WpdPack_4_1_2/Include/ip6_misc.h b/ledset/WpdPack_4_1_2/Include/ip6_misc.h deleted file mode 100644 index 562fa61..0000000 --- a/ledset/WpdPack_4_1_2/Include/ip6_misc.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (c) 1993, 1994, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that: (1) source code distributions - * retain the above copyright notice and this paragraph in its entirety, (2) - * distributions including binary code include the above copyright notice and - * this paragraph in its entirety in the documentation or other materials - * provided with the distribution, and (3) all advertising materials mentioning - * features or use of this software display the following acknowledgement: - * ``This product includes software developed by the University of California, - * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of - * the University nor the names of its contributors may be used to endorse - * or promote products derived from this software without specific prior - * written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.5 2006-01-22 18:02:18 gianluca Exp $ (LBL) - */ - -/* - * This file contains a collage of declarations for IPv6 from FreeBSD not present in Windows - */ - -#include - -#include - -#ifndef __MINGW32__ -#define IN_MULTICAST(a) IN_CLASSD(a) -#endif - -#define IN_EXPERIMENTAL(a) ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000) - -#define IN_LOOPBACKNET 127 - -#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) -/* IPv6 address */ -struct in6_addr - { - union - { - u_int8_t u6_addr8[16]; - u_int16_t u6_addr16[8]; - u_int32_t u6_addr32[4]; - } in6_u; -#define s6_addr in6_u.u6_addr8 -#define s6_addr16 in6_u.u6_addr16 -#define s6_addr32 in6_u.u6_addr32 -#define s6_addr64 in6_u.u6_addr64 - }; - -#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } -#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } -#endif /* __MINGW32__ */ - - -#if (defined _MSC_VER) || (defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)) -typedef unsigned short sa_family_t; -#endif - - -#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -/* Ditto, for IPv6. */ -struct sockaddr_in6 - { - __SOCKADDR_COMMON (sin6_); - u_int16_t sin6_port; /* Transport layer port # */ - u_int32_t sin6_flowinfo; /* IPv6 flow information */ - struct in6_addr sin6_addr; /* IPv6 address */ - }; - -#define IN6_IS_ADDR_V4MAPPED(a) \ - ((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \ - (((u_int32_t *) (a))[2] == htonl (0xffff))) - -#define IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff) - -#define IN6_IS_ADDR_LINKLOCAL(a) \ - ((((u_int32_t *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000)) - -#define IN6_IS_ADDR_LOOPBACK(a) \ - (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \ - ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1)) -#endif /* __MINGW32__ */ - -#define ip6_vfc ip6_ctlun.ip6_un2_vfc -#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow -#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen -#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt -#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim -#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim - -#define nd_rd_type nd_rd_hdr.icmp6_type -#define nd_rd_code nd_rd_hdr.icmp6_code -#define nd_rd_cksum nd_rd_hdr.icmp6_cksum -#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0] - -/* - * IPV6 extension headers - */ -#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */ -#define IPPROTO_IPV6 41 /* IPv6 header. */ -#define IPPROTO_ROUTING 43 /* IPv6 routing header */ -#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ -#define IPPROTO_ESP 50 /* encapsulating security payload */ -#define IPPROTO_AH 51 /* authentication header */ -#define IPPROTO_ICMPV6 58 /* ICMPv6 */ -#define IPPROTO_NONE 59 /* IPv6 no next header */ -#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ -#define IPPROTO_PIM 103 /* Protocol Independent Multicast. */ - -#define IPV6_RTHDR_TYPE_0 0 - -/* Option types and related macros */ -#define IP6OPT_PAD1 0x00 /* 00 0 00000 */ -#define IP6OPT_PADN 0x01 /* 00 0 00001 */ -#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */ -#define IP6OPT_JUMBO_LEN 6 -#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 */ - -#define IP6OPT_RTALERT_LEN 4 -#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */ -#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */ -#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */ -#define IP6OPT_MINLEN 2 - -#define IP6OPT_BINDING_UPDATE 0xc6 /* 11 0 00110 */ -#define IP6OPT_BINDING_ACK 0x07 /* 00 0 00111 */ -#define IP6OPT_BINDING_REQ 0x08 /* 00 0 01000 */ -#define IP6OPT_HOME_ADDRESS 0xc9 /* 11 0 01001 */ -#define IP6OPT_EID 0x8a /* 10 0 01010 */ - -#define IP6OPT_TYPE(o) ((o) & 0xC0) -#define IP6OPT_TYPE_SKIP 0x00 -#define IP6OPT_TYPE_DISCARD 0x40 -#define IP6OPT_TYPE_FORCEICMP 0x80 -#define IP6OPT_TYPE_ICMP 0xC0 - -#define IP6OPT_MUTABLE 0x20 - - -#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) -#ifndef EAI_ADDRFAMILY -struct addrinfo { - int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ - int ai_family; /* PF_xxx */ - int ai_socktype; /* SOCK_xxx */ - int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ - size_t ai_addrlen; /* length of ai_addr */ - char *ai_canonname; /* canonical name for hostname */ - struct sockaddr *ai_addr; /* binary address */ - struct addrinfo *ai_next; /* next structure in linked list */ -}; -#endif -#endif /* __MINGW32__ */ diff --git a/ledset/WpdPack_4_1_2/Include/pcap-stdinc.h b/ledset/WpdPack_4_1_2/Include/pcap-stdinc.h deleted file mode 100644 index 4176041..0000000 --- a/ledset/WpdPack_4_1_2/Include/pcap-stdinc.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-stdinc.h,v 1.10.2.1 2008-10-06 15:38:39 gianluca Exp $ (LBL) - */ - -#define SIZEOF_CHAR 1 -#define SIZEOF_SHORT 2 -#define SIZEOF_INT 4 -#ifndef _MSC_EXTENSIONS -#define SIZEOF_LONG_LONG 8 -#endif - -/* - * Avoids a compiler warning in case this was already defined - * (someone defined _WINSOCKAPI_ when including 'windows.h', in order - * to prevent it from including 'winsock.h') - */ -#ifdef _WINSOCKAPI_ -#undef _WINSOCKAPI_ -#endif -#include - -#include - -#include "bittypes.h" -#include -#include - -#ifndef __MINGW32__ -#include "IP6_misc.h" -#endif - -#define caddr_t char* - -#if _MSC_VER < 1500 -#define snprintf _snprintf -#define vsnprintf _vsnprintf -#define strdup _strdup -#endif - -#define inline __inline - -#ifdef __MINGW32__ -#include -#else /*__MINGW32__*/ -/* MSVC compiler */ -#ifndef _UINTPTR_T_DEFINED -#ifdef _WIN64 -typedef unsigned __int64 uintptr_t; -#else -typedef _W64 unsigned int uintptr_t; -#endif -#define _UINTPTR_T_DEFINED -#endif - -#ifndef _INTPTR_T_DEFINED -#ifdef _WIN64 -typedef __int64 intptr_t; -#else -typedef _W64 int intptr_t; -#endif -#define _INTPTR_T_DEFINED -#endif - -#endif /*__MINGW32__*/ diff --git a/ledset/WpdPack_4_1_2/Include/pcap/bpf.h b/ledset/WpdPack_4_1_2/Include/pcap/bpf.h deleted file mode 100644 index 9f4ca33..0000000 --- a/ledset/WpdPack_4_1_2/Include/pcap/bpf.h +++ /dev/null @@ -1,934 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from the Stanford/CMU enet packet filter, - * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence - * Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)bpf.h 7.1 (Berkeley) 5/7/91 - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.19.2.8 2008-09-22 20:16:01 guy Exp $ (LBL) - */ - -/* - * This is libpcap's cut-down version of bpf.h; it includes only - * the stuff needed for the code generator and the userland BPF - * interpreter, and the libpcap APIs for setting filters, etc.. - * - * "pcap-bpf.c" will include the native OS version, as it deals with - * the OS's BPF implementation. - * - * XXX - should this all just be moved to "pcap.h"? - */ - -#ifndef BPF_MAJOR_VERSION - -#ifdef __cplusplus -extern "C" { -#endif - -/* BSD style release date */ -#define BPF_RELEASE 199606 - -#ifdef MSDOS /* must be 32-bit */ -typedef long bpf_int32; -typedef unsigned long bpf_u_int32; -#else -typedef int bpf_int32; -typedef u_int bpf_u_int32; -#endif - -/* - * Alignment macros. BPF_WORDALIGN rounds up to the next - * even multiple of BPF_ALIGNMENT. - */ -#ifndef __NetBSD__ -#define BPF_ALIGNMENT sizeof(bpf_int32) -#else -#define BPF_ALIGNMENT sizeof(long) -#endif -#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) - -#define BPF_MAXBUFSIZE 0x8000 -#define BPF_MINBUFSIZE 32 - -/* - * Structure for "pcap_compile()", "pcap_setfilter()", etc.. - */ -struct bpf_program { - u_int bf_len; - struct bpf_insn *bf_insns; -}; - -/* - * Struct return by BIOCVERSION. This represents the version number of - * the filter language described by the instruction encodings below. - * bpf understands a program iff kernel_major == filter_major && - * kernel_minor >= filter_minor, that is, if the value returned by the - * running kernel has the same major number and a minor number equal - * equal to or less than the filter being downloaded. Otherwise, the - * results are undefined, meaning an error may be returned or packets - * may be accepted haphazardly. - * It has nothing to do with the source code version. - */ -struct bpf_version { - u_short bv_major; - u_short bv_minor; -}; -/* Current version number of filter architecture. */ -#define BPF_MAJOR_VERSION 1 -#define BPF_MINOR_VERSION 1 - -/* - * Data-link level type codes. - * - * Do *NOT* add new values to this list without asking - * "tcpdump-workers@lists.tcpdump.org" for a value. Otherwise, you run - * the risk of using a value that's already being used for some other - * purpose, and of having tools that read libpcap-format captures not - * being able to handle captures with your new DLT_ value, with no hope - * that they will ever be changed to do so (as that would destroy their - * ability to read captures using that value for that other purpose). - */ - -/* - * These are the types that are the same on all platforms, and that - * have been defined by for ages. - */ -#define DLT_NULL 0 /* BSD loopback encapsulation */ -#define DLT_EN10MB 1 /* Ethernet (10Mb) */ -#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */ -#define DLT_AX25 3 /* Amateur Radio AX.25 */ -#define DLT_PRONET 4 /* Proteon ProNET Token Ring */ -#define DLT_CHAOS 5 /* Chaos */ -#define DLT_IEEE802 6 /* 802.5 Token Ring */ -#define DLT_ARCNET 7 /* ARCNET, with BSD-style header */ -#define DLT_SLIP 8 /* Serial Line IP */ -#define DLT_PPP 9 /* Point-to-point Protocol */ -#define DLT_FDDI 10 /* FDDI */ - -/* - * These are types that are different on some platforms, and that - * have been defined by for ages. We use #ifdefs to - * detect the BSDs that define them differently from the traditional - * libpcap - * - * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS, - * but I don't know what the right #define is for BSD/OS. - */ -#define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */ - -#ifdef __OpenBSD__ -#define DLT_RAW 14 /* raw IP */ -#else -#define DLT_RAW 12 /* raw IP */ -#endif - -/* - * Given that the only OS that currently generates BSD/OS SLIP or PPP - * is, well, BSD/OS, arguably everybody should have chosen its values - * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they - * didn't. So it goes. - */ -#if defined(__NetBSD__) || defined(__FreeBSD__) -#ifndef DLT_SLIP_BSDOS -#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */ -#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */ -#endif -#else -#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */ -#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */ -#endif - -/* - * 17 is used for DLT_OLD_PFLOG in OpenBSD; - * OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below. - * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else. - */ - -#define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */ - -/* - * Apparently Redback uses this for its SmartEdge 400/800. I hope - * nobody else decided to use it, too. - */ -#define DLT_REDBACK_SMARTEDGE 32 - -/* - * These values are defined by NetBSD; other platforms should refrain from - * using them for other purposes, so that NetBSD savefiles with link - * types of 50 or 51 can be read as this type on all platforms. - */ -#define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */ -#define DLT_PPP_ETHER 51 /* PPP over Ethernet */ - -/* - * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses - * a link-layer type of 99 for the tcpdump it supplies. The link-layer - * header has 6 bytes of unknown data, something that appears to be an - * Ethernet type, and 36 bytes that appear to be 0 in at least one capture - * I've seen. - */ -#define DLT_SYMANTEC_FIREWALL 99 - -/* - * Values between 100 and 103 are used in capture file headers as - * link-layer types corresponding to DLT_ types that differ - * between platforms; don't use those values for new DLT_ new types. - */ - -/* - * This value was defined by libpcap 0.5; platforms that have defined - * it with a different value should define it here with that value - - * a link type of 104 in a save file will be mapped to DLT_C_HDLC, - * whatever value that happens to be, so programs will correctly - * handle files with that link type regardless of the value of - * DLT_C_HDLC. - * - * The name DLT_C_HDLC was used by BSD/OS; we use that name for source - * compatibility with programs written for BSD/OS. - * - * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well, - * for source compatibility with programs written for libpcap 0.5. - */ -#define DLT_C_HDLC 104 /* Cisco HDLC */ -#define DLT_CHDLC DLT_C_HDLC - -#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */ - -/* - * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW, - * except when it isn't. (I.e., sometimes it's just raw IP, and - * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL, - * so that we don't have to worry about the link-layer header.) - */ - -/* - * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides - * with other values. - * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header - * (DLCI, etc.). - */ -#define DLT_FRELAY 107 - -/* - * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except - * that the AF_ type in the link-layer header is in network byte order. - * - * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so - * we don't use 12 for it in OSes other than OpenBSD. - */ -#ifdef __OpenBSD__ -#define DLT_LOOP 12 -#else -#define DLT_LOOP 108 -#endif - -/* - * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's - * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other - * than OpenBSD. - */ -#ifdef __OpenBSD__ -#define DLT_ENC 13 -#else -#define DLT_ENC 109 -#endif - -/* - * Values between 110 and 112 are reserved for use in capture file headers - * as link-layer types corresponding to DLT_ types that might differ - * between platforms; don't use those values for new DLT_ types - * other than the corresponding DLT_ types. - */ - -/* - * This is for Linux cooked sockets. - */ -#define DLT_LINUX_SLL 113 - -/* - * Apple LocalTalk hardware. - */ -#define DLT_LTALK 114 - -/* - * Acorn Econet. - */ -#define DLT_ECONET 115 - -/* - * Reserved for use with OpenBSD ipfilter. - */ -#define DLT_IPFILTER 116 - -/* - * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023 - * in SuSE 6.3, so we can't use 17 for it in capture-file headers. - * - * XXX: is there a conflict with DLT_PFSYNC 18 as well? - */ -#ifdef __OpenBSD__ -#define DLT_OLD_PFLOG 17 -#define DLT_PFSYNC 18 -#endif -#define DLT_PFLOG 117 - -/* - * Registered for Cisco-internal use. - */ -#define DLT_CISCO_IOS 118 - -/* - * For 802.11 cards using the Prism II chips, with a link-layer - * header including Prism monitor mode information plus an 802.11 - * header. - */ -#define DLT_PRISM_HEADER 119 - -/* - * Reserved for Aironet 802.11 cards, with an Aironet link-layer header - * (see Doug Ambrisko's FreeBSD patches). - */ -#define DLT_AIRONET_HEADER 120 - -/* - * Reserved for Siemens HiPath HDLC. - */ -#define DLT_HHDLC 121 - -/* - * This is for RFC 2625 IP-over-Fibre Channel. - * - * This is not for use with raw Fibre Channel, where the link-layer - * header starts with a Fibre Channel frame header; it's for IP-over-FC, - * where the link-layer header starts with an RFC 2625 Network_Header - * field. - */ -#define DLT_IP_OVER_FC 122 - -/* - * This is for Full Frontal ATM on Solaris with SunATM, with a - * pseudo-header followed by an AALn PDU. - * - * There may be other forms of Full Frontal ATM on other OSes, - * with different pseudo-headers. - * - * If ATM software returns a pseudo-header with VPI/VCI information - * (and, ideally, packet type information, e.g. signalling, ILMI, - * LANE, LLC-multiplexed traffic, etc.), it should not use - * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump - * and the like don't have to infer the presence or absence of a - * pseudo-header and the form of the pseudo-header. - */ -#define DLT_SUNATM 123 /* Solaris+SunATM */ - -/* - * Reserved as per request from Kent Dahlgren - * for private use. - */ -#define DLT_RIO 124 /* RapidIO */ -#define DLT_PCI_EXP 125 /* PCI Express */ -#define DLT_AURORA 126 /* Xilinx Aurora link layer */ - -/* - * Header for 802.11 plus a number of bits of link-layer information - * including radio information, used by some recent BSD drivers as - * well as the madwifi Atheros driver for Linux. - */ -#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */ - -/* - * Reserved for the TZSP encapsulation, as per request from - * Chris Waters - * TZSP is a generic encapsulation for any other link type, - * which includes a means to include meta-information - * with the packet, e.g. signal strength and channel - * for 802.11 packets. - */ -#define DLT_TZSP 128 /* Tazmen Sniffer Protocol */ - -/* - * BSD's ARCNET headers have the source host, destination host, - * and type at the beginning of the packet; that's what's handed - * up to userland via BPF. - * - * Linux's ARCNET headers, however, have a 2-byte offset field - * between the host IDs and the type; that's what's handed up - * to userland via PF_PACKET sockets. - * - * We therefore have to have separate DLT_ values for them. - */ -#define DLT_ARCNET_LINUX 129 /* ARCNET */ - -/* - * Juniper-private data link types, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, etc.. - */ -#define DLT_JUNIPER_MLPPP 130 -#define DLT_JUNIPER_MLFR 131 -#define DLT_JUNIPER_ES 132 -#define DLT_JUNIPER_GGSN 133 -#define DLT_JUNIPER_MFR 134 -#define DLT_JUNIPER_ATM2 135 -#define DLT_JUNIPER_SERVICES 136 -#define DLT_JUNIPER_ATM1 137 - -/* - * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund - * . The header that's presented is an Ethernet-like - * header: - * - * #define FIREWIRE_EUI64_LEN 8 - * struct firewire_header { - * u_char firewire_dhost[FIREWIRE_EUI64_LEN]; - * u_char firewire_shost[FIREWIRE_EUI64_LEN]; - * u_short firewire_type; - * }; - * - * with "firewire_type" being an Ethernet type value, rather than, - * for example, raw GASP frames being handed up. - */ -#define DLT_APPLE_IP_OVER_IEEE1394 138 - -/* - * Various SS7 encapsulations, as per a request from Jeff Morriss - * and subsequent discussions. - */ -#define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */ -#define DLT_MTP2 140 /* MTP2, without pseudo-header */ -#define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */ -#define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */ - -/* - * DOCSIS MAC frames. - */ -#define DLT_DOCSIS 143 - -/* - * Linux-IrDA packets. Protocol defined at http://www.irda.org. - * Those packets include IrLAP headers and above (IrLMP...), but - * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy - * framing can be handled by the hardware and depend on the bitrate. - * This is exactly the format you would get capturing on a Linux-IrDA - * interface (irdaX), but not on a raw serial port. - * Note the capture is done in "Linux-cooked" mode, so each packet include - * a fake packet header (struct sll_header). This is because IrDA packet - * decoding is dependant on the direction of the packet (incomming or - * outgoing). - * When/if other platform implement IrDA capture, we may revisit the - * issue and define a real DLT_IRDA... - * Jean II - */ -#define DLT_LINUX_IRDA 144 - -/* - * Reserved for IBM SP switch and IBM Next Federation switch. - */ -#define DLT_IBM_SP 145 -#define DLT_IBM_SN 146 - -/* - * Reserved for private use. If you have some link-layer header type - * that you want to use within your organization, with the capture files - * using that link-layer header type not ever be sent outside your - * organization, you can use these values. - * - * No libpcap release will use these for any purpose, nor will any - * tcpdump release use them, either. - * - * Do *NOT* use these in capture files that you expect anybody not using - * your private versions of capture-file-reading tools to read; in - * particular, do *NOT* use them in products, otherwise you may find that - * people won't be able to use tcpdump, or snort, or Ethereal, or... to - * read capture files from your firewall/intrusion detection/traffic - * monitoring/etc. appliance, or whatever product uses that DLT_ value, - * and you may also find that the developers of those applications will - * not accept patches to let them read those files. - * - * Also, do not use them if somebody might send you a capture using them - * for *their* private type and tools using them for *your* private type - * would have to read them. - * - * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value, - * as per the comment above, and use the type you're given. - */ -#define DLT_USER0 147 -#define DLT_USER1 148 -#define DLT_USER2 149 -#define DLT_USER3 150 -#define DLT_USER4 151 -#define DLT_USER5 152 -#define DLT_USER6 153 -#define DLT_USER7 154 -#define DLT_USER8 155 -#define DLT_USER9 156 -#define DLT_USER10 157 -#define DLT_USER11 158 -#define DLT_USER12 159 -#define DLT_USER13 160 -#define DLT_USER14 161 -#define DLT_USER15 162 - -/* - * For future use with 802.11 captures - defined by AbsoluteValue - * Systems to store a number of bits of link-layer information - * including radio information: - * - * http://www.shaftnet.org/~pizza/software/capturefrm.txt - * - * but it might be used by some non-AVS drivers now or in the - * future. - */ -#define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */ - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, etc.. - */ -#define DLT_JUNIPER_MONITOR 164 - -/* - * Reserved for BACnet MS/TP. - */ -#define DLT_BACNET_MS_TP 165 - -/* - * Another PPP variant as per request from Karsten Keil . - * - * This is used in some OSes to allow a kernel socket filter to distinguish - * between incoming and outgoing packets, on a socket intended to - * supply pppd with outgoing packets so it can do dial-on-demand and - * hangup-on-lack-of-demand; incoming packets are filtered out so they - * don't cause pppd to hold the connection up (you don't want random - * input packets such as port scans, packets from old lost connections, - * etc. to force the connection to stay up). - * - * The first byte of the PPP header (0xff03) is modified to accomodate - * the direction - 0x00 = IN, 0x01 = OUT. - */ -#define DLT_PPP_PPPD 166 - -/* - * Names for backwards compatibility with older versions of some PPP - * software; new software should use DLT_PPP_PPPD. - */ -#define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD -#define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, cookies, etc.. - */ -#define DLT_JUNIPER_PPPOE 167 -#define DLT_JUNIPER_PPPOE_ATM 168 - -#define DLT_GPRS_LLC 169 /* GPRS LLC */ -#define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */ -#define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */ - -/* - * Requested by Oolan Zimmer for use in Gcom's T1/E1 line - * monitoring equipment. - */ -#define DLT_GCOM_T1E1 172 -#define DLT_GCOM_SERIAL 173 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_ is used - * for internal communication to Physical Interface Cards (PIC) - */ -#define DLT_JUNIPER_PIC_PEER 174 - -/* - * Link types requested by Gregor Maier of Endace - * Measurement Systems. They add an ERF header (see - * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of - * the link-layer header. - */ -#define DLT_ERF_ETH 175 /* Ethernet */ -#define DLT_ERF_POS 176 /* Packet-over-SONET */ - -/* - * Requested by Daniele Orlandi for raw LAPD - * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header - * includes additional information before the LAPD header, so it's - * not necessarily a generic LAPD header. - */ -#define DLT_LINUX_LAPD 177 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ are used for prepending meta-information - * like interface index, interface name - * before standard Ethernet, PPP, Frelay & C-HDLC Frames - */ -#define DLT_JUNIPER_ETHER 178 -#define DLT_JUNIPER_PPP 179 -#define DLT_JUNIPER_FRELAY 180 -#define DLT_JUNIPER_CHDLC 181 - -/* - * Multi Link Frame Relay (FRF.16) - */ -#define DLT_MFR 182 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for internal communication with a - * voice Adapter Card (PIC) - */ -#define DLT_JUNIPER_VP 183 - -/* - * Arinc 429 frames. - * DLT_ requested by Gianluca Varenni . - * Every frame contains a 32bit A429 label. - * More documentation on Arinc 429 can be found at - * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf - */ -#define DLT_A429 184 - -/* - * Arinc 653 Interpartition Communication messages. - * DLT_ requested by Gianluca Varenni . - * Please refer to the A653-1 standard for more information. - */ -#define DLT_A653_ICM 185 - -/* - * USB packets, beginning with a USB setup header; requested by - * Paolo Abeni . - */ -#define DLT_USB 186 - -/* - * Bluetooth HCI UART transport layer (part H:4); requested by - * Paolo Abeni. - */ -#define DLT_BLUETOOTH_HCI_H4 187 - -/* - * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz - * . - */ -#define DLT_IEEE802_16_MAC_CPS 188 - -/* - * USB packets, beginning with a Linux USB header; requested by - * Paolo Abeni . - */ -#define DLT_USB_LINUX 189 - -/* - * Controller Area Network (CAN) v. 2.0B packets. - * DLT_ requested by Gianluca Varenni . - * Used to dump CAN packets coming from a CAN Vector board. - * More documentation on the CAN v2.0B frames can be found at - * http://www.can-cia.org/downloads/?269 - */ -#define DLT_CAN20B 190 - -/* - * IEEE 802.15.4, with address fields padded, as is done by Linux - * drivers; requested by Juergen Schimmer. - */ -#define DLT_IEEE802_15_4_LINUX 191 - -/* - * Per Packet Information encapsulated packets. - * DLT_ requested by Gianluca Varenni . - */ -#define DLT_PPI 192 - -/* - * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header; - * requested by Charles Clancy. - */ -#define DLT_IEEE802_16_MAC_CPS_RADIO 193 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for internal communication with a - * integrated service module (ISM). - */ -#define DLT_JUNIPER_ISM 194 - -/* - * IEEE 802.15.4, exactly as it appears in the spec (no padding, no - * nothing); requested by Mikko Saarnivala . - */ -#define DLT_IEEE802_15_4 195 - -/* - * Various link-layer types, with a pseudo-header, for SITA - * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com). - */ -#define DLT_SITA 196 - -/* - * Various link-layer types, with a pseudo-header, for Endace DAG cards; - * encapsulates Endace ERF records. Requested by Stephen Donnelly - * . - */ -#define DLT_ERF 197 - -/* - * Special header prepended to Ethernet packets when capturing from a - * u10 Networks board. Requested by Phil Mulholland - * . - */ -#define DLT_RAIF1 198 - -/* - * IPMB packet for IPMI, beginning with the I2C slave address, followed - * by the netFn and LUN, etc.. Requested by Chanthy Toeung - * . - */ -#define DLT_IPMB 199 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for capturing data on a secure tunnel interface. - */ -#define DLT_JUNIPER_ST 200 - -/* - * Bluetooth HCI UART transport layer (part H:4), with pseudo-header - * that includes direction information; requested by Paolo Abeni. - */ -#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201 - -/* - * AX.25 packet with a 1-byte KISS header; see - * - * http://www.ax25.net/kiss.htm - * - * as per Richard Stearn . - */ -#define DLT_AX25_KISS 202 - -/* - * LAPD packets from an ISDN channel, starting with the address field, - * with no pseudo-header. - * Requested by Varuna De Silva . - */ -#define DLT_LAPD 203 - -/* - * Variants of various link-layer headers, with a one-byte direction - * pseudo-header prepended - zero means "received by this host", - * non-zero (any non-zero value) means "sent by this host" - as per - * Will Barker . - */ -#define DLT_PPP_WITH_DIR 204 /* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */ -#define DLT_C_HDLC_WITH_DIR 205 /* Cisco HDLC */ -#define DLT_FRELAY_WITH_DIR 206 /* Frame Relay */ -#define DLT_LAPB_WITH_DIR 207 /* LAPB */ - -/* - * 208 is reserved for an as-yet-unspecified proprietary link-layer - * type, as requested by Will Barker. - */ - -/* - * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman - * . - */ -#define DLT_IPMB_LINUX 209 - -/* - * FlexRay automotive bus - http://www.flexray.com/ - as requested - * by Hannes Kaelber . - */ -#define DLT_FLEXRAY 210 - -/* - * Media Oriented Systems Transport (MOST) bus for multimedia - * transport - http://www.mostcooperation.com/ - as requested - * by Hannes Kaelber . - */ -#define DLT_MOST 211 - -/* - * Local Interconnect Network (LIN) bus for vehicle networks - - * http://www.lin-subbus.org/ - as requested by Hannes Kaelber - * . - */ -#define DLT_LIN 212 - -/* - * X2E-private data link type used for serial line capture, - * as requested by Hannes Kaelber . - */ -#define DLT_X2E_SERIAL 213 - -/* - * X2E-private data link type used for the Xoraya data logger - * family, as requested by Hannes Kaelber . - */ -#define DLT_X2E_XORAYA 214 - -/* - * IEEE 802.15.4, exactly as it appears in the spec (no padding, no - * nothing), but with the PHY-level data for non-ASK PHYs (4 octets - * of 0 as preamble, one octet of SFD, one octet of frame length+ - * reserved bit, and then the MAC-layer data, starting with the - * frame control field). - * - * Requested by Max Filippov . - */ -#define DLT_IEEE802_15_4_NONASK_PHY 215 - - -/* - * DLT and savefile link type values are split into a class and - * a member of that class. A class value of 0 indicates a regular - * DLT_/LINKTYPE_ value. - */ -#define DLT_CLASS(x) ((x) & 0x03ff0000) - -/* - * NetBSD-specific generic "raw" link type. The class value indicates - * that this is the generic raw type, and the lower 16 bits are the - * address family we're dealing with. Those values are NetBSD-specific; - * do not assume that they correspond to AF_ values for your operating - * system. - */ -#define DLT_CLASS_NETBSD_RAWAF 0x02240000 -#define DLT_NETBSD_RAWAF(af) (DLT_CLASS_NETBSD_RAWAF | (af)) -#define DLT_NETBSD_RAWAF_AF(x) ((x) & 0x0000ffff) -#define DLT_IS_NETBSD_RAWAF(x) (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF) - - -/* - * The instruction encodings. - */ -/* instruction classes */ -#define BPF_CLASS(code) ((code) & 0x07) -#define BPF_LD 0x00 -#define BPF_LDX 0x01 -#define BPF_ST 0x02 -#define BPF_STX 0x03 -#define BPF_ALU 0x04 -#define BPF_JMP 0x05 -#define BPF_RET 0x06 -#define BPF_MISC 0x07 - -/* ld/ldx fields */ -#define BPF_SIZE(code) ((code) & 0x18) -#define BPF_W 0x00 -#define BPF_H 0x08 -#define BPF_B 0x10 -#define BPF_MODE(code) ((code) & 0xe0) -#define BPF_IMM 0x00 -#define BPF_ABS 0x20 -#define BPF_IND 0x40 -#define BPF_MEM 0x60 -#define BPF_LEN 0x80 -#define BPF_MSH 0xa0 - -/* alu/jmp fields */ -#define BPF_OP(code) ((code) & 0xf0) -#define BPF_ADD 0x00 -#define BPF_SUB 0x10 -#define BPF_MUL 0x20 -#define BPF_DIV 0x30 -#define BPF_OR 0x40 -#define BPF_AND 0x50 -#define BPF_LSH 0x60 -#define BPF_RSH 0x70 -#define BPF_NEG 0x80 -#define BPF_JA 0x00 -#define BPF_JEQ 0x10 -#define BPF_JGT 0x20 -#define BPF_JGE 0x30 -#define BPF_JSET 0x40 -#define BPF_SRC(code) ((code) & 0x08) -#define BPF_K 0x00 -#define BPF_X 0x08 - -/* ret - BPF_K and BPF_X also apply */ -#define BPF_RVAL(code) ((code) & 0x18) -#define BPF_A 0x10 - -/* misc */ -#define BPF_MISCOP(code) ((code) & 0xf8) -#define BPF_TAX 0x00 -#define BPF_TXA 0x80 - -/* - * The instruction data structure. - */ -struct bpf_insn { - u_short code; - u_char jt; - u_char jf; - bpf_u_int32 k; -}; - -/* - * Macros for insn array initializers. - */ -#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } -#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } - -#if __STDC__ || defined(__cplusplus) -extern int bpf_validate(const struct bpf_insn *, int); -extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); -#else -extern int bpf_validate(); -extern u_int bpf_filter(); -#endif - -/* - * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). - */ -#define BPF_MEMWORDS 16 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ledset/WpdPack_4_1_2/Include/pcap/pcap.h b/ledset/WpdPack_4_1_2/Include/pcap/pcap.h deleted file mode 100644 index ad8fc40..0000000 --- a/ledset/WpdPack_4_1_2/Include/pcap/pcap.h +++ /dev/null @@ -1,407 +0,0 @@ -/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ -/* - * Copyright (c) 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/pcap.h,v 1.4.2.11 2008-10-06 15:38:39 gianluca Exp $ (LBL) - */ - -#ifndef lib_pcap_pcap_h -#define lib_pcap_pcap_h - -#if defined(WIN32) - #include -#elif defined(MSDOS) - #include - #include /* u_int, u_char etc. */ -#else /* UN*X */ - #include - #include -#endif /* WIN32/MSDOS/UN*X */ - -#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H -#include -#endif - -#include - -#ifdef HAVE_REMOTE - // We have to define the SOCKET here, although it has been defined in sockutils.h - // This is to avoid the distribution of the 'sockutils.h' file around - // (for example in the WinPcap developer's pack) - #ifndef SOCKET - #ifdef WIN32 - #define SOCKET unsigned int - #else - #define SOCKET int - #endif - #endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define PCAP_VERSION_MAJOR 2 -#define PCAP_VERSION_MINOR 4 - -#define PCAP_ERRBUF_SIZE 256 - -/* - * Compatibility for systems that have a bpf.h that - * predates the bpf typedefs for 64-bit support. - */ -#if BPF_RELEASE - 0 < 199406 -typedef int bpf_int32; -typedef u_int bpf_u_int32; -#endif - -typedef struct pcap pcap_t; -typedef struct pcap_dumper pcap_dumper_t; -typedef struct pcap_if pcap_if_t; -typedef struct pcap_addr pcap_addr_t; - -/* - * The first record in the file contains saved values for some - * of the flags used in the printout phases of tcpdump. - * Many fields here are 32 bit ints so compilers won't insert unwanted - * padding; these files need to be interchangeable across architectures. - * - * Do not change the layout of this structure, in any way (this includes - * changes that only affect the length of fields in this structure). - * - * Also, do not change the interpretation of any of the members of this - * structure, in any way (this includes using values other than - * LINKTYPE_ values, as defined in "savefile.c", in the "linktype" - * field). - * - * Instead: - * - * introduce a new structure for the new format, if the layout - * of the structure changed; - * - * send mail to "tcpdump-workers@lists.tcpdump.org", requesting - * a new magic number for your new capture file format, and, when - * you get the new magic number, put it in "savefile.c"; - * - * use that magic number for save files with the changed file - * header; - * - * make the code in "savefile.c" capable of reading files with - * the old file header as well as files with the new file header - * (using the magic number to determine the header format). - * - * Then supply the changes as a patch at - * - * http://sourceforge.net/projects/libpcap/ - * - * so that future versions of libpcap and programs that use it (such as - * tcpdump) will be able to read your new capture file format. - */ -struct pcap_file_header { - bpf_u_int32 magic; - u_short version_major; - u_short version_minor; - bpf_int32 thiszone; /* gmt to local correction */ - bpf_u_int32 sigfigs; /* accuracy of timestamps */ - bpf_u_int32 snaplen; /* max length saved portion of each pkt */ - bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */ -}; - -/* - * Macros for the value returned by pcap_datalink_ext(). - * - * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro - * gives the FCS length of packets in the capture. - */ -#define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000) -#define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28) -#define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000) - -typedef enum { - PCAP_D_INOUT = 0, - PCAP_D_IN, - PCAP_D_OUT -} pcap_direction_t; - -/* - * Generic per-packet information, as supplied by libpcap. - * - * The time stamp can and should be a "struct timeval", regardless of - * whether your system supports 32-bit tv_sec in "struct timeval", - * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit - * and 64-bit applications. The on-disk format of savefiles uses 32-bit - * tv_sec (and tv_usec); this structure is irrelevant to that. 32-bit - * and 64-bit versions of libpcap, even if they're on the same platform, - * should supply the appropriate version of "struct timeval", even if - * that's not what the underlying packet capture mechanism supplies. - */ -struct pcap_pkthdr { - struct timeval ts; /* time stamp */ - bpf_u_int32 caplen; /* length of portion present */ - bpf_u_int32 len; /* length this packet (off wire) */ -}; - -/* - * As returned by the pcap_stats() - */ -struct pcap_stat { - u_int ps_recv; /* number of packets received */ - u_int ps_drop; /* number of packets dropped */ - u_int ps_ifdrop; /* drops by interface XXX not yet supported */ -#ifdef HAVE_REMOTE - u_int ps_capt; /* number of packets that are received by the application; please get rid off the Win32 ifdef */ - u_int ps_sent; /* number of packets sent by the server on the network */ - u_int ps_netdrop; /* number of packets lost on the network */ -#endif /* HAVE_REMOTE */ -}; - -#ifdef MSDOS -/* - * As returned by the pcap_stats_ex() - */ -struct pcap_stat_ex { - u_long rx_packets; /* total packets received */ - u_long tx_packets; /* total packets transmitted */ - u_long rx_bytes; /* total bytes received */ - u_long tx_bytes; /* total bytes transmitted */ - u_long rx_errors; /* bad packets received */ - u_long tx_errors; /* packet transmit problems */ - u_long rx_dropped; /* no space in Rx buffers */ - u_long tx_dropped; /* no space available for Tx */ - u_long multicast; /* multicast packets received */ - u_long collisions; - - /* detailed rx_errors: */ - u_long rx_length_errors; - u_long rx_over_errors; /* receiver ring buff overflow */ - u_long rx_crc_errors; /* recv'd pkt with crc error */ - u_long rx_frame_errors; /* recv'd frame alignment error */ - u_long rx_fifo_errors; /* recv'r fifo overrun */ - u_long rx_missed_errors; /* recv'r missed packet */ - - /* detailed tx_errors */ - u_long tx_aborted_errors; - u_long tx_carrier_errors; - u_long tx_fifo_errors; - u_long tx_heartbeat_errors; - u_long tx_window_errors; - }; -#endif - -/* - * Item in a list of interfaces. - */ -struct pcap_if { - struct pcap_if *next; - char *name; /* name to hand to "pcap_open_live()" */ - char *description; /* textual description of interface, or NULL */ - struct pcap_addr *addresses; - bpf_u_int32 flags; /* PCAP_IF_ interface flags */ -}; - -#define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */ - -/* - * Representation of an interface address. - */ -struct pcap_addr { - struct pcap_addr *next; - struct sockaddr *addr; /* address */ - struct sockaddr *netmask; /* netmask for that address */ - struct sockaddr *broadaddr; /* broadcast address for that address */ - struct sockaddr *dstaddr; /* P2P destination address for that address */ -}; - -typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *, - const u_char *); - -/* - * Error codes for the pcap API. - * These will all be negative, so you can check for the success or - * failure of a call that returns these codes by checking for a - * negative value. - */ -#define PCAP_ERROR -1 /* generic error code */ -#define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */ -#define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */ -#define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */ -#define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */ -#define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */ -#define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */ -#define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */ -#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */ - -/* - * Warning codes for the pcap API. - * These will all be positive and non-zero, so they won't look like - * errors. - */ -#define PCAP_WARNING 1 /* generic warning code */ -#define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */ - -char *pcap_lookupdev(char *); -int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *); - -pcap_t *pcap_create(const char *, char *); -int pcap_set_snaplen(pcap_t *, int); -int pcap_set_promisc(pcap_t *, int); -int pcap_can_set_rfmon(pcap_t *); -int pcap_set_rfmon(pcap_t *, int); -int pcap_set_timeout(pcap_t *, int); -int pcap_set_buffer_size(pcap_t *, int); -int pcap_activate(pcap_t *); - -pcap_t *pcap_open_live(const char *, int, int, int, char *); -pcap_t *pcap_open_dead(int, int); -pcap_t *pcap_open_offline(const char *, char *); -#if defined(WIN32) -pcap_t *pcap_hopen_offline(intptr_t, char *); -#if !defined(LIBPCAP_EXPORTS) -#define pcap_fopen_offline(f,b) \ - pcap_hopen_offline(_get_osfhandle(_fileno(f)), b) -#else /*LIBPCAP_EXPORTS*/ -static pcap_t *pcap_fopen_offline(FILE *, char *); -#endif -#else /*WIN32*/ -pcap_t *pcap_fopen_offline(FILE *, char *); -#endif /*WIN32*/ - -void pcap_close(pcap_t *); -int pcap_loop(pcap_t *, int, pcap_handler, u_char *); -int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *); -const u_char* - pcap_next(pcap_t *, struct pcap_pkthdr *); -int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **); -void pcap_breakloop(pcap_t *); -int pcap_stats(pcap_t *, struct pcap_stat *); -int pcap_setfilter(pcap_t *, struct bpf_program *); -int pcap_setdirection(pcap_t *, pcap_direction_t); -int pcap_getnonblock(pcap_t *, char *); -int pcap_setnonblock(pcap_t *, int, char *); -int pcap_inject(pcap_t *, const void *, size_t); -int pcap_sendpacket(pcap_t *, const u_char *, int); -const char *pcap_statustostr(int); -const char *pcap_strerror(int); -char *pcap_geterr(pcap_t *); -void pcap_perror(pcap_t *, char *); -int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, - bpf_u_int32); -int pcap_compile_nopcap(int, int, struct bpf_program *, - const char *, int, bpf_u_int32); -void pcap_freecode(struct bpf_program *); -int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *, - const u_char *); -int pcap_datalink(pcap_t *); -int pcap_datalink_ext(pcap_t *); -int pcap_list_datalinks(pcap_t *, int **); -int pcap_set_datalink(pcap_t *, int); -void pcap_free_datalinks(int *); -int pcap_datalink_name_to_val(const char *); -const char *pcap_datalink_val_to_name(int); -const char *pcap_datalink_val_to_description(int); -int pcap_snapshot(pcap_t *); -int pcap_is_swapped(pcap_t *); -int pcap_major_version(pcap_t *); -int pcap_minor_version(pcap_t *); - -/* XXX */ -FILE *pcap_file(pcap_t *); -int pcap_fileno(pcap_t *); - -pcap_dumper_t *pcap_dump_open(pcap_t *, const char *); -pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp); -FILE *pcap_dump_file(pcap_dumper_t *); -long pcap_dump_ftell(pcap_dumper_t *); -int pcap_dump_flush(pcap_dumper_t *); -void pcap_dump_close(pcap_dumper_t *); -void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); - -int pcap_findalldevs(pcap_if_t **, char *); -void pcap_freealldevs(pcap_if_t *); - -const char *pcap_lib_version(void); - -/* XXX this guy lives in the bpf tree */ -u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); -int bpf_validate(const struct bpf_insn *f, int len); -char *bpf_image(const struct bpf_insn *, int); -void bpf_dump(const struct bpf_program *, int); - -#if defined(WIN32) - -/* - * Win32 definitions - */ - -int pcap_setbuff(pcap_t *p, int dim); -int pcap_setmode(pcap_t *p, int mode); -int pcap_setmintocopy(pcap_t *p, int size); - -#ifdef WPCAP -/* Include file with the wpcap-specific extensions */ -#include -#endif /* WPCAP */ - -#define MODE_CAPT 0 -#define MODE_STAT 1 -#define MODE_MON 2 - -#elif defined(MSDOS) - -/* - * MS-DOS definitions - */ - -int pcap_stats_ex (pcap_t *, struct pcap_stat_ex *); -void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait); -u_long pcap_mac_packets (void); - -#else /* UN*X */ - -/* - * UN*X definitions - */ - -int pcap_get_selectable_fd(pcap_t *); - -#endif /* WIN32/MSDOS/UN*X */ - -#ifdef HAVE_REMOTE -/* Includes most of the public stuff that is needed for the remote capture */ -#include -#endif /* HAVE_REMOTE */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ledset/WpdPack_4_1_2/Include/remote-ext.h b/ledset/WpdPack_4_1_2/Include/remote-ext.h deleted file mode 100644 index 35a2fff..0000000 --- a/ledset/WpdPack_4_1_2/Include/remote-ext.h +++ /dev/null @@ -1,444 +0,0 @@ -/* - * Copyright (c) 2002 - 2003 - * NetGroup, Politecnico di Torino (Italy) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Politecnico di Torino nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef __REMOTE_EXT_H__ -#define __REMOTE_EXT_H__ - - -#ifndef HAVE_REMOTE -#error Please do not include this file directly. Just define HAVE_REMOTE and then include pcap.h -#endif - -// Definition for Microsoft Visual Studio -#if _MSC_VER > 1000 -#pragma once -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*! - \file remote-ext.h - - The goal of this file it to include most of the new definitions that should be - placed into the pcap.h file. - - It includes all new definitions (structures and functions like pcap_open(). - Some of the functions are not really a remote feature, but, right now, - they are placed here. -*/ - - - -// All this stuff is public -/*! \addtogroup remote_struct - \{ -*/ - - - - -/*! - \brief Defines the maximum buffer size in which address, port, interface names are kept. - - In case the adapter name or such is larger than this value, it is truncated. - This is not used by the user; however it must be aware that an hostname / interface - name longer than this value will be truncated. -*/ -#define PCAP_BUF_SIZE 1024 - - -/*! \addtogroup remote_source_ID - \{ -*/ - - -/*! - \brief Internal representation of the type of source in use (file, - remote/local interface). - - This indicates a file, i.e. the user want to open a capture from a local file. -*/ -#define PCAP_SRC_FILE 2 -/*! - \brief Internal representation of the type of source in use (file, - remote/local interface). - - This indicates a local interface, i.e. the user want to open a capture from - a local interface. This does not involve the RPCAP protocol. -*/ -#define PCAP_SRC_IFLOCAL 3 -/*! - \brief Internal representation of the type of source in use (file, - remote/local interface). - - This indicates a remote interface, i.e. the user want to open a capture from - an interface on a remote host. This does involve the RPCAP protocol. -*/ -#define PCAP_SRC_IFREMOTE 4 - -/*! - \} -*/ - - - -/*! \addtogroup remote_source_string - - The formats allowed by the pcap_open() are the following: - - file://path_and_filename [opens a local file] - - rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol] - - rpcap://host/devicename [opens the selected device available on a remote host] - - rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP] - - adaptername [to open a local adapter; kept for compability, but it is strongly discouraged] - - (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged] - - The formats allowed by the pcap_findalldevs_ex() are the following: - - file://folder/ [lists all the files in the given folder] - - rpcap:// [lists all local adapters] - - rpcap://host:port/ [lists the devices available on a remote host] - - Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since - IPv6 is fully supported, these are the allowed formats: - - - host (literal): e.g. host.foo.bar - - host (numeric IPv4): e.g. 10.11.12.13 - - host (numeric IPv4, IPv6 style): e.g. [10.11.12.13] - - host (numeric IPv6): e.g. [1:2:3::4] - - port: can be either numeric (e.g. '80') or literal (e.g. 'http') - - Here you find some allowed examples: - - rpcap://host.foo.bar/devicename [everything literal, no port number] - - rpcap://host.foo.bar:1234/devicename [everything literal, with port number] - - rpcap://10.11.12.13/devicename [IPv4 numeric, no port number] - - rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number] - - rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number] - - rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number] - - rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number] - - rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number] - - \{ -*/ - - -/*! - \brief String that will be used to determine the type of source in use (file, - remote/local interface). - - This string will be prepended to the interface name in order to create a string - that contains all the information required to open the source. - - This string indicates that the user wants to open a capture from a local file. -*/ -#define PCAP_SRC_FILE_STRING "file://" -/*! - \brief String that will be used to determine the type of source in use (file, - remote/local interface). - - This string will be prepended to the interface name in order to create a string - that contains all the information required to open the source. - - This string indicates that the user wants to open a capture from a network interface. - This string does not necessarily involve the use of the RPCAP protocol. If the - interface required resides on the local host, the RPCAP protocol is not involved - and the local functions are used. -*/ -#define PCAP_SRC_IF_STRING "rpcap://" - -/*! - \} -*/ - - - - - -/*! - \addtogroup remote_open_flags - \{ -*/ - -/*! - \brief Defines if the adapter has to go in promiscuous mode. - - It is '1' if you have to open the adapter in promiscuous mode, '0' otherwise. - Note that even if this parameter is false, the interface could well be in promiscuous - mode for some other reason (for example because another capture process with - promiscuous mode enabled is currently using that interface). - On on Linux systems with 2.2 or later kernels (that have the "any" device), this - flag does not work on the "any" device; if an argument of "any" is supplied, - the 'promisc' flag is ignored. -*/ -#define PCAP_OPENFLAG_PROMISCUOUS 1 - -/*! - \brief Defines if the data trasfer (in case of a remote - capture) has to be done with UDP protocol. - - If it is '1' if you want a UDP data connection, '0' if you want - a TCP data connection; control connection is always TCP-based. - A UDP connection is much lighter, but it does not guarantee that all - the captured packets arrive to the client workstation. Moreover, - it could be harmful in case of network congestion. - This flag is meaningless if the source is not a remote interface. - In that case, it is simply ignored. -*/ -#define PCAP_OPENFLAG_DATATX_UDP 2 - - -/*! - \brief Defines if the remote probe will capture its own generated traffic. - - In case the remote probe uses the same interface to capture traffic and to send - data back to the caller, the captured traffic includes the RPCAP traffic as well. - If this flag is turned on, the RPCAP traffic is excluded from the capture, so that - the trace returned back to the collector is does not include this traffic. -*/ -#define PCAP_OPENFLAG_NOCAPTURE_RPCAP 4 - -/*! - \brief Defines if the local adapter will capture its own generated traffic. - - This flag tells the underlying capture driver to drop the packets that were sent by itself. - This is usefult when building applications like bridges, that should ignore the traffic - they just sent. -*/ -#define PCAP_OPENFLAG_NOCAPTURE_LOCAL 8 - -/*! - \brief This flag configures the adapter for maximum responsiveness. - - In presence of a large value for nbytes, WinPcap waits for the arrival of several packets before - copying the data to the user. This guarantees a low number of system calls, i.e. lower processor usage, - i.e. better performance, which is good for applications like sniffers. If the user sets the - PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will copy the packets as soon as the application - is ready to receive them. This is suggested for real time applications (like, for example, a bridge) - that need the best responsiveness.*/ -#define PCAP_OPENFLAG_MAX_RESPONSIVENESS 16 - -/*! - \} -*/ - - -/*! - \addtogroup remote_samp_methods - \{ -*/ - -/*! - \brief No sampling has to be done on the current capture. - - In this case, no sampling algorithms are applied to the current capture. -*/ -#define PCAP_SAMP_NOSAMP 0 - -/*! - \brief It defines that only 1 out of N packets must be returned to the user. - - In this case, the 'value' field of the 'pcap_samp' structure indicates the - number of packets (minus 1) that must be discarded before one packet got accepted. - In other words, if 'value = 10', the first packet is returned to the caller, while - the following 9 are discarded. -*/ -#define PCAP_SAMP_1_EVERY_N 1 - -/*! - \brief It defines that we have to return 1 packet every N milliseconds. - - In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting - time' in milliseconds before one packet got accepted. - In other words, if 'value = 10', the first packet is returned to the caller; the next - returned one will be the first packet that arrives when 10ms have elapsed. -*/ -#define PCAP_SAMP_FIRST_AFTER_N_MS 2 - -/*! - \} -*/ - - -/*! - \addtogroup remote_auth_methods - \{ -*/ - -/*! - \brief It defines the NULL authentication. - - This value has to be used within the 'type' member of the pcap_rmtauth structure. - The 'NULL' authentication has to be equal to 'zero', so that old applications - can just put every field of struct pcap_rmtauth to zero, and it does work. -*/ -#define RPCAP_RMTAUTH_NULL 0 -/*! - \brief It defines the username/password authentication. - - With this type of authentication, the RPCAP protocol will use the username/ - password provided to authenticate the user on the remote machine. If the - authentication is successful (and the user has the right to open network devices) - the RPCAP connection will continue; otherwise it will be dropped. - - This value has to be used within the 'type' member of the pcap_rmtauth structure. -*/ -#define RPCAP_RMTAUTH_PWD 1 - -/*! - \} -*/ - - - - -/*! - - \brief This structure keeps the information needed to autheticate - the user on a remote machine. - - The remote machine can either grant or refuse the access according - to the information provided. - In case the NULL authentication is required, both 'username' and - 'password' can be NULL pointers. - - This structure is meaningless if the source is not a remote interface; - in that case, the functions which requires such a structure can accept - a NULL pointer as well. -*/ -struct pcap_rmtauth -{ - /*! - \brief Type of the authentication required. - - In order to provide maximum flexibility, we can support different types - of authentication based on the value of this 'type' variable. The currently - supported authentication methods are defined into the - \link remote_auth_methods Remote Authentication Methods Section\endlink. - - */ - int type; - /*! - \brief Zero-terminated string containing the username that has to be - used on the remote machine for authentication. - - This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication - and it can be NULL. - */ - char *username; - /*! - \brief Zero-terminated string containing the password that has to be - used on the remote machine for authentication. - - This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication - and it can be NULL. - */ - char *password; -}; - - -/*! - \brief This structure defines the information related to sampling. - - In case the sampling is requested, the capturing device should read - only a subset of the packets coming from the source. The returned packets depend - on the sampling parameters. - - \warning The sampling process is applied after the filtering process. - In other words, packets are filtered first, then the sampling process selects a - subset of the 'filtered' packets and it returns them to the caller. -*/ -struct pcap_samp -{ - /*! - Method used for sampling. Currently, the supported methods are listed in the - \link remote_samp_methods Sampling Methods Section\endlink. - */ - int method; - - /*! - This value depends on the sampling method defined. For its meaning, please check - at the \link remote_samp_methods Sampling Methods Section\endlink. - */ - int value; -}; - - - - -//! Maximum lenght of an host name (needed for the RPCAP active mode) -#define RPCAP_HOSTLIST_SIZE 1024 - - -/*! - \} -*/ // end of public documentation - - -// Exported functions - - - -/** \name New WinPcap functions - - This section lists the new functions that are able to help considerably in writing - WinPcap programs because of their easiness of use. - */ -//\{ -pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf); -int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf); -int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf); -int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf); -struct pcap_samp *pcap_setsampling(pcap_t *p); - -//\} -// End of new winpcap functions - - - -/** \name Remote Capture functions - */ -//\{ -SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf); -int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf); -int pcap_remoteact_close(const char *host, char *errbuf); -void pcap_remoteact_cleanup(); -//\} -// End of remote capture functions - -#ifdef __cplusplus -} -#endif - - -#endif - diff --git a/ledset/WpdPack_4_1_2/Lib/Packet.lib b/ledset/WpdPack_4_1_2/Lib/Packet.lib deleted file mode 100644 index 81618bc8ca221dd99e52b0289ae4692a01f63d0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8450 zcmcIp&2JM|5TAVT(Lh5&zQ0XCKra-6O@f4?d{QEu5ZR{XW;XVwEVaE`+o450^v0>; z#EE+)#EAo!-Z*ih5|!wsQV*5*6LR22XZG#BuYFz|oUAnQ?##UTy^onU^IlF}v#N!A z^Icyj)aTO7>}+x_nY?^a<%ge_X6J&}yIlaV4A5N#=y?jz`xanip3%@Q0MWo5Mk6nf zk2Ly$(bzTsQQtJ9;Vl57{!T`tlcDC1hSB7G!G_lL5|2_8W zeLlaozIiK?%df0vmosadxm%gMXBB?1>yXcH+)k&Xa`=@gFmdk2?TwrHmBrj5 zX=kfyRUdw9S8I-2K{HO-%Quj*7T?%)qqfZFnk!Z3fn9B+uSr>}Tb^B6ELvXOuBzQp z1WY$;SBmUSRh9X=X04Gb3YhLQ%ui8etGM{N??1GJx zXELjan96d=t=YzjQzcA0Yu9i5bloXMW?2z1U0m6~?uJ#iwfTz(S(}XgeTf`K}AU-_jawa z?HWdg{S77D_PSHaxy!EiP#qn0LP)r68pG-XyP}N_XHAj>w(G9PLSM5i@p&&+cFG>P zou+Eng+S3wJ7q^-V(c<$ha#rGRwLeOrDzvb+lqkOPP?wRghE*w+w1GsVd(W3wdA>Z23A5S_@U#cuZ7;z52*BRG<^~oGiSrXFB&_VNhyMKiK$qTqDfO% zVoHIo z{sJUkwc~FuW<+|r#GuYYU(XR_kvV#(o9AAiTz3jpx8`ow6X!EuCDLmfH+`x8hrp;M zS-`~azhRYtiI{i-1-npi%O3Xi-0NT9BleHsQ44ygbL|igc>%!h?!A!X4~|-Ngq$Sl zAOpBgN^ppewFH02I=~$NCag{T+RuZpG^Ne?$xJG|n;<`F_x=f%P82zLu4S`-I zKe-%=$WML`KZ0NK6SBMS>)*_(V%3H--QXTUxJZ+;Hai=MuD=l=Zq{O=D-}$T@46IS z@*_o8GUSuP{uO=%zxz77&CDp)!woNB_UwnL%i)a~-HcIarrT)GI^~bMx=Ql@mJijb$1uZTrjw)!P z*lh(b8E&Ln6ygCLs{|f}{CLp<_qsWT0x45xRYXJ;;<-I9rxnDwN^ep@3~!MR3T;Y46L(WG+W!N((TxBA diff --git a/ledset/WpdPack_4_1_2/Lib/wpcap.lib b/ledset/WpdPack_4_1_2/Lib/wpcap.lib deleted file mode 100644 index f832e0445b5c7dafe5a0f887262064265ba2b293..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19320 zcmdU0O>9(05-uRW4k3h)gbS|j4}Uz#t>t&Y%Y)S%rl;4JTp5pCTuoh zr6{Lp73IKQa^QrbD7U>tdx#=VoK`4`_7Fwch+_^p| zS6BDfKh<5`)$NUA`Fde~ylZ#2`x_V>8Oe?2azi67zdwrRhWbZ!@NyRb{1af)Ai(As zfGr;YjQ*f$?=%3>0gMxkW0+_MhKYuM)O4~3fN1X*n)>bm5FNa!=@dc`jeVwR->(2f zr@qm2dK`f0IF?CtuvgRRPmzx_yk67JDF8*E;}+y2(SaM92H(eeAPs$`X>=9#JJEGb+ptfFdaw>e+iq*x`Yiy_8LSsk zPhHb?lqKrHekD4vPE+rP*gr_)Sa+hqpEMo(8T%RO(3GZ$?*SB*@r$$_@rd?+t!Zo@ zjvvxV99NR-y@~cP&F-(99u}FD=x9fbs_AYW3=3tr%W|L_8r?37d|TiVLY~ zEvy9P(zP&>67jfHb#AU)syKqo60(JIwPA#!ut>cUHY?T2Y`I#v8X-CyA=yYsIvgR1 z{ec~7x`z7J_EoXesO6i5`6%5+g-kun7o&6?6lsXL*a+*hi*s{fJrauXgmly&fhf^s z3E4_`-3*NminK;E-)tB(9ge34;dLpXqEaSo&XvkdS!WX$Qnj#NubO6=h)8cV>r%o- zg$#}#%0zWB5s_Y~F4Rh8)(8_zN(7avo*HT-qioC+@^ketEL4l8NE;P0#e6f5+G>={ zMukkHlCL%9t7a5zRLGPXLF4Uwtri*$kqjZXkpEM)9$X9SjZ(D|bw-RQrAw8hw96CH zIB?un6^x}-su3UwQbeQ|7jfC3NgauZcw9Wn7pTvr=@psX2-v zPKxSZ5_y=PnoE_N$P;l>b2RJuN@JnKx{58)m9q&VA1x?B*qjgRVZ~&L@q{!@+G|$O zMuiOZZ>iF(7OFMdSjiHy%7zr}qAKD-YOYi%Vt=CNK_NilssaMOp#PS~G0a z3#jr@2fHjGTg%rQuBgKil48`YO^Y*yd_7#KHp6_O8RQFvux8Xd$xh8vE;W)lG&5CR zE{YZ+xiZSMFke|T8koY@IHd|2`Ept5435N=dVT?dRHmqxp2NoQb4*B>?S@fVJ*ax; z#(FH|ab7p_3pF&AS9m=V93eT2qkmOwwM1MS~zh^OYj+6w(qzK0R@x9xxG+j`OQ@O)YAwXd4wWGVhD0>`FwwU%QhSy`Bsht3yBaP(% ze(43MpxoU(=zYOFA0d4{0I&g1$&>iKwHu(>kDdVhcHwsomUZU@z?X;clzbTAW2BWw z0NzC^?gw}e%b&*d8(7cxv5c>V09Ik$uOp3b!!mjRZsYgctytC>fI7y0LnY-36{Zf7=>XNfjzJf#$Z1jgA3T1 zPr!??4yIuo*25%B!C6=dn_&}df!E4q}7h2Vp-SXex#;FLwXebxMB`=5C9I^9PV8s(AynihM(q47Hlj}F34Yx5 z5?lA>X`GVyBqM>5uRR)q`2Y)!$;$8I=7z=ffJr=%AQ6tTb`!4lnRETAExQINoiFRt&`kb6)zb#5OTk(WXF`3LzuyeV>Hxo-xE;5&wx*TA8>_O0# zmkw~5!tPVa^mwZsG2>X)OyT6P_FY#r`5rUt)woR?W2mOSw@rK-bJ`>O{@4yI%WYCPuf1kaI9X$ zNp*3w@H`qDr?aNs+&Oo2#&Hz0Why()^2D`)wqGhaX1N5xvM@q!8M4BUSkpzx4EynIBam!|lli=G+Mk}qYj1rahg&EpnNTMnkZ z6X;YS&b;BMmJ!Md!^x2hGOWz7`V;-AEPO=~#ptsfeItO|rMA!b4@pA?b9;q` zELR%xFI6w99i(bVQ6qBcEkNU%@)Gd`Z&9+L3Wy4UP

ii zt(#u7(X5F2?uWKuz$0Zt8OJO)7!6qr;{`-mW-ub#&;iOoI?D5ivfQBP z?YRYMzrS+nDC-bqg+bw+zXjsZL+Gm53p&N2Dhi z$sPL*kF_J!=aoO!_oo5a`Wl^G6SWCz8X~fDnjyWbFWEo#2>_LrfpY(yof(M2GuM&^&tn45RTGq64I1es%5IBD_q*{iK;u2FYa$7I6mN$G=TOG^=4LlDoZVf8Mpw z8`>v5@1R6iH=VS|vlhSLVkx(ih2l^~-N<=b^b_Mk`m)-zIUnA+Dq&#M2jgMyAnZo(4AD0*qp9b5G`pq6hCIM%0W!8nw$ z=X{p)l{75!sW3?UZSYVll0YzKHbPhY;~;29sU1>;c0zRY>-XSai;ZdbYZCG=to zq}NeHHZoF*W4Z&(oJadNNlfy2cY@QRZM55d-N8}r^iGgGy0KXzv2)UbaVVp147WIa zljmv+W4U(#jA6SoBbv{mY-KcYyI`T(Ull#QxQ(&o#f1gqP{wxoR*xQmS-4#qq68LyTjtHxo|KwtJB;6=J(Y@(tt?ceEx_3CTXEKlvOJ{NFy#1JrL^z$>YNrb&<@)H8*An#mck^5f7vwn&$@= zl0z9sY}m8Q7*9o{hYgHkLs{`!j2wCD52oO$CleN~{Wa0!-I!oJ@fxE8EMH$9a z4-3eltbOUxmcuD{<_QVov_E zH5QOV8As7)wU0Y^#`|rDZ3!!<#~Pe)(9AO+ZjXh{+AKB$jT}9S zHBXm1z-lq?X#aRxVyQ<_9pHHO31=jZeQssJ+SYsD$#znrB{r%InpH16?K&%w>>DwL zSc1lTMr+DJqo>Fgh(lRh<ClhvL%JxCqKEC=kR{Bh7JE3l N*?W_a?2Af)@;}RMSJ?mn diff --git a/ledset/WpdPack_4_1_2/Lib/x64/Packet.lib b/ledset/WpdPack_4_1_2/Lib/x64/Packet.lib deleted file mode 100644 index 30c15405037e32d45233593bb67ac27f66c5f3de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8290 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 -function redirt(thisarea) { thisurl = '' + thisarea; window.location=thisurl; } - - - - - - - diff --git a/ledset/WpdPack_4_1_2/docs/html/Packet_8h.html b/ledset/WpdPack_4_1_2/docs/html/Packet_8h.html deleted file mode 100644 index 7f1f95d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/Packet_8h.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - -WinPcap: Packet.h File Reference - - - - - -

-
-

Packet.h File Reference

#include "win_bpf.h"
- -

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  packet_file_header
 Header of a libpcap dump file. More...
struct  sf_pkthdr
 Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler. More...
struct  _PACKET_OID_DATA
 Structure containing an OID request. More...
struct  _INTERNAL_REQUEST
 Stores an OID request. More...
struct  _PACKET_RESERVED
 Contains a NDIS packet. More...
struct  _DEVICE_EXTENSION
 Port device extension. More...
struct  __CPU_Private_Data
 Kernel buffer of each CPU. More...
struct  _OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver. More...
struct  PacketHeader
 Structure prepended to each packet in the kernel buffer pool. More...

Defines

#define MAX_REQUESTS   32
 Maximum number of simultaneous IOCTL requests.
#define Packet_ALIGNMENT   sizeof(int)
 Alignment macro. Defines the alignment size.
#define Packet_WORDALIGN(x)   (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
 even multiple of Packet_ALIGNMENT.
#define KERNEL_EVENT_NAMESPACE   L"\\BaseNamedObjects\\"
#define MODE_CAPT   0x0
 Capture working mode.
#define MODE_STAT   0x1
 Statistical working mode.
#define MODE_MON   0x2
 Kernel monitoring mode.
#define MODE_DUMP   0x10
 Kernel dump working mode.
#define IMMEDIATE   1
 Immediate timeout. Forces a read call to return immediately.
#define NDIS_FLAGS_SKIP_LOOPBACK_W2K   0x400
 This is an undocumented flag for NdisSetPacketFlags() that allows to disable loopback reception.
#define TCPDUMP_MAGIC   0xa1b2c3d4
 Libpcap magic number. Used by programs like tcpdump to recognize a driver's generated dump file.
#define PCAP_VERSION_MAJOR   2
 Major libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.
#define PCAP_VERSION_MINOR   4
 Minor libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.
#define NPF_DISABLE_LOOPBACK   1
 Tells the driver to drop the packets sent by itself. This is usefult when building applications like bridges.
#define NPF_ENABLE_LOOPBACK   2
 Tells the driver to capture the packets sent by itself.
#define C_ASSERT(a)
#define RESERVED(_p)   ((PPACKET_RESERVED)((_p)->ProtocolReserved))
 Macro to obtain a NDIS_PACKET from a PACKET_RESERVED.
#define TRANSMIT_PACKETS   256
 of packets that can be transmitted at the same time or with a single call to NdisSendPackets.
#define EXIT_SUCCESS(quantity)
 Macro used in the I/O routines to return the control to user-mode with a success status.
#define EXIT_FAILURE(quantity)
 Macro used in the I/O routines to return the control to user-mode with a failure status.

Typedefs

typedef struct _PACKET_OID_DATA PACKET_OID_DATA
 Structure containing an OID request.
typedef struct _PACKET_OID_DATAPPACKET_OID_DATA
typedef struct _INTERNAL_REQUEST INTERNAL_REQUEST
 Stores an OID request.
typedef struct _INTERNAL_REQUESTPINTERNAL_REQUEST
typedef struct _PACKET_RESERVED PACKET_RESERVED
 Contains a NDIS packet.
typedef struct _PACKET_RESERVEDPPACKET_RESERVED
typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION
 Port device extension.
typedef struct _DEVICE_EXTENSIONPDEVICE_EXTENSION
typedef struct __CPU_Private_Data CpuPrivateData
 Kernel buffer of each CPU.
typedef struct _OPEN_INSTANCE OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver.
typedef struct _OPEN_INSTANCEPOPEN_INSTANCE

Enumerations

enum  ADAPTER_BINDING_STATUS { ADAPTER_UNBOUND, -ADAPTER_BOUND, -ADAPTER_UNBINDING - }

Functions

 C_ASSERT (sizeof(PACKET_OID_DATA)==12)
NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 The initialization routine of the driver.
PWCHAR getAdaptersList (VOID)
 Returns the list of the MACs available on the system.
PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings (VOID)
 Returns the MACs that bind to TCP/IP.
BOOLEAN NPF_CreateDevice (IN OUT PDRIVER_OBJECT adriverObjectP, IN PUNICODE_STRING amacNameP)
 Creates a device for a given MAC.
NTSTATUS NPF_Open (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Opens a new instance of the driver.
VOID NPF_OpenAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenErrorStatus)
 Ends the opening of an adapter.
NTSTATUS NPF_Cleanup (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Closes an instance of the driver.
NTSTATUS NPF_Close (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
VOID NPF_CloseAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends the closing of an adapter.
NDIS_STATUS NPF_tap (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE MacReceiveContext, IN PVOID HeaderBuffer, IN UINT HeaderBufferSize, IN PVOID LookAheadBuffer, IN UINT LookaheadBufferSize, IN UINT PacketSize)
 Callback invoked by NDIS when a packet arrives from the network.
VOID NPF_TransferDataComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET Packet, IN NDIS_STATUS Status, IN UINT BytesTransferred)
 Ends the transfer of a packet.
VOID NPF_ReceiveComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback function that signals the end of a packet reception.
NTSTATUS NPF_IoControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Handles the IOCTL calls.
VOID NPF_RequestComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_REQUEST pRequest, IN NDIS_STATUS Status)
 Ends an OID request.
NTSTATUS NPF_Write (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Writes a raw packet to the network.
INT NPF_BufferedWrite (IN PIRP Irp, IN PCHAR UserBuff, IN ULONG UserBuffSize, BOOLEAN sync)
 Writes a buffer of raw packets to the network.
VOID NPF_WaitEndOfBufferedWrite (POPEN_INSTANCE Open)
 Waits the completion of all the sends performed by NPF_BufferedWrite.
VOID NPF_SendComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET pPacket, IN NDIS_STATUS Status)
 Ends a send operation.
VOID NPF_ResetComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends a reset of the adapter.
VOID NPF_Status (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN PVOID StatusBuffer, IN UINT StatusBufferSize)
 Callback for NDIS StatusHandler. Not used by NPF.
VOID NPF_StatusComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback for NDIS StatusCompleteHandler. Not used by NPF.
VOID NPF_Unload (IN PDRIVER_OBJECT DriverObject)
 Function called by the OS when NPF is unloaded.
NTSTATUS NPF_Read (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Function that serves the user's reads.
NTSTATUS NPF_ReadRegistry (IN PWSTR *MacDriverName, IN PWSTR *PacketDriverName, IN PUNICODE_STRING RegistryPath)
 Reads the registry keys associated woth NPF if the driver is manually installed via the control panel.
NTSTATUS NPF_QueryRegistryRoutine (IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
 Function used by NPF_ReadRegistry() to quesry the registry keys associated woth NPF if the driver is manually installed via the control panel.
VOID NPF_BindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE BindContext, IN PNDIS_STRING DeviceName, IN PVOID SystemSpecific1, IN PVOID SystemSpecific2)
 Callback for NDIS BindAdapterHandler. Not used by NPF.
VOID NPF_UnbindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE UnbindContext)
 Callback for NDIS UnbindAdapterHandler.
NTSTATUS NPF_OpenDumpFile (POPEN_INSTANCE Open, PUNICODE_STRING fileName, BOOLEAN append)
 Creates the file that will receive the packets when the driver is in dump mode.
NTSTATUS NPF_StartDump (POPEN_INSTANCE Open)
 Starts dump to file.
VOID NPF_DumpThread (PVOID Open)
 The dump thread.
NTSTATUS NPF_SaveCurrentBuffer (POPEN_INSTANCE Open)
 Saves the content of the packet buffer to the file associated with current instance.
VOID NPF_WriteDumpFile (PFILE_OBJECT FileObject, PLARGE_INTEGER Offset, ULONG Length, PMDL Mdl, PIO_STATUS_BLOCK IoStatusBlock)
 Writes a block of packets on the dump file.
NTSTATUS NPF_CloseDumpFile (POPEN_INSTANCE Open)
 Closes the dump file associated with an instance of the driver.
BOOLEAN NPF_StartUsingBinding (IN POPEN_INSTANCE pOpen)
VOID NPF_StopUsingBinding (IN POPEN_INSTANCE pOpen)
VOID NPF_CloseBinding (IN POPEN_INSTANCE pOpen)
BOOLEAN NPF_StartUsingOpenInstance (IN POPEN_INSTANCE pOpen)
VOID NPF_StopUsingOpenInstance (IN POPEN_INSTANCE pOpen)
VOID NPF_CloseOpenInstance (IN POPEN_INSTANCE pOpen)
NTSTATUS NPF_GetDeviceMTU (IN POPEN_INSTANCE pOpen, IN PIRP pIrp, OUT PUINT pMtu)
UINT GetBuffOccupation (POPEN_INSTANCE Open)
 Returns the amount of bytes present in the packet buffer.

Variables

ULONG g_NCpu
NDIS_HANDLE g_NdisProtocolHandle
struct time_conv G_Start_Time
UINT g_SendPacketFlags
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/Packet_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/Packet_8h_source.html deleted file mode 100644 index f4293eb..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/Packet_8h_source.html +++ /dev/null @@ -1,572 +0,0 @@ - - - - -WinPcap: Packet.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/Win32-Extensions_8h.html b/ledset/WpdPack_4_1_2/docs/html/Win32-Extensions_8h.html deleted file mode 100644 index 038ab6d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/Win32-Extensions_8h.html +++ /dev/null @@ -1,700 +0,0 @@ - - - - -WinPcap: Win32-Extensions.h File Reference - - - - - - -
-

Win32-Extensions.h File Reference

-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  pcap_send_queue
 A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). More...

Defines

#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
 This typedef is a support for the pcap_get_airpcap_handle() function.
#define BPF_MEM_EX_IMM   0xc0
#define BPF_MEM_EX_IND   0xe0
#define BPF_MEM_EX   0xc0
#define BPF_TME   0x08
#define BPF_LOOKUP   0x90
#define BPF_EXECUTE   0xa0
#define BPF_INIT   0xb0
#define BPF_VALIDATE   0xc0
#define BPF_SET_ACTIVE   0xd0
#define BPF_RESET   0xe0
#define BPF_SET_MEMORY   0x80
#define BPF_GET_REGISTER_VALUE   0x70
#define BPF_SET_REGISTER_VALUE   0x60
#define BPF_SET_WORKING   0x50
#define BPF_SET_ACTIVE_READ   0x40
#define BPF_SET_AUTODELETION   0x30
#define BPF_SEPARATION   0xff

Typedefs

typedef struct pcap_send_queue pcap_send_queue
typedef struct _AirpcapHandle * PAirpcapHandle

Functions

pcap_send_queuepcap_sendqueue_alloc (u_int memsize)
void pcap_sendqueue_destroy (pcap_send_queue *queue)
int pcap_sendqueue_queue (pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
u_int pcap_sendqueue_transmit (pcap_t *p, pcap_send_queue *queue, int sync)
HANDLE pcap_getevent (pcap_t *p)
struct pcap_statpcap_stats_ex (pcap_t *p, int *pcap_stat_size)
int pcap_setuserbuffer (pcap_t *p, int size)
int pcap_live_dump (pcap_t *p, char *filename, int maxsize, int maxpacks)
int pcap_live_dump_ended (pcap_t *p, int sync)
int pcap_offline_filter (struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
int pcap_start_oem (char *err_str, int flags)
PAirpcapHandle pcap_get_airpcap_handle (pcap_t *p)
-

Define Documentation

- -
-
- - - - -
#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
-
-
- -

This typedef is a support for the pcap_get_airpcap_handle() function.

- -

Definition at line 59 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_EXECUTE   0xa0
-
-
- -

Definition at line 71 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_GET_REGISTER_VALUE   0x70
-
-
- -

Definition at line 77 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_INIT   0xb0
-
-
- -

Definition at line 72 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_LOOKUP   0x90
-
-
- -

Definition at line 70 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_MEM_EX   0xc0
-
-
- -

Definition at line 67 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_MEM_EX_IMM   0xc0
-
-
- -

Definition at line 63 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_MEM_EX_IND   0xe0
-
-
- -

Definition at line 64 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_RESET   0xe0
-
-
- -

Definition at line 75 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SEPARATION   0xff
-
-
- -

Definition at line 82 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_ACTIVE   0xd0
-
-
- -

Definition at line 74 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_ACTIVE_READ   0x40
-
-
- -

Definition at line 80 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_AUTODELETION   0x30
-
-
- -

Definition at line 81 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_MEMORY   0x80
-
-
- -

Definition at line 76 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_REGISTER_VALUE   0x60
-
-
- -

Definition at line 78 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_WORKING   0x50
-
-
- -

Definition at line 79 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_TME   0x08
-
-
- -

Definition at line 68 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_VALIDATE   0xc0
-
-
- -

Definition at line 73 of file Win32-Extensions.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef struct _AirpcapHandle* PAirpcapHandle
-
-
- -

Definition at line 60 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
typedef struct pcap_send_queue pcap_send_queue
-
-
- -

Definition at line 53 of file Win32-Extensions.h.

- -
-
-

Function Documentation

- -
-
- - - - - - - - - -
PAirpcapHandle pcap_get_airpcap_handle (pcap_t p ) 
-
-
- -
-
- -
-
- - - - - - - - - -
HANDLE pcap_getevent (pcap_t p ) 
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_live_dump (pcap_t p,
char *  filename,
int  maxsize,
int  maxpacks 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_live_dump_ended (pcap_t p,
int  sync 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_offline_filter (struct bpf_program *  prog,
const struct pcap_pkthdr header,
const u_char *  pkt_data 
)
-
-
- -
-
- -
-
- - - - - - - - - -
pcap_send_queue* pcap_sendqueue_alloc (u_int  memsize ) 
-
-
- -
-
- -
-
- - - - - - - - - -
void pcap_sendqueue_destroy (pcap_send_queue queue ) 
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_sendqueue_queue (pcap_send_queue queue,
const struct pcap_pkthdr pkt_header,
const u_char *  pkt_data 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
u_int pcap_sendqueue_transmit (pcap_t p,
pcap_send_queue queue,
int  sync 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setuserbuffer (pcap_t p,
int  size 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_start_oem (char *  err_str,
int  flags 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct pcap_stat* pcap_stats_ex (pcap_t p,
int *  pcap_stat_size 
) [read]
-
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/Win32-Extensions_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/Win32-Extensions_8h_source.html deleted file mode 100644 index aaf8804..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/Win32-Extensions_8h_source.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - -WinPcap: Win32-Extensions.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/annotated.html b/ledset/WpdPack_4_1_2/docs/html/annotated.html deleted file mode 100644 index 5db948a..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/annotated.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - -WinPcap: Data Structures - - - - - - -
-

Data Structures

Here are the data structures with brief descriptions: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__CPU_Private_DataKernel buffer of each CPU
_DEVICE_EXTENSIONPort device extension
_INTERNAL_REQUESTStores an OID request
_OPEN_INSTANCEContains the state of a running instance of the NPF driver
_PACKET_OID_DATAStructure containing an OID request
_PACKET_RESERVEDContains a NDIS packet
active_pars
activehostsKeeps a list of all the opened connections in the active mode
binary_streamA stream of X86 binary code
daemon_slparsStructure that keeps the parameters needed by the daemon_serviceloop() function
JIT_BPF_FilterStructure describing a x86 filtering program created by the jitter
packet_file_headerHeader of a libpcap dump file
PacketHeaderStructure prepended to each packet in the kernel buffer pool
pcap_addrRepresentation of an interface address, used by pcap_findalldevs()
pcap_file_headerHeader of a libpcap dump file
pcap_ifItem in a list of interfaces, used by pcap_findalldevs()
pcap_pkthdrHeader of a packet in the dump file
pcap_rmtauthThis structure keeps the information needed to autheticate the user on a remote machine
pcap_sampThis structure defines the information related to sampling
pcap_send_queueA queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()
pcap_statStructure that keeps statistical values on an interface
rpcap_authStructure that keeps the data required for the authentication on the remote host
rpcap_filterGeneral header used for the pcap_setfilter() command; keeps just the number of BPF instructions
rpcap_filterbpf_insnStructure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header
rpcap_findalldevs_ifFormat of the message for the interface description (findalldevs command)
rpcap_findalldevs_ifaddrFormat of the message for the address listing (findalldevs command)
rpcap_headerCommon header for all the RPCAP messages
rpcap_openreplyFormat of the message of the connection opening reply (open command)
rpcap_pkthdrFormat of the header which encapsulates captured packets when transmitted on the network
rpcap_samplingStructure that is needed to set sampling parameters
rpcap_startcapreplyFormat of the reply message that devoted to start a remote capture (startcap reply command)
rpcap_startcapreqFormat of the message that starts a remote capture (startcap command)
rpcap_statsStructure that keeps the statistics about the number of packets captured, dropped, etc
sf_pkthdrHeader associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/classes.html b/ledset/WpdPack_4_1_2/docs/html/classes.html deleted file mode 100644 index 8ed33f1..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/classes.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - -WinPcap: Alphabetical List - - - - - - -
-

Data Structure Index

A | B | D | J | P | R | S | _
- -
  A  
-
  P  
-
pcap_send_queue   rpcap_header   sf_pkthdr   
active_pars   packet_file_header   pcap_stat   rpcap_openreply   
  _  
-
activehosts   PacketHeader   
  R  
-
rpcap_pkthdr   __CPU_Private_Data   
  B  
-
pcap_addr   rpcap_auth   rpcap_sampling   _DEVICE_EXTENSION   
binary_stream   pcap_file_header   rpcap_filter   rpcap_startcapreply   _INTERNAL_REQUEST   
  D  
-
pcap_if   rpcap_filterbpf_insn   rpcap_startcapreq   _OPEN_INSTANCE   
daemon_slpars   pcap_pkthdr   rpcap_findalldevs_if   rpcap_stats   _PACKET_OID_DATA   
  J  
-
pcap_rmtauth   rpcap_findalldevs_ifaddr   
  S  
-
_PACKET_RESERVED   
JIT_BPF_Filter   pcap_samp   
A | B | D | J | P | R | S | _
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/daemon_8h.html b/ledset/WpdPack_4_1_2/docs/html/daemon_8h.html deleted file mode 100644 index 9356c74..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/daemon_8h.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -WinPcap: daemon.h File Reference - - - - - - -
-

daemon.h File Reference

-

Go to the source code of this file.

- - - - - - - -

Data Structures

struct  daemon_slpars
 Structure that keeps the parameters needed by the daemon_serviceloop() function. More...

Functions

void daemon_serviceloop (void *ptr)
void pthread_suspend (int msec)
-

Function Documentation

- -
-
- - - - - - - - - -
void daemon_serviceloop (void *  ptr ) 
-
-
- -
-
- -
-
- - - - - - - - - -
void pthread_suspend (int  msec ) 
-
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/daemon_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/daemon_8h_source.html deleted file mode 100644 index c1676ed..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/daemon_8h_source.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - -WinPcap: daemon.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/deprecated.html b/ledset/WpdPack_4_1_2/docs/html/deprecated.html deleted file mode 100644 index b6e9016..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/deprecated.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - -WinPcap: Deprecated List - - - - - - -
- - -

Deprecated List

-
-
Global pcap_file
-

Due to incompatibilities between the C Runtime (CRT) used to compile WinPcap and the one used by WinPcap-based applications, this function may return an invalid FILE pointer, i.e. a descriptor that causes all the standard I/O stream functions (ftell, fseek, fclose...) to fail. The function is still available for backwards binary compatibility, only.

-

-
-
-

-
-
Global pcap_lookupdev
-

Use pcap_findalldevs() or pcap_findalldevs_ex() instead.

-

-
-
-

-
-
Global pcap_lookupnet
-

Use pcap_findalldevs() or pcap_findalldevs_ex() instead.

-

-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/doxygen.png b/ledset/WpdPack_4_1_2/docs/html/doxygen.png deleted file mode 100644 index f0a274bbaffdd67f6d784c894d9cf28729db0e14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/ledset/WpdPack_4_1_2/docs/html/doxygen__groups_8txt.html b/ledset/WpdPack_4_1_2/docs/html/doxygen__groups_8txt.html deleted file mode 100644 index 8935e3b..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/doxygen__groups_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: doxygen_groups.txt File Reference - - - - - - -
-

doxygen_groups.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/dump.gif b/ledset/WpdPack_4_1_2/docs/html/dump.gif deleted file mode 100644 index dfc0af8710ebd421e94f20cf015adf014495cec6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6353 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 h+jw1O{p-Hg^ceYVmD3-fl{RM6| zmJMaxG{ut*eaeTiN{)%{Kq77=59GSCFhrEoFVKm)P|Jm^oG6t;OWBf;rJr%IQXPzu zAnhyOGRkg*BuJgAvv&-O(NKc-q&doE!E>k9tuoF{u(SP|qT9UlGv1hN!+Or=g^!%8 zo58~8dm-oLZsfFX%}0q(tNK6A*t0E6T!!G{VIDT^?>J=EP(r(KvI1A|)00Dj(^P;l zTHpQ7Px4fQ-v^zMXAJt%UoP`@?nnEGUILBo+>z)BPqjX+3umx?Sk1}_`R)xJhzIX@Oi^I_ zX%&n9XCqtff~XDH!ia>sSF?Oz*V>jNuCbcOF`%*r4qr_q}++u z(s61V-@l?YKUX@Wn4fT#nQ8OQzS1+4ty)WetV&zUfawF*GdXze*WX$?SFLB+_|w+0 z_OZZ?Y^O*dEax?@Y9rUZWoSJI(GR5NBeS?%3IaE(D)It$Xw-KRh*_7SXrV-EQLHS! zGB;k4{=L*r^#ZLd)5wTcj zU;=iIuF%+!%hgJ}CbHMiTf zCRIad0$e_(H7~G(y?c4oI(I%EP&VrbBXrT-oE6A%{U_;=t<9lwtE4?r6`s5|oYukf zll-E@_zp>RY3t3XW=?c)>!|wFh(Vt=k9lb``wL1?02`bJl06mdT=^J{ANlMVwa*oDRQ; zI9v|Cl6<(5M63;5O*P;dlki62{c2M^CS>b{g<75wEz^RGNUQ}@@Yq|dZ;N?dsJql9y|B%~ zb)R~tgs-FDo$wFpaL6X3zJQ9@FRJ&Pn5RaZNEdSKwrDdZ>w`I+iU1GedwAK$qy09& zoq=-p0u;TXZ-JMoFhe!LWI~L9%<`#MJhTVy<<3$Svu7Q)LM3CB;uOKxc{SSfy1f-c zL79}3GES%rMA=JMPxQNvx*qkE_D zFnMG#D-#Wo{Q8bt_^Y-60Hy@eD+T}tiv}LRAR4)2!9oIeCGR;K8VkUJ`SuHh+RNeW zq)|5=fdcs$ppO`RB!^;F(zk}wFMlKx8uq+G_W>S=p$q*1EHf~|RGH4V8{u{ui!E+E zGb09z*11jM?JzeiKZ-nQ^nq79+di`z!w7KqAN)Wc^|y zQWaKVdwJlTIT!=rv6h`@nGM(&H_qX*OtKgmgAsm&cvnzsB>+(fnNmvgb8Sj~yWJD^ zW+AuPzkaC~i?lXgp!S10x*6DBDbL2xjx)V&Xp1CFQmc%pXK>f=MOVKXOJY}D zkh%Hd_Kv?pSUEU^@mqnlGu_R{;S~l*s+#AYdD?r=tAMA*URk-V$Jt0JdUgLBmxM*H zkaLEO8hM#7q|Gfo(@6#@*8WFEpf6hchoouEtA{Otsj^|p;&Af7)i2q}YNMqXUlc@q z+Iv99d4)-~&=N5sq=65l&z`ufDMA__{G>thXyJ-l7vIr2PTDzE!IT&nvSSxx)4Ff+;JdP@DMcOm5}W5GpPXl@)S zZku^8@Dp@^5PwdlDQhu%V`%mlMq6wJAiYi9FxNyFjH*bxSzW)6TCh0Yx{7nwzvgXe - - - -WinPcap: fileconf.h File Reference - - - - - - -
-

fileconf.h File Reference

-

Go to the source code of this file.

- - - - -

Functions

void fileconf_read (int sign)
int fileconf_save (const char *savefile)
-

Function Documentation

- -
-
- - - - - - - - - -
void fileconf_read (int  sign ) 
-
-
- -
-
- -
-
- - - - - - - - - -
int fileconf_save (const char *  savefile ) 
-
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/fileconf_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/fileconf_8h_source.html deleted file mode 100644 index 6981255..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/fileconf_8h_source.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - -WinPcap: fileconf.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/files.html b/ledset/WpdPack_4_1_2/docs/html/files.html deleted file mode 100644 index aedd63d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/files.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - -WinPcap: File Index - - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2blank.png b/ledset/WpdPack_4_1_2/docs/html/ftv2blank.png deleted file mode 100644 index 493c3c0b615ade5b22027bde773faf2c0e076d66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr2qYM%T@!Q%(o7{me!&ckj8p!u14)&*MwA5S zr6z#mEsk^N1FBF3sc_EE%}vcKVF=AhO-xa6_jFST&P^;T z2~I3aEm8;rVk12R#UIz>f`J-DJY5_^DsClP9B62eH+WF*G=YJMp~A-KbWwke5Kx}M M)78&qol`;+0EL(^EC2ui diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2doc.png b/ledset/WpdPack_4_1_2/docs/html/ftv2doc.png deleted file mode 100644 index f72999f92172cca6edaa2538286b3e369bec9f49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^5yjnX4egh%q=bp-`Pe zR7&bp17l3gfhmh7Fm(iZ2eAfco|q!h5)>qKG?UBh!IC9QGMbJAHf6IEiufk_g|d7~ qkWqJ4k(|I-Aeo-5U~n{Fnc?dN!3Uwu?t6hQVDNPHb6Mw<&;$TLIZ`G7 diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2folderclosed.png b/ledset/WpdPack_4_1_2/docs/html/ftv2folderclosed.png deleted file mode 100644 index d6d063440cbf13c4128dacd96661b6fce58abf26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^55uo^`BphW;jCHO69?}tw{JfcdnZ<*@N=4I z?xF5Qc|QYEmKAIZ;JRGVHe=bn*tx1_|J^^vyg*oVM#A1kZlFULJYD@<);T3K0RTgB BWg7qh diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2folderopen.png b/ledset/WpdPack_4_1_2/docs/html/ftv2folderopen.png deleted file mode 100644 index bbe2c913cf493ee37ad8e3a5132382138d93ac92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^5u(C zYP)Mg%H-DB+{J~>rPn_#pYTax?r*V6ubqGX{lvROQ{?n5_cbm+cQAOm`njxgN@xNA D92;js diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2lastnode.png b/ledset/WpdPack_4_1_2/docs/html/ftv2lastnode.png deleted file mode 100644 index e7b9ba90cb0cf71c8ce662956bfee7d64cf60fa6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!py+H=+kU?6UZ?L@CkAK|NlRbNhD}!Xpp$P zU;Pg)ksC(lf|p%(p+w2Gk+!>EaktaVt4N i!r*{E4>QXNV>t$uAA#a^n)TVt_DW*G8-srQl%FeIsRSdYm zeDdtWec}u&7@8h5rqv#p7g*pRdwwmugmlS-+cHV~j}#7`Nwj9m+AU)JGGo`8z_}`K z?s#Xsy%Z;1_jl5Y+?Gum8WyK6`MBvup0SAOKJ)mWcHyteJ?WLL>>-)=?&<$H&t5oH Vd!azZ1yDdSc)I$ztaD0e0sw}(dc*(# diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2mlastnode.png b/ledset/WpdPack_4_1_2/docs/html/ftv2mlastnode.png deleted file mode 100644 index 09ceb6adb01054ce799ad20c0e818ab9272f2df2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr#LU3Jc=+&fg$isFPOjJ*AaIJQGm()YSDb0rfjgNefXW#>UHx3vIVCg! E0ORy6RsaA1 diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2mnode.png b/ledset/WpdPack_4_1_2/docs/html/ftv2mnode.png deleted file mode 100644 index 3254c05112199fbc80aad313611c58a5b388792d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!py+H=+kU?6Ub2s@Ck7}aNq!ti3c<^Gz9OH zn+a6GSQ6wH%;50sMjDVKR^l2_5}cn_Ql40p%8;I!W>k=uu3)5RqGz-?&YcgaLd(;| zF{I*Fa>4?=2W(CyOv{5p*uLi}G<-ambjQcb>&~4!CzK3KXWY6d$*{eWU47N}X+XCz OFnGH9xvXPg)ksC(lf|p%(p+w2Gk+y>EaktaVt4N l!r*{E4>Lv;t diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2plastnode.png b/ledset/WpdPack_4_1_2/docs/html/ftv2plastnode.png deleted file mode 100644 index 0b07e00913d8069ebbb51bd7fd6d70d8bba88f75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr#LU3Jc=+&MJ diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2pnode.png b/ledset/WpdPack_4_1_2/docs/html/ftv2pnode.png deleted file mode 100644 index 2001b797ba2b98a4127f1d3efca64aef08bf6d51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!py+H=+kU?6Ub2s@Ck7}aNq!ti3c<^Gz9OH zn+a6GSQ6wH%;50sMjDVKR^l2_5}cn_Ql40p%8;I!W>k=uu3)5RqGz-?&Ycga!obtT zF{I*Fa>4?=2W(Dkd1@Anj~<0|oqBMOmqox%*rjK-r)THv+0v0L%h-agt(X~hWwYzA SIxU|Ma*U^|pUXO@geCywmoZiV diff --git a/ledset/WpdPack_4_1_2/docs/html/ftv2vertline.png b/ledset/WpdPack_4_1_2/docs/html/ftv2vertline.png deleted file mode 100644 index b330f3a33c0085c183ff39fc56b1b274160c1da0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 229 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!py+H=+kU?6UZ?L@CkAK|NlRbNhD}!Xpp$P zU;Pg)ksC(lf|p%(p+w2Gqgt>EaktaVt4N e!r*{^G#i7W2*a|cHZQDzQVgE1elF{r5}E+)J2fZ( diff --git a/ledset/WpdPack_4_1_2/docs/html/funcs_2pcap_8h.html b/ledset/WpdPack_4_1_2/docs/html/funcs_2pcap_8h.html deleted file mode 100644 index f289707..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/funcs_2pcap_8h.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - -WinPcap: pcap.h File Reference - - - - - - -
-

pcap.h File Reference

-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

Windows-specific Extensions

The functions in this section extend libpcap to offer advanced functionalities (like remote packet capture, packet buffer size variation or high-precision packet injection). Howerver, at the moment they can be used only in Windows.

-

PAirpcapHandle pcap_get_airpcap_handle (pcap_t *p)
 Returns the AirPcap handler associated with an adapter. This handler can be used to change the wireless-related settings of the CACE Technologies AirPcap wireless capture adapters.
int pcap_offline_filter (struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
 Returns if a given filter applies to an offline packet.
int pcap_live_dump (pcap_t *p, char *filename, int maxsize, int maxpacks)
 Save a capture to file.
int pcap_live_dump_ended (pcap_t *p, int sync)
 Return the status of the kernel dump process, i.e. tells if one of the limits defined with pcap_live_dump() has been reached.
struct pcap_statpcap_stats_ex (pcap_t *p, int *pcap_stat_size)
 Return statistics on current capture.
int pcap_setbuff (pcap_t *p, int dim)
 Set the size of the kernel buffer associated with an adapter.
int pcap_setmode (pcap_t *p, int mode)
 Set the working mode of the interface p to mode.
int pcap_setmintocopy (pcap_t *p, int size)
 Set the minumum amount of data received by the kernel in a single call.
HANDLE pcap_getevent (pcap_t *p)
 Return the handle of the event associated with the interface p.
pcap_send_queuepcap_sendqueue_alloc (u_int memsize)
 Allocate a send queue.
void pcap_sendqueue_destroy (pcap_send_queue *queue)
 Destroy a send queue.
int pcap_sendqueue_queue (pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Add a packet to a send queue.
u_int pcap_sendqueue_transmit (pcap_t *p, pcap_send_queue *queue, int sync)
 Send a queue of raw packets to the network.
int pcap_findalldevs_ex (char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
 Create a list of network devices that can be opened with pcap_open().
int pcap_createsrcstr (char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
 Accept a set of strings (host name, port, ...), and it returns the complete source string according to the new format (e.g. 'rpcap://1.2.3.4/eth0').
int pcap_parsesrcstr (const char *source, int *type, char *host, char *port, char *name, char *errbuf)
 Parse the source string and returns the pieces in which the source can be split.
pcap_tpcap_open (const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
 Open a generic source in order to capture / send (WinPcap only) traffic.
struct pcap_samppcap_setsampling (pcap_t *p)
 Define a sampling method for packet capture.
SOCKET pcap_remoteact_accept (const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
 Block until a network connection is accepted (active mode only).
int pcap_remoteact_close (const char *host, char *errbuf)
 Drop an active connection (active mode only).
void pcap_remoteact_cleanup ()
 Clean the socket that is currently used in waiting active connections.
int pcap_remoteact_list (char *hostlist, char sep, int size, char *errbuf)
 Return the hostname of the host that have an active connection with us (active mode only).

Unix-compatible Functions

These functions are part of the libpcap library, and therefore work both on Windows and on Linux.

-
Note:
errbuf in pcap_open_live(), pcap_open_dead(), pcap_open_offline(), pcap_setnonblock(), pcap_getnonblock(), pcap_findalldevs(), pcap_lookupdev(), and pcap_lookupnet() is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.
-

typedef void(* pcap_handler )(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Prototype of the callback function that receives the packets.
pcap_tpcap_open_live (const char *device, int snaplen, int promisc, int to_ms, char *ebuf)
 Open a live capture from the network.
pcap_tpcap_open_dead (int linktype, int snaplen)
 Create a pcap_t structure without starting a capture.
pcap_tpcap_open_offline (const char *fname, char *errbuf)
 Open a savefile in the tcpdump/libpcap format to read packets.
pcap_dumper_tpcap_dump_open (pcap_t *p, const char *fname)
 Open a file to write packets.
int pcap_setnonblock (pcap_t *p, int nonblock, char *errbuf)
 Switch between blocking and nonblocking mode.
int pcap_getnonblock (pcap_t *p, char *errbuf)
 Get the "non-blocking" state of an interface.
int pcap_findalldevs (pcap_if_t **alldevsp, char *errbuf)
 Construct a list of network devices that can be opened with pcap_open_live().
void pcap_freealldevs (pcap_if_t *alldevsp)
 Free an interface list returned by pcap_findalldevs().
char * pcap_lookupdev (char *errbuf)
 Return the first valid device in the system.
int pcap_lookupnet (const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf)
 Return the subnet and netmask of an interface.
int pcap_dispatch (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets.
int pcap_loop (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets.
u_char * pcap_next (pcap_t *p, struct pcap_pkthdr *h)
 Return the next available packet.
int pcap_next_ex (pcap_t *p, struct pcap_pkthdr **pkt_header, const u_char **pkt_data)
 Read a packet from an interface or from an offline capture.
void pcap_breakloop (pcap_t *)
 set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping.
int pcap_sendpacket (pcap_t *p, u_char *buf, int size)
 Send a raw packet.
void pcap_dump (u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
 Save a packet to disk.
long pcap_dump_ftell (pcap_dumper_t *)
 Return the file position for a "savefile".
int pcap_compile (pcap_t *p, struct bpf_program *fp, char *str, int optimize, bpf_u_int32 netmask)
 Compile a packet filter, converting an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.
int pcap_compile_nopcap (int snaplen_arg, int linktype_arg, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask)
 Compile a packet filter without the need of opening an adapter. This function converts an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.
int pcap_setfilter (pcap_t *p, struct bpf_program *fp)
 Associate a filter to a capture.
void pcap_freecode (struct bpf_program *fp)
 Free a filter.
int pcap_datalink (pcap_t *p)
 Return the link layer of an adapter.
int pcap_list_datalinks (pcap_t *p, int **dlt_buf)
 list datalinks
int pcap_set_datalink (pcap_t *p, int dlt)
 Set the current data link type of the pcap descriptor to the type specified by dlt. -1 is returned on failure.
int pcap_datalink_name_to_val (const char *name)
 Translates a data link type name, which is a DLT_ name with the DLT_ removed, to the corresponding data link type value. The translation is case-insensitive. -1 is returned on failure.
const char * pcap_datalink_val_to_name (int dlt)
 Translates a data link type value to the corresponding data link type name. NULL is returned on failure.
const char * pcap_datalink_val_to_description (int dlt)
 Translates a data link type value to a short description of that data link type. NULL is returned on failure.
int pcap_snapshot (pcap_t *p)
 Return the dimension of the packet portion (in bytes) that is delivered to the application.
int pcap_is_swapped (pcap_t *p)
 returns true if the current savefile uses a different byte order than the current system.
int pcap_major_version (pcap_t *p)
 return the major version number of the pcap library used to write the savefile.
int pcap_minor_version (pcap_t *p)
 return the minor version number of the pcap library used to write the savefile.
FILE * pcap_file (pcap_t *p)
 Return the standard stream of an offline capture.
int pcap_stats (pcap_t *p, struct pcap_stat *ps)
 Return statistics on current capture.
void pcap_perror (pcap_t *p, char *prefix)
 print the text of the last pcap library error on stderr, prefixed by prefix.
char * pcap_geterr (pcap_t *p)
 return the error text pertaining to the last pcap library error.
char * pcap_strerror (int error)
 Provided in case strerror() isn't available.
const char * pcap_lib_version (void)
 Returns a pointer to a string giving information about the version of the libpcap library being used; note that it contains more information than just a version number.
void pcap_close (pcap_t *p)
 close the files associated with p and deallocates resources.
FILE * pcap_dump_file (pcap_dumper_t *p)
 return the standard I/O stream of the 'savefile' opened by pcap_dump_open().
int pcap_dump_flush (pcap_dumper_t *p)
 Flushes the output buffer to the ``savefile,'' so that any packets written with pcap_dump() but not yet written to the ``savefile'' will be written. -1 is returned on error, 0 on success.
void pcap_dump_close (pcap_dumper_t *p)
 Closes a savefile.
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/funcs_2pcap_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/funcs_2pcap_8h_source.html deleted file mode 100644 index 487998c..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/funcs_2pcap_8h_source.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - -WinPcap: pcap.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/functions.html b/ledset/WpdPack_4_1_2/docs/html/functions.html deleted file mode 100644 index fa463f1..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/functions.html +++ /dev/null @@ -1,627 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all struct and union fields with links to the structures/unions they belong to: - -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- h -

- - -

- i -

- - -

- j -

- - -

- k -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- u -

- - -

- v -

- - -

- w -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/functions_vars.html b/ledset/WpdPack_4_1_2/docs/html/functions_vars.html deleted file mode 100644 index c399dc5..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/functions_vars.html +++ /dev/null @@ -1,627 +0,0 @@ - - - - -WinPcap: Data Fields - Variables - - - - - - -
-  - -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- h -

- - -

- i -

- - -

- j -

- - -

- k -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- u -

- - -

- v -

- - -

- w -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals.html b/ledset/WpdPack_4_1_2/docs/html/globals.html deleted file mode 100644 index 82c8e27..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- a -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x62.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x62.html deleted file mode 100644 index 84f8b42..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x62.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- b -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x63.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x63.html deleted file mode 100644 index 22b4d5a..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x63.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- c -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x64.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x64.html deleted file mode 100644 index 434d731..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x64.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- d -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x65.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x65.html deleted file mode 100644 index e911826..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x65.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- e -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x66.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x66.html deleted file mode 100644 index a1e55ee..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x66.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- f -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x67.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x67.html deleted file mode 100644 index f4747df..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x67.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- g -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x68.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x68.html deleted file mode 100644 index a43c30e..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x68.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- h -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x69.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x69.html deleted file mode 100644 index e9ad145..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x69.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- i -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x6a.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x6a.html deleted file mode 100644 index 444b087..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x6a.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- j -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x6b.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x6b.html deleted file mode 100644 index 0ea7464..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x6b.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- k -

    -
  • KERNEL_EVENT_NAMESPACE -: Packet.h -
  • -
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x6d.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x6d.html deleted file mode 100644 index 480309d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x6d.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- m -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x6e.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x6e.html deleted file mode 100644 index 386c495..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x6e.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- n -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x6f.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x6f.html deleted file mode 100644 index 087e6cb..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x6f.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- o -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x70.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x70.html deleted file mode 100644 index 9232ad9..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x70.html +++ /dev/null @@ -1,486 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- p -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x72.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x72.html deleted file mode 100644 index 2cb12b2..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x72.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- r -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x73.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x73.html deleted file mode 100644 index 440d773..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x73.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- s -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x74.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x74.html deleted file mode 100644 index 41cda97..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x74.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- t -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_0x75.html b/ledset/WpdPack_4_1_2/docs/html/globals_0x75.html deleted file mode 100644 index b0b5663..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_0x75.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: - -

- u -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_defs.html b/ledset/WpdPack_4_1_2/docs/html/globals_defs.html deleted file mode 100644 index 7647ce8..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_defs.html +++ /dev/null @@ -1,707 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-  - -

- a -

- - -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- i -

- - -

- j -

- - -

- k -

    -
  • KERNEL_EVENT_NAMESPACE -: Packet.h -
  • -
- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- t -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_enum.html b/ledset/WpdPack_4_1_2/docs/html/globals_enum.html deleted file mode 100644 index 1170e26..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_enum.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
    -
  • ADAPTER_BINDING_STATUS -: Packet.h -
  • -
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_eval.html b/ledset/WpdPack_4_1_2/docs/html/globals_eval.html deleted file mode 100644 index d5b0973..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_eval.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_func.html b/ledset/WpdPack_4_1_2/docs/html/globals_func.html deleted file mode 100644 index 781f9da..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_func.html +++ /dev/null @@ -1,526 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-  - -

- b -

- - -

- c -

- - -

- d -

- - -

- f -

- - -

- g -

- - -

- m -

- - -

- n -

- - -

- p -

- - -

- r -

- - -

- s -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_type.html b/ledset/WpdPack_4_1_2/docs/html/globals_type.html deleted file mode 100644 index a5c8547..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_type.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/globals_vars.html b/ledset/WpdPack_4_1_2/docs/html/globals_vars.html deleted file mode 100644 index 1af4db9..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/globals_vars.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -WinPcap: Data Fields - - - - - - -
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__NPF.html b/ledset/WpdPack_4_1_2/docs/html/group__NPF.html deleted file mode 100644 index f3514d7..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__NPF.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - -WinPcap: NPF driver internals manual - - - - - - -
-

NPF driver internals manual
- -[WinPcap internals] -

- - - - - -

Modules

 NPF I/O control codes
 NPF structures and definitions
 NPF functions
 NPF Just-in-time compiler definitions
-

Detailed Description

- - - - - - - - - - - -

This section documents the internals of the Netgroup Packet Filter (NPF), the kernel -portion of WinPcap. Normal users are probably interested in how to use WinPcap -and not in its internal structure. Therefore -the information present in this module is destined mainly to WinPcap developers and maintainers, or to -the people interested in how the driver works. In particular, a good knowledge -of OSes, networking and Win32 kernel programming and device drivers development -is required to profitably read this section. 

-

NPF is the WinPcap component that does the hard work, processing the packets -that transit on the network and exporting capture, injection and analysis -capabilities to user-level.

-

The following paragraphs will describe the interaction of NPF with the -OS and its basic structure.

-

NPF and NDIS

-

NDIS (Network Driver Interface Specification) is a standard that defines the -communication between a network adapter (or, better, the driver that manages it) -and the protocol drivers (that implement for example TCP/IP). Main NDIS purpose -is to act as a wrapper that allows protocol drivers to send and receive packets -onto a network (LAN or WAN) without caring either the particular adapter or the -particular Win32 operating system.

-

NDIS supports three types of network drivers:

-
    -
  1. Network interface card or NIC drivers. NIC drivers - directly manage network interface cards, referred to as NICs. The NIC - drivers interface directly to the hardware at their lower edge and at their - upper edge present an interface to allow upper layers to send packets on the - network, to handle interrupts, to reset the NIC, to halt the NIC and to - query and set the operational characteristics of the driver. NIC drivers can - be either miniports or legacy full NIC drivers. -
      -
    • Miniport drivers implement only the hardware-specific operations - necessary to manage a NIC, including sending and receiving data on the - NIC. Operations common to all lowest level NIC drivers, such as - synchronization, is provided by NDIS. Miniports do not call operating - system routines directly; their interface to the operating system is - NDIS.
      - A miniport does not keep track of bindings. It merely passes packets up - to NDIS and NDIS makes sure that these packets are passed to the correct - protocols. -
    • Full NIC drivers have been written to perform both hardware-specific - operations and all the synchronization and queuing operations usually - done by NDIS. Full NIC drivers, for instance, maintain their own binding - information for indicating received data. 
    • -
    -
  2. Intermediate drivers. Intermediate drivers interface - between an upper-level driver such as a protocol driver and a miniport. To - the upper-level driver, an intermediate driver looks like a miniport. To a - miniport, the intermediate driver looks like a protocol driver. An - intermediate protocol driver can layer on top of another intermediate driver - although such layering could have a negative effect on system performance. A - typical reason for developing an intermediate driver is to perform media - translation between an existing legacy protocol driver and a miniport that - manages a NIC for a new media type unknown to the protocol driver. For - instance, an intermediate driver could translate from LAN protocol to ATM - protocol. An intermediate driver cannot communicate with user-mode - applications, but only with other NDIS drivers. -
  3. Transport drivers or protocol drivers. A protocol driver implements - a network protocol stack such as IPX/SPX or TCP/IP, offering its services - over one or more network interface cards. A protocol driver services - application-layer clients at its upper edge and connects to one or more NIC - driver(s) or intermediate NDIS driver(s) at its lower edge.
  4. -
-

NPF is implemented as a protocol driver. This is not the best possible choice -from the performance point of view, but allows reasonable independence from the -MAC layer and as well as complete access to the raw traffic.

-

Notice that the various Win32 operating systems have different versions of -NDIS: NPF is NDIS 5 compliant under Windows 2000 and its derivations (like -Windows XP), NDIS 3 -compliant on the other Win32 platforms. 

-

Next figure shows the position of NPF inside the NDIS stack:

-

-

Figure 1: NPF inside NDIS.

-

The interaction with the OS is normally asynchronous. This means that the -driver provides a set of callback functions that are invoked by the system when -some operation is required to NPF. NPF exports callback functions for all the I/O operations of the -applications: open, close, read, write, ioctl, etc.

-

The interaction with NDIS is asynchronous as well: events -like the arrival of a new packet are notified to NPF through a callback -function (Packet_tap() in this case). Furthermore, the interaction with NDIS and -the NIC -driver takes always place by means of non blocking functions: when NPF invokes a -NDIS function, the call returns immediately; when the processing ends, NDIS invokes -a specific NPF -callback to inform that the function has finished. The -driver exports a callback for any low-level operation, like sending packets, -setting or requesting parameters on the NIC, etc.

- -

NPF structure basics

- -

Next figure shows the structure of WinPcap, with particular reference to the -NPF driver.

- -

- -

Figure 2: NPF device driver. - -

NPF is able to -perform a number of different operations: capture, monitoring, dump to disk, -packet injection. The following paragraphs will describe shortly each of these -operations.

-

Packet Capture

-

The most important operation of NPF is packet capture. -During a capture, the driver sniffs the packets using a network interface and delivers them intact to the -user-level applications.  -

-

The capture process relies on two main components:

-
    -
  • -

    A packet filter that decides if an - incoming packet has to be accepted and copied to the listening application. - Most applications using NPF reject far more packets than those accepted, - therefore a versatile and efficient packet filter is critical for good - over-all performance. A packet filter is a function with boolean output - that is applied to a packet. If the value of the function is true the - capture driver copies - the packet to the application; if it is false the packet is discarded. NPF - packet filter is a bit more complex, because it determines not only if the - packet should be kept, but also the amount of bytes to keep. The filtering - system adopted by NPF derives from the BSD Packet Filter (BPF), a - virtual processor able to execute filtering programs expressed in a - pseudo-assembler and created at user level. The application takes a user-defined filter (e.g. pick up all UDP packets) - and, using wpcap.dll, compiles them into a BPF program (e.g. if the - packet is IP and the protocol type field is equal to 17, then return - true). Then, the application uses the BIOCSETF - IOCTL to inject the filter in the kernel. At this point, the program - is executed for every incoming packet, and only the conformant packets are - accepted. Unlike traditional solutions, NPF does not interpret - the filters, but it executes them. For performance reasons, before using the - filter NPF feeds it to a JIT compiler that translates it into a native 80x86 - function. When a packet is captured, NPF calls this native function instead - of invoking the filter interpreter, and this makes the process very fast. - The concept behind this optimization is very similar to the one of Java - jitters.

  • -
  • -

    A circular buffer to store the - packets and avoid loss. A packet is stored in the buffer with a header that - maintains information like the timestamp and the size of the packet. - Moreover, an alignment padding is inserted between the packets in order to - speed-up the access to their data by the applications. Groups of  packets can be copied - with a single operation from the NPF buffer to the applications. This - improves performances because it minimizes the number of reads. If the - buffer is full when a new packet arrives, the packet is discarded and - hence it's lost. Both kernel and user buffer can be -changed at runtime for maximum versatility: packet.dll and wpcap.dll provide functions for this purpose.

  • -
-

The size of the user buffer is very -important because it determines the maximum amount of data that can be -copied from kernel space to user space within a single system call. On the other -hand, it can be noticed that also the minimum amount of data that can be copied -in a single call is extremely important. In presence of a large value for this -variable, the kernel waits for the arrival of several packets before copying the -data to the user. This guarantees a low number of system calls, i.e. low -processor usage, which is a good setting for applications like sniffers. On the -other side, a small value means that the kernel will copy the packets as soon as -the application is ready to receive them. This is excellent for real time -applications (like, for example, ARP redirectors or bridges) that need the better -responsiveness from the kernel. -From this point of view, NPF has a configurable behavior, that allows users to choose between -best efficiency or best responsiveness (or any intermediate situation). 

-

The wpcap library includes a couple of system calls that can be used both to set the timeout after -which a read expires and the minimum amount of data that can be transferred to -the application. By default, the read timeout is 1 second, and the minimum -amount of data copied between the kernel and the application is 16K.

-

Packet injection

-

NPF allows to write raw packets to the network. To send data, a -user-level application performs a WriteFile() system call on the NPF device file. The data is sent to the network as is, without encapsulating it in -any protocol, therefore the application will have to build the various headers -for each packet. The application usually does not need to generate the FCS -because it is calculated by the network adapter hardware and it is attached -automatically at the end of a packet before sending it to the network.

-

In normal situations, the sending rate of the packets to the network is not -very high because of the need of a system call for each packet. For this reason, -the possibility to send a single packet more than once with a single write -system call has been added. The user-level application can set, with an IOCTL -call (code pBIOCSWRITEREP), the number of times a single packet will be -repeated: for example, if this value is set to 1000, every raw packet written by -the application on the driver's device file will be sent 1000 times. This -feature can be used to generate high speed traffic for testing purposes: the -overload of context switches is no longer present, so performance is remarkably -better. 

- -

Network monitoring

-

WinPcap offers a kernel-level programmable monitoring -module, able to calculate simple statistics on the network traffic. The -idea behind this module is shown in Figure -2: the statistics can be gathered without the need to copy the packets to -the application, that simply receives and displays the results obtained from the -monitoring engine. This allows to avoid great part of the capture overhead in -terms of memory and CPU clocks.

-

The monitoring engine is -made of a classifier followed by a counter. The packets are -classified using the filtering engine of NPF, that provides a configurable way -to select a subset of the traffic. The data that pass the filter go to the -counter, that keeps some variables like the number of packets and -the amount of bytes accepted by the filter and updates them with the data of the -incoming packets. These variables are passed to the user-level application at -regular intervals whose period can be configured by the user. No buffers are -allocated at kernel and user level.

-

Dump to disk

-

The dump to disk -capability can be used to save the network data to disk directly from kernel -mode. -

-

-

-

Figure 3: packet capture versus kernel-level dump. -

-

In -traditional systems, the path covered by the packets that are saved to disk is -the one followed by the black arrows in Figure -3: every packet is copied several times, and normally 4 buffers are -allocated: the one of the capture driver, the one in the application that keeps -the captured data, the one of the stdio functions (or similar) that are used by -the application to write on file, and finally the one of the file system. - -

-

When the -kernel-level traffic logging feature of NPF is enabled, the capture driver -addresses the file system directly, hence the path covered by the packets is the -one of the red dotted arrow: only two buffers and a single copy are necessary, -the number of system call is drastically reduced, therefore the performance is -considerably better. - -

-

Current -implementation dumps the to disk in the widely used libpcap format. It gives -also the possibility to filter the traffic before the dump process in order to -select the packet that will go to the disk. -

-

Further reading

-

The structure of NPF and its filtering engine derive directly from the one of -the BSD Packet Filter (BPF), so if you are interested the subject you can read -the following papers:

-

- S. McCanne and V. Jacobson, The -BSD Packet Filter: A New Architecture for User-level Packet Capture. -Proceedings of the 1993 Winter USENIX Technical Conference (San Diego, CA, Jan. -1993), USENIX. 

-

- A. Begel, S. McCanne, S.L.Graham, BPF+: Exploiting -Global Data-flow Optimization in a Generalized Packet Filter Architecture, -Proceedings of ACM SIGCOMM '99, pages 123-134, Conference on Applications, -technologies, architectures, and protocols for computer communications, August -30 - September 3, 1999, Cambridge, USA

-

Note

-

The code documented in this manual is the one of the Windows NTx version of -NPF. The Windows 9x code is very similar, but it is less efficient and -lacks advanced features like kernel-mode dump.

-

- - - - - -

- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__NPF__code.html b/ledset/WpdPack_4_1_2/docs/html/group__NPF__code.html deleted file mode 100644 index 3001a53..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__NPF__code.html +++ /dev/null @@ -1,1667 +0,0 @@ - - - - -WinPcap: NPF functions - - - - - - -
-

NPF functions
- -[NPF driver internals manual] -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 The initialization routine of the driver.
PWCHAR getAdaptersList (VOID)
 Returns the list of the MACs available on the system.
PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings (VOID)
 Returns the MACs that bind to TCP/IP.
BOOLEAN NPF_CreateDevice (IN OUT PDRIVER_OBJECT adriverObjectP, IN PUNICODE_STRING amacNameP)
 Creates a device for a given MAC.
NTSTATUS NPF_Open (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Opens a new instance of the driver.
VOID NPF_OpenAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenErrorStatus)
 Ends the opening of an adapter.
NTSTATUS NPF_Cleanup (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Closes an instance of the driver.
NTSTATUS NPF_Close (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
VOID NPF_CloseAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends the closing of an adapter.
NDIS_STATUS NPF_tap (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE MacReceiveContext, IN PVOID HeaderBuffer, IN UINT HeaderBufferSize, IN PVOID LookAheadBuffer, IN UINT LookaheadBufferSize, IN UINT PacketSize)
 Callback invoked by NDIS when a packet arrives from the network.
VOID NPF_TransferDataComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET Packet, IN NDIS_STATUS Status, IN UINT BytesTransferred)
 Ends the transfer of a packet.
VOID NPF_ReceiveComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback function that signals the end of a packet reception.
NTSTATUS NPF_IoControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Handles the IOCTL calls.
VOID NPF_RequestComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_REQUEST pRequest, IN NDIS_STATUS Status)
 Ends an OID request.
NTSTATUS NPF_Write (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Writes a raw packet to the network.
INT NPF_BufferedWrite (IN PIRP Irp, IN PCHAR UserBuff, IN ULONG UserBuffSize, BOOLEAN sync)
 Writes a buffer of raw packets to the network.
VOID NPF_WaitEndOfBufferedWrite (POPEN_INSTANCE Open)
 Waits the completion of all the sends performed by NPF_BufferedWrite.
VOID NPF_SendComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET pPacket, IN NDIS_STATUS Status)
 Ends a send operation.
VOID NPF_ResetComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends a reset of the adapter.
VOID NPF_Status (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN PVOID StatusBuffer, IN UINT StatusBufferSize)
 Callback for NDIS StatusHandler. Not used by NPF.
VOID NPF_StatusComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback for NDIS StatusCompleteHandler. Not used by NPF.
VOID NPF_Unload (IN PDRIVER_OBJECT DriverObject)
 Function called by the OS when NPF is unloaded.
NTSTATUS NPF_Read (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Function that serves the user's reads.
NTSTATUS NPF_ReadRegistry (IN PWSTR *MacDriverName, IN PWSTR *PacketDriverName, IN PUNICODE_STRING RegistryPath)
 Reads the registry keys associated woth NPF if the driver is manually installed via the control panel.
NTSTATUS NPF_QueryRegistryRoutine (IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
 Function used by NPF_ReadRegistry() to quesry the registry keys associated woth NPF if the driver is manually installed via the control panel.
VOID NPF_BindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE BindContext, IN PNDIS_STRING DeviceName, IN PVOID SystemSpecific1, IN PVOID SystemSpecific2)
 Callback for NDIS BindAdapterHandler. Not used by NPF.
VOID NPF_UnbindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE UnbindContext)
 Callback for NDIS UnbindAdapterHandler.
NTSTATUS NPF_OpenDumpFile (POPEN_INSTANCE Open, PUNICODE_STRING fileName, BOOLEAN append)
 Creates the file that will receive the packets when the driver is in dump mode.
NTSTATUS NPF_StartDump (POPEN_INSTANCE Open)
 Starts dump to file.
VOID NPF_DumpThread (PVOID Open)
 The dump thread.
NTSTATUS NPF_SaveCurrentBuffer (POPEN_INSTANCE Open)
 Saves the content of the packet buffer to the file associated with current instance.
VOID NPF_WriteDumpFile (PFILE_OBJECT FileObject, PLARGE_INTEGER Offset, ULONG Length, PMDL Mdl, PIO_STATUS_BLOCK IoStatusBlock)
 Writes a block of packets on the dump file.
NTSTATUS NPF_CloseDumpFile (POPEN_INSTANCE Open)
 Closes the dump file associated with an instance of the driver.
BOOLEAN NPF_StartUsingBinding (IN POPEN_INSTANCE pOpen)
VOID NPF_StopUsingBinding (IN POPEN_INSTANCE pOpen)
VOID NPF_CloseBinding (IN POPEN_INSTANCE pOpen)
BOOLEAN NPF_StartUsingOpenInstance (IN POPEN_INSTANCE pOpen)
VOID NPF_StopUsingOpenInstance (IN POPEN_INSTANCE pOpen)
VOID NPF_CloseOpenInstance (IN POPEN_INSTANCE pOpen)
NTSTATUS NPF_GetDeviceMTU (IN POPEN_INSTANCE pOpen, IN PIRP pIrp, OUT PUINT pMtu)
UINT GetBuffOccupation (POPEN_INSTANCE Open)
 Returns the amount of bytes present in the packet buffer.
JIT_BPF_FilterBPF_jitter (struct bpf_insn *fp, INT nins)
 BPF jitter, builds an x86 function from a BPF program.
BPF_filter_function BPFtoX86 (struct bpf_insn *ins, UINT nins, INT *mem)
 Translates a set of BPF instructions in a set of x86 ones.
void BPF_Destroy_JIT_Filter (JIT_BPF_Filter *Filter)
 Deletes a filtering function that was previously created by BPF_jitter().
-

Function Documentation

- -
-
- - - - - - - - - -
void BPF_Destroy_JIT_Filter (JIT_BPF_Filter Filter ) 
-
-
- -

Deletes a filtering function that was previously created by BPF_jitter().

-
Parameters:
- - -
Filter The filter to destroy.
-
-
-

This function frees the variuos buffers (code, memory, etc.) associated with a filtering function.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
JIT_BPF_Filter* BPF_jitter (struct bpf_insn *  fp,
INT  nins 
)
-
-
- -

BPF jitter, builds an x86 function from a BPF program.

-
Parameters:
- - - -
fp The BPF pseudo-assembly filter that will be translated into x86 code.
nins Number of instructions of the input filter.
-
-
-
Returns:
The JIT_BPF_Filter structure containing the x86 filtering binary.
-

BPF_jitter allocates the buffers for the new native filter and then translates the program pointed by fp calling BPFtoX86().

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
BPF_filter_function BPFtoX86 (struct bpf_insn *  ins,
UINT  nins,
INT *  mem 
)
-
-
- -

Translates a set of BPF instructions in a set of x86 ones.

-
Parameters:
- - - - -
ins Pointer to the BPF instructions that will be translated into x86 code.
nins Number of instructions to translate.
mem Memory used by the x86 function to emulate the RAM of the BPF pseudo processor.
-
-
-
Returns:
The x86 filtering function.
-

This function does the hard work for the JIT compilation. It takes a group of BPF pseudo instructions and through the instruction macros defined in jitter.h it is able to create an function directly executable by NPF.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS DriverEntry (IN PDRIVER_OBJECT  DriverObject,
IN PUNICODE_STRING  RegistryPath 
)
-
-
- -

The initialization routine of the driver.

-
Parameters:
- - - -
DriverObject The driver object of NPF created by the system.
RegistryPath The registry path containing the keys related to the driver.
-
-
-
Returns:
A string containing a list of network adapters.
-

DriverEntry is a mandatory function in a device driver. Like the main() of a user level program, it is called by the system when the driver is loaded in memory and started. Its purpose is to initialize the driver, performing all the allocations and the setup. In particular, DriverEntry registers all the driver's I/O callbacks, creates the devices, defines NPF as a protocol inside NDIS.

- -
-
- -
-
- - - - - - - - - -
PWCHAR getAdaptersList (VOID  ) 
-
-
- -

Returns the list of the MACs available on the system.

-
Returns:
A string containing a list of network adapters.
-

The list of adapters is retrieved from the SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318} registry key. NPF tries to create its bindings from this list. In this way it is possible to be loaded and unloaded dynamically without passing from the control panel.

- -
-
- -
-
- - - - - - - - - -
UINT GetBuffOccupation (POPEN_INSTANCE  Open ) 
-
-
- -

Returns the amount of bytes present in the packet buffer.

-
Parameters:
- - -
Open The NPF instance that closes the file.
-
-
- -
-
- -
-
- - - - - - - - - -
PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings (VOID  ) 
-
-
- -

Returns the MACs that bind to TCP/IP.

-
Returns:
Pointer to the registry key containing the list of adapters on which TCP/IP is bound.
-

If getAdaptersList() fails, NPF tries to obtain the TCP/IP bindings through this function.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_BindAdapter (OUT PNDIS_STATUS  Status,
IN NDIS_HANDLE  BindContext,
IN PNDIS_STRING  DeviceName,
IN PVOID  SystemSpecific1,
IN PVOID  SystemSpecific2 
)
-
-
- -

Callback for NDIS BindAdapterHandler. Not used by NPF.

-

Function called by NDIS when a new adapter is installed on the machine With Plug and Play.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
INT NPF_BufferedWrite (IN PIRP  Irp,
IN PCHAR  UserBuff,
IN ULONG  UserBuffSize,
BOOLEAN  sync 
)
-
-
- -

Writes a buffer of raw packets to the network.

-
Parameters:
- - - - - -
Irp Pointer to the IRP containing the user request.
UserBuff Pointer to the buffer containing the packets to send.
UserBuffSize Size of the buffer with the packets.
sync If set to TRUE, the packets are transmitted respecting their timestamps.
-
-
-
Returns:
The amount of bytes actually sent. If the return value is smaller than the Size parameter, an error occurred during the send. The error can be caused by an adapter problem or by an inconsistent/bogus user buffer.
-

This function is called by the OS in consequence of a BIOCSENDPACKETSNOSYNC or a BIOCSENDPACKETSSYNC IOCTL. The buffer received as input parameter contains an arbitrary number of packets, each of which preceded by a sf_pkthdr structure. NPF_BufferedWrite() scans the buffer and sends every packet via the NdisSend() function. When Sync is set to TRUE, the packets are synchronized with the KeQueryPerformanceCounter() function. This requires a remarkable amount of CPU, but allows to respect the timestamps associated with packets with a precision of some microseconds (depending on the precision of the performance counter of the machine). If Sync is false, the timestamps are ignored and the packets are sent as fat as possible.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Cleanup (IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)
-
-
- -

Closes an instance of the driver.

-
Parameters:
- - - -
DeviceObject Pointer to the device object utilized by the user.
Irp Pointer to the IRP containing the user request.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
-

This function is called when a running instance of the driver is closed by the user with a CloseHandle(). It stops the capture/monitoring/dump process, deallocates the memory and the objects associated with the instance and closing the files. The network adapter is then closed with a call to NdisCloseAdapter.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Close (IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
VOID NPF_CloseAdapterComplete (IN NDIS_HANDLE  ProtocolBindingContext,
IN NDIS_STATUS  Status 
)
-
-
- -

Ends the closing of an adapter.

-
Parameters:
- - - -
ProtocolBindingContext Context of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
Status Status of the close operation performed by NDIS.
-
-
-

Callback function associated with the NdisCloseAdapter() NDIS function. It is invoked by NDIS when the NIC driver has finished a close operation that was previously started by NPF_Close().

- -
-
- -
-
- - - - - - - - - -
VOID NPF_CloseBinding (IN POPEN_INSTANCE  pOpen ) 
-
-
- -
-
- -
-
- - - - - - - - - -
NTSTATUS NPF_CloseDumpFile (POPEN_INSTANCE  Open ) 
-
-
- -

Closes the dump file associated with an instance of the driver.

-
Parameters:
- - -
Open The NPF instance that closes the file.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
- -
-
- -
-
- - - - - - - - - -
VOID NPF_CloseOpenInstance (IN POPEN_INSTANCE  pOpen ) 
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
BOOLEAN NPF_CreateDevice (IN OUT PDRIVER_OBJECT  adriverObjectP,
IN PUNICODE_STRING  amacNameP 
)
-
-
- -

Creates a device for a given MAC.

-
Parameters:
- - - -
adriverObjectP The driver object that will be associated with the device, i.e. the one of NPF.
amacNameP The name of the network interface that the device will point.
-
-
-
Returns:
If the function succeeds, the return value is nonzero.
-

NPF creates a device for every valid network adapter. The new device points to the NPF driver, but contains information about the original device. In this way, when the user opens the new device, NPF will be able to determine the correct adapter to use.

- -
-
- -
-
- - - - - - - - - -
VOID NPF_DumpThread (PVOID  Open ) 
-
-
- -

The dump thread.

-
Parameters:
- - -
Open The NPF instance that creates the thread.
-
-
-

This function moves the content of the NPF kernel buffer to file. It runs in the user context, so at lower priority than the TAP.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_GetDeviceMTU (IN POPEN_INSTANCE  pOpen,
IN PIRP  pIrp,
OUT PUINT  pMtu 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_IoControl (IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)
-
-
- -

Handles the IOCTL calls.

-
Parameters:
- - - -
DeviceObject Pointer to the device object utilized by the user.
Irp Pointer to the IRP containing the user request.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
-

Once the packet capture driver is opened it can be configured from user-level applications with IOCTL commands using the DeviceIoControl() system call. NPF_IoControl receives and serves all the IOCTL calls directed to NPF. The following commands are recognized:

- - -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Open (IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)
-
-
- -

Opens a new instance of the driver.

-
Parameters:
- - - -
DeviceObject Pointer to the device object utilized by the user.
Irp Pointer to the IRP containing the user request.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
-

This function is called by the OS when a new instance of the driver is opened, i.e. when a user application performs a CreateFile on a device created by NPF. NPF_Open allocates and initializes variables, objects and buffers needed by the new instance, fills the OPEN_INSTANCE structure associated with it and opens the adapter with a call to NdisOpenAdapter.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_OpenAdapterComplete (IN NDIS_HANDLE  ProtocolBindingContext,
IN NDIS_STATUS  Status,
IN NDIS_STATUS  OpenErrorStatus 
)
-
-
- -

Ends the opening of an adapter.

-
Parameters:
- - - - -
ProtocolBindingContext Context of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
Status Status of the opening operation performed by NDIS.
OpenErrorStatus not used by NPF.
-
-
-

Callback function associated with the NdisOpenAdapter() NDIS function. It is invoked by NDIS when the NIC driver has finished an open operation that was previously started by NPF_Open().

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_OpenDumpFile (POPEN_INSTANCE  Open,
PUNICODE_STRING  fileName,
BOOLEAN  append 
)
-
-
- -

Creates the file that will receive the packets when the driver is in dump mode.

-
Parameters:
- - - - -
Open The NPF instance that opens the file.
fileName Pointer to a UNICODE string containing the name of the file.
append Boolean value that specifies if the data must be appended to the file.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_QueryRegistryRoutine (IN PWSTR  ValueName,
IN ULONG  ValueType,
IN PVOID  ValueData,
IN ULONG  ValueLength,
IN PVOID  Context,
IN PVOID  EntryContext 
)
-
-
- -

Function used by NPF_ReadRegistry() to quesry the registry keys associated woth NPF if the driver is manually installed via the control panel.

-

Normally not used in recent versions of NPF.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Read (IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)
-
-
- -

Function that serves the user's reads.

-
Parameters:
- - - -
DeviceObject Pointer to the device used by the user.
Irp Pointer to the IRP containing the user request.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
-

This function is called by the OS in consequence of user ReadFile() call. It moves the data present in the kernel buffer to the user buffer associated with Irp. First of all, NPF_Read checks the amount of data in kernel buffer associated with current NPF instance.

-
    -
  • If the instance is in capture mode and the buffer contains more than OPEN_INSTANCE::MinToCopy bytes, NPF_Read moves the data in the user buffer and returns immediatly. In this way, the read performed by the user is not blocking.
  • -
  • If the buffer contains less than MinToCopy bytes, the application's request isn't satisfied immediately, but it's blocked until at least MinToCopy bytes arrive from the net or the timeout on this read expires. The timeout is kept in the OPEN_INSTANCE::TimeOut field.
  • -
  • If the instance is in statistical mode or in dump mode, the application's request is blocked until the timeout kept in OPEN_INSTANCE::TimeOut expires.
  • -
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_ReadRegistry (IN PWSTR *  MacDriverName,
IN PWSTR *  PacketDriverName,
IN PUNICODE_STRING  RegistryPath 
)
-
-
- -

Reads the registry keys associated woth NPF if the driver is manually installed via the control panel.

-

Normally not used in recent versions of NPF.

- -
-
- -
-
- - - - - - - - - -
VOID NPF_ReceiveComplete (IN NDIS_HANDLE  ProtocolBindingContext ) 
-
-
- -

Callback function that signals the end of a packet reception.

-
Parameters:
- - -
ProtocolBindingContext Context of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
-
-
-

does nothing in NPF

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_RequestComplete (IN NDIS_HANDLE  ProtocolBindingContext,
IN PNDIS_REQUEST  pRequest,
IN NDIS_STATUS  Status 
)
-
-
- -

Ends an OID request.

-
Parameters:
- - - - -
ProtocolBindingContext Context of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
pRequest Pointer to the completed OID request.
Status Status of the operation.
-
-
-

Callback function associated with the NdisRequest() NDIS function. It is invoked by NDIS when the NIC driver has finished an OID request operation that was previously started by NPF_IoControl().

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
VOID NPF_ResetComplete (IN NDIS_HANDLE  ProtocolBindingContext,
IN NDIS_STATUS  Status 
)
-
-
- -

Ends a reset of the adapter.

-
Parameters:
- - - -
ProtocolBindingContext Context of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
Status Status of the operation.
-
-
-

Callback function associated with the NdisReset() NDIS function. It is invoked by NDIS when the NIC driver has finished an OID request operation that was previously started by NPF_IoControl(), in an IOCTL_PROTOCOL_RESET command.

- -
-
- -
-
- - - - - - - - - -
NTSTATUS NPF_SaveCurrentBuffer (POPEN_INSTANCE  Open ) 
-
-
- -

Saves the content of the packet buffer to the file associated with current instance.

-
Parameters:
- - -
Open The NPF instance that creates the thread.
-
-
-

Used by NPF_DumpThread() and NPF_CloseDumpFile().

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_SendComplete (IN NDIS_HANDLE  ProtocolBindingContext,
IN PNDIS_PACKET  pPacket,
IN NDIS_STATUS  Status 
)
-
-
- -

Ends a send operation.

-
Parameters:
- - - - -
ProtocolBindingContext Context of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
pPacket Pointer to the NDIS PACKET structure used by NPF_Write() to send the packet.
Status Status of the operation.
-
-
-

Callback function associated with the NdisSend() NDIS function. It is invoked by NDIS when the NIC driver has finished an OID request operation that was previously started by NPF_Write().

- -
-
- -
-
- - - - - - - - - -
NTSTATUS NPF_StartDump (POPEN_INSTANCE  Open ) 
-
-
- -

Starts dump to file.

-
Parameters:
- - -
Open The NPF instance that opens the file.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
-

This function performs two operations. First, it writes the libpcap header at the beginning of the file. Second, it starts the thread that asynchronously dumps the network data to the file.

- -
-
- -
-
- - - - - - - - - -
BOOLEAN NPF_StartUsingBinding (IN POPEN_INSTANCE  pOpen ) 
-
-
- -
-
- -
-
- - - - - - - - - -
BOOLEAN NPF_StartUsingOpenInstance (IN POPEN_INSTANCE  pOpen ) 
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_Status (IN NDIS_HANDLE  ProtocolBindingContext,
IN NDIS_STATUS  Status,
IN PVOID  StatusBuffer,
IN UINT  StatusBufferSize 
)
-
-
- -

Callback for NDIS StatusHandler. Not used by NPF.

- -
-
- -
-
- - - - - - - - - -
VOID NPF_StatusComplete (IN NDIS_HANDLE  ProtocolBindingContext ) 
-
-
- -

Callback for NDIS StatusCompleteHandler. Not used by NPF.

- -
-
- -
-
- - - - - - - - - -
VOID NPF_StopUsingBinding (IN POPEN_INSTANCE  pOpen ) 
-
-
- -
-
- -
-
- - - - - - - - - -
VOID NPF_StopUsingOpenInstance (IN POPEN_INSTANCE  pOpen ) 
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NDIS_STATUS NPF_tap (IN NDIS_HANDLE  ProtocolBindingContext,
IN NDIS_HANDLE  MacReceiveContext,
IN PVOID  HeaderBuffer,
IN UINT  HeaderBufferSize,
IN PVOID  LookAheadBuffer,
IN UINT  LookaheadBufferSize,
IN UINT  PacketSize 
)
-
-
- -

Callback invoked by NDIS when a packet arrives from the network.

-
Parameters:
- - - - - - - - -
ProtocolBindingContext Context of the function. Points to a OPEN_INSTANCE structure that identifies the NPF instance to which the packets are destined.
MacReceiveContext Handle that identifies the underlying NIC driver that generated the request. This value must be used when the packet is transferred from the NIC driver with NdisTransferData().
HeaderBuffer Pointer to the buffer in the NIC driver memory that contains the header of the packet.
HeaderBufferSize Size in bytes of the header.
LookAheadBuffer Pointer to the buffer in the NIC driver's memory that contains the incoming packet's data available to NPF. This value does not necessarily coincide with the actual size of the packet, since only a portion can be available at this time. The remaining portion can be obtained with the NdisTransferData() NDIS function.
LookaheadBufferSize Size in bytes of the lookahead buffer.
PacketSize Total size of the incoming packet, excluded the header.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
-

NPF_tap() is called by the underlying NIC for every incoming packet. It is the most important and one of the most complex functions of NPF: it executes the filter, runs the statistical engine (if the instance is in statistical mode), gathers the timestamp, moves the packet in the buffer. NPF_tap() is the only function, along with the filtering ones, that is executed for every incoming packet, therefore it is carefully optimized.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_TransferDataComplete (IN NDIS_HANDLE  ProtocolBindingContext,
IN PNDIS_PACKET  Packet,
IN NDIS_STATUS  Status,
IN UINT  BytesTransferred 
)
-
-
- -

Ends the transfer of a packet.

-
Parameters:
- - - - - -
ProtocolBindingContext Context of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
Packet Pointer to the NDIS_PACKET structure that received the packet data.
Status Status of the transfer operation.
BytesTransferred Amount of bytes transferred.
-
-
-

Callback function associated with the NdisTransferData() NDIS function. It is invoked by NDIS when the NIC driver has finished the transfer of a packet from the NIC driver memory to the NPF circular buffer.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_UnbindAdapter (OUT PNDIS_STATUS  Status,
IN NDIS_HANDLE  ProtocolBindingContext,
IN NDIS_HANDLE  UnbindContext 
)
-
-
- -

Callback for NDIS UnbindAdapterHandler.

-
Parameters:
- - - - -
Status out variable filled by NPF_UnbindAdapter with the status of the unbind operation.
ProtocolBindingContext Context of the function. Contains a pointer to the OPEN_INSTANCE structure associated with current instance.
UnbindContext Specifies a handle, supplied by NDIS, that NPF can use to complete the opration.
-
-
-

Function called by NDIS when a new adapter is removed from the machine without shutting it down. NPF_UnbindAdapter closes the adapter calling NdisCloseAdapter() and frees the memory and the structures associated with it. It also releases the waiting user-level app and closes the dump thread if the instance is in dump mode.

- -
-
- -
-
- - - - - - - - - -
VOID NPF_Unload (IN PDRIVER_OBJECT  DriverObject ) 
-
-
- -

Function called by the OS when NPF is unloaded.

-
Parameters:
- - -
DriverObject The driver object of NPF created by the system.
-
-
-

This is the last function executed when the driver is unloaded from the system. It frees global resources, delete the devices and deregisters the protocol. The driver can be unloaded by the user stopping the NPF service (from control panel or with a console 'net stop npf').

- -
-
- -
-
- - - - - - - - - -
VOID NPF_WaitEndOfBufferedWrite (POPEN_INSTANCE  Open ) 
-
-
- -

Waits the completion of all the sends performed by NPF_BufferedWrite.

-
Parameters:
- - -
Open Pointer to open context structure
-
-
-

Used by NPF_BufferedWrite to wait the completion of all the sends before returning the control to the user.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Write (IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)
-
-
- -

Writes a raw packet to the network.

-
Parameters:
- - - -
DeviceObject Pointer to the device object on which the user wrote the packet.
Irp Pointer to the IRP containing the user request.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
-

This function is called by the OS in consequence of user WriteFile() call, with the data of the packet that must be sent on the net. The data is contained in the buffer associated with Irp, NPF_Write takes it and delivers it to the NIC driver via the NdisSend() function. The Nwrites field of the OPEN_INSTANCE structure associated with Irp indicates the number of copies of the packet that will be sent: more than one copy of the packet can be sent for performance reasons.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_WriteDumpFile (PFILE_OBJECT  FileObject,
PLARGE_INTEGER  Offset,
ULONG  Length,
PMDL  Mdl,
PIO_STATUS_BLOCK  IoStatusBlock 
)
-
-
- -

Writes a block of packets on the dump file.

-
Parameters:
- - - - - - -
FileObject The file object that will receive the packets.
Offset The offset in the file where the packets will be put.
Length The amount of bytes to write.
Mdl MDL mapping the memory buffer that will be written to disk.
IoStatusBlock Used by the function to return the status of the operation.
-
-
-
Returns:
The status of the operation. See ntstatus.h in the DDK.
-

NPF_WriteDumpFile addresses directly the file system, creating a custom IRP and using it to send a portion of the NPF circular buffer to disk. This function is used by NPF_DumpThread().

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__NPF__include.html b/ledset/WpdPack_4_1_2/docs/html/group__NPF__include.html deleted file mode 100644 index 22a6c5f..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__NPF__include.html +++ /dev/null @@ -1,756 +0,0 @@ - - - - -WinPcap: NPF structures and definitions - - - - - - -
-

NPF structures and definitions
- -[NPF driver internals manual] -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  packet_file_header
 Header of a libpcap dump file. More...
struct  sf_pkthdr
 Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler. More...
struct  _PACKET_OID_DATA
 Structure containing an OID request. More...
struct  _INTERNAL_REQUEST
 Stores an OID request. More...
struct  _PACKET_RESERVED
 Contains a NDIS packet. More...
struct  _DEVICE_EXTENSION
 Port device extension. More...
struct  __CPU_Private_Data
 Kernel buffer of each CPU. More...
struct  _OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver. More...
struct  PacketHeader
 Structure prepended to each packet in the kernel buffer pool. More...

Defines

#define MAX_REQUESTS   32
 Maximum number of simultaneous IOCTL requests.
#define Packet_ALIGNMENT   sizeof(int)
 Alignment macro. Defines the alignment size.
#define Packet_WORDALIGN(x)   (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
 even multiple of Packet_ALIGNMENT.
#define KERNEL_EVENT_NAMESPACE   L"\\BaseNamedObjects\\"
#define MODE_CAPT   0x0
 Capture working mode.
#define MODE_STAT   0x1
 Statistical working mode.
#define MODE_MON   0x2
 Kernel monitoring mode.
#define MODE_DUMP   0x10
 Kernel dump working mode.
#define IMMEDIATE   1
 Immediate timeout. Forces a read call to return immediately.
#define NDIS_FLAGS_SKIP_LOOPBACK_W2K   0x400
 This is an undocumented flag for NdisSetPacketFlags() that allows to disable loopback reception.
#define TCPDUMP_MAGIC   0xa1b2c3d4
 Libpcap magic number. Used by programs like tcpdump to recognize a driver's generated dump file.
#define PCAP_VERSION_MAJOR   2
 Major libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.
#define PCAP_VERSION_MINOR   4
 Minor libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.
#define NPF_DISABLE_LOOPBACK   1
 Tells the driver to drop the packets sent by itself. This is usefult when building applications like bridges.
#define NPF_ENABLE_LOOPBACK   2
 Tells the driver to capture the packets sent by itself.
#define C_ASSERT(a)
#define RESERVED(_p)   ((PPACKET_RESERVED)((_p)->ProtocolReserved))
 Macro to obtain a NDIS_PACKET from a PACKET_RESERVED.
#define TRANSMIT_PACKETS   256
 of packets that can be transmitted at the same time or with a single call to NdisSendPackets.
#define EXIT_SUCCESS(quantity)
 Macro used in the I/O routines to return the control to user-mode with a success status.
#define EXIT_FAILURE(quantity)
 Macro used in the I/O routines to return the control to user-mode with a failure status.

Typedefs

typedef struct _PACKET_OID_DATA PACKET_OID_DATA
 Structure containing an OID request.
typedef struct _PACKET_OID_DATAPPACKET_OID_DATA
typedef struct _INTERNAL_REQUEST INTERNAL_REQUEST
 Stores an OID request.
typedef struct _INTERNAL_REQUESTPINTERNAL_REQUEST
typedef struct _PACKET_RESERVED PACKET_RESERVED
 Contains a NDIS packet.
typedef struct _PACKET_RESERVEDPPACKET_RESERVED
typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION
 Port device extension.
typedef struct _DEVICE_EXTENSIONPDEVICE_EXTENSION
typedef struct __CPU_Private_Data CpuPrivateData
 Kernel buffer of each CPU.
typedef struct _OPEN_INSTANCE OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver.
typedef struct _OPEN_INSTANCEPOPEN_INSTANCE

Enumerations

enum  ADAPTER_BINDING_STATUS { ADAPTER_UNBOUND, -ADAPTER_BOUND, -ADAPTER_UNBINDING - }

Functions

 C_ASSERT (sizeof(PACKET_OID_DATA)==12)

Variables

ULONG g_NCpu
NDIS_HANDLE g_NdisProtocolHandle
struct time_conv G_Start_Time
UINT g_SendPacketFlags
-

Define Documentation

- -
-
- - - - - - - - - -
#define C_ASSERT( ) 
-
-
- -

Definition at line 133 of file Packet.h.

- -
-
- -
-
- - - - - - - - - -
#define EXIT_FAILURE(quantity  ) 
-
-
-Value:
Irp->IoStatus.Information=quantity;\
-    Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;\
-    IoCompleteRequest(Irp, IO_NO_INCREMENT);\
-    return STATUS_UNSUCCESSFUL;\
-
-

Macro used in the I/O routines to return the control to user-mode with a failure status.

- -

Definition at line 363 of file Packet.h.

- -
-
- -
-
- - - - - - - - - -
#define EXIT_SUCCESS(quantity  ) 
-
-
-Value:
Irp->IoStatus.Information=quantity;\
-    Irp->IoStatus.Status = STATUS_SUCCESS;\
-    IoCompleteRequest(Irp, IO_NO_INCREMENT);\
-    return STATUS_SUCCESS;\
-
-

Macro used in the I/O routines to return the control to user-mode with a success status.

- -

Definition at line 357 of file Packet.h.

- -
-
- -
-
- - - - -
#define IMMEDIATE   1
-
-
- -

Immediate timeout. Forces a read call to return immediately.

- -

Definition at line 87 of file Packet.h.

- -
-
- -
-
- - - - -
#define KERNEL_EVENT_NAMESPACE   L"\\BaseNamedObjects\\"
-
-
- -

Definition at line 77 of file Packet.h.

- -
-
- -
-
- - - - -
#define MAX_REQUESTS   32
-
-
- -

Maximum number of simultaneous IOCTL requests.

- -

Definition at line 71 of file Packet.h.

- -
-
- -
-
- - - - -
#define MODE_CAPT   0x0
-
-
- -

Capture working mode.

- -

Definition at line 81 of file Packet.h.

- -
-
- -
-
- - - - -
#define MODE_DUMP   0x10
-
-
- -

Kernel dump working mode.

- -

Definition at line 84 of file Packet.h.

- -
-
- -
-
- - - - -
#define MODE_MON   0x2
-
-
- -

Kernel monitoring mode.

- -

Definition at line 83 of file Packet.h.

- -
-
- -
-
- - - - -
#define MODE_STAT   0x1
-
-
- -

Statistical working mode.

- -

Definition at line 82 of file Packet.h.

- -
-
- -
-
- - - - -
#define NDIS_FLAGS_SKIP_LOOPBACK_W2K   0x400
-
-
- -

This is an undocumented flag for NdisSetPacketFlags() that allows to disable loopback reception.

- -

Definition at line 89 of file Packet.h.

- -
-
- -
-
- - - - -
#define NPF_DISABLE_LOOPBACK   1
-
-
- -

Tells the driver to drop the packets sent by itself. This is usefult when building applications like bridges.

- -

Definition at line 98 of file Packet.h.

- -
-
- -
-
- - - - -
#define NPF_ENABLE_LOOPBACK   2
-
-
- -

Tells the driver to capture the packets sent by itself.

- -

Definition at line 99 of file Packet.h.

- -
-
- -
-
- - - - -
#define Packet_ALIGNMENT   sizeof(int)
-
-
- -

Alignment macro. Defines the alignment size.

- -

Definition at line 73 of file Packet.h.

- -
-
- -
-
- - - - - - - - - -
#define Packet_WORDALIGN( )    (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
-
-
- -

even multiple of Packet_ALIGNMENT.

-

Alignment macro. Rounds up to the next

- -

Definition at line 74 of file Packet.h.

- -
-
- -
-
- - - - -
#define PCAP_VERSION_MAJOR   2
-
-
- -

Major libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.

- -

Definition at line 94 of file Packet.h.

- -
-
- -
-
- - - - -
#define PCAP_VERSION_MINOR   4
-
-
- -

Minor libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.

- -

Definition at line 95 of file Packet.h.

- -
-
- -
-
- - - - - - - - - -
#define RESERVED(_p  )    ((PPACKET_RESERVED)((_p)->ProtocolReserved))
-
-
- -

Macro to obtain a NDIS_PACKET from a PACKET_RESERVED.

- -

Definition at line 189 of file Packet.h.

- -
-
- -
-
- - - - -
#define TCPDUMP_MAGIC   0xa1b2c3d4
-
-
- -

Libpcap magic number. Used by programs like tcpdump to recognize a driver's generated dump file.

- -

Definition at line 93 of file Packet.h.

- -
-
- -
-
- - - - -
#define TRANSMIT_PACKETS   256
-
-
- -

of packets that can be transmitted at the same time or with a single call to NdisSendPackets.

-

Maximum number of packets in the transmit packet pool. This value is an upper bound to the number

- -

Definition at line 352 of file Packet.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef struct __CPU_Private_Data - CpuPrivateData
-
-
- -

Kernel buffer of each CPU.

-

Structure containing the kernel buffer (and other CPU related fields) used to capture packets.

- -
-
- -
-
- - - - -
typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION
-
-
- -

Port device extension.

-

Structure containing some data relative to every adapter on which NPF is bound.

- -
-
- -
-
- - - - -
typedef struct _INTERNAL_REQUEST INTERNAL_REQUEST
-
-
- -

Stores an OID request.

-

This structure is used by the driver to perform OID query or set operations on the underlying NIC driver. The OID operations be performed usually only by network drivers, but NPF exports this mechanism to user-level applications through an IOCTL interface. The driver uses this structure to wrap a NDIS_REQUEST structure. This allows to handle correctly the callback structure of NdisRequest(), handling multiple requests and maintaining information about the IRPs to complete.

- -
-
- -
-
- - - - -
typedef struct _OPEN_INSTANCE - OPEN_INSTANCE
-
-
- -

Contains the state of a running instance of the NPF driver.

-

This is the most important structure of NPF: it is used by almost all the functions of the driver. An _OPEN_INSTANCE structure is associated with every user-level session, allowing concurrent access to the driver.

- -
-
- -
-
- - - - -
typedef struct _PACKET_OID_DATA - PACKET_OID_DATA
-
-
- -

Structure containing an OID request.

-

It is used by the PacketRequest() function to send an OID to the interface card driver. It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, the list of the multicast groups defined on it, and so on.

- -
-
- -
-
- - - - -
typedef struct _PACKET_RESERVED PACKET_RESERVED
-
-
- -

Contains a NDIS packet.

-

The driver uses this structure to wrap a NDIS_PACKET structure. This allows to handle correctly the callback structure of NdisTransferData(), handling multiple requests and maintaining information about the IRPs to complete.

- -
-
- -
-
- - - - -
typedef struct _DEVICE_EXTENSION * PDEVICE_EXTENSION
-
-
- -
-
- -
-
- - - - -
typedef struct _INTERNAL_REQUEST * PINTERNAL_REQUEST
-
-
- -
-
- -
-
- - - - -
typedef struct _OPEN_INSTANCE * POPEN_INSTANCE
-
-
- -
-
- -
-
- - - - -
typedef struct _PACKET_OID_DATA * PPACKET_OID_DATA
-
-
- -
-
- -
-
- - - - -
typedef struct _PACKET_RESERVED * PPACKET_RESERVED
-
-
- -
-
-

Enumeration Type Documentation

- -
-
- - - - -
enum ADAPTER_BINDING_STATUS
-
-
-
Enumerator:
- - - -
ADAPTER_UNBOUND  -
ADAPTER_BOUND  -
ADAPTER_UNBINDING  -
-
-
- -

Definition at line 327 of file Packet.h.

- -
-
-

Function Documentation

- -
-
- - - - - - - - - -
C_ASSERT (sizeof(PACKET_OID_DATA = =12 ) 
-
-
- -
-
-

Variable Documentation

- -
-
- - - - -
ULONG g_NCpu
-
-
- -
-
- -
-
- - - - -
NDIS_HANDLE g_NdisProtocolHandle
-
-
- -
-
- -
-
- - - - -
UINT g_SendPacketFlags
-
-
- -
-
- -
-
- - - - -
struct time_conv G_Start_Time
-
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__NPF__ioctl.html b/ledset/WpdPack_4_1_2/docs/html/group__NPF__ioctl.html deleted file mode 100644 index 2548974..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__NPF__ioctl.html +++ /dev/null @@ -1,376 +0,0 @@ - - - - -WinPcap: NPF I/O control codes - - - - - - -
-

NPF I/O control codes
- -[NPF driver internals manual] -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Defines

#define BIOCSETBUFFERSIZE   9592
 IOCTL code: set kernel buffer size.
#define BIOCSETF   9030
 IOCTL code: set packet filtering program.
#define BIOCGSTATS   9031
 IOCTL code: get the capture stats.
#define BIOCSRTIMEOUT   7416
 IOCTL code: set the read timeout.
#define BIOCSMODE   7412
 IOCTL code: set working mode.
#define BIOCSWRITEREP   7413
 IOCTL code: set number of physical repetions of every packet written by the app.
#define BIOCSMINTOCOPY   7414
 IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call.
#define BIOCSETOID   0x80000000
 IOCTL code: set an OID value.
#define BIOCQUERYOID   0x80000004
 IOCTL code: get an OID value.
#define BIOCSETDUMPFILENAME   9029
 IOCTL code: set the name of a the file used by kernel dump mode.
#define BIOCGEVNAME   7415
 IOCTL code: get the name of the event that the driver signals when some data is present in the buffer.
#define BIOCSENDPACKETSNOSYNC   9032
 IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps.
#define BIOCSENDPACKETSSYNC   9033
 IOCTL code: Send a buffer containing multiple packets to the network, considering the timestamps.
#define BIOCSETDUMPLIMITS   9034
 IOCTL code: Set the dump file limits.
#define BIOCISDUMPENDED   7411
 IOCTL code: Get the status of the kernel dump process.
#define BIOCISETLOBBEH   7410
 IOCTL code: set the loopback behavior.
#define BIOCSETEVENTHANDLE   7920
 This IOCTL passes the read event HANDLE allocated by the user (packet.dll) to kernel level.
-

Define Documentation

- -
-
- - - - -
#define BIOCGEVNAME   7415
-
-
- -

IOCTL code: get the name of the event that the driver signals when some data is present in the buffer.

-

Command used by the application to retrieve the name of the global event associated with a NPF instance. The event is signaled by the driver when the kernel buffer contains enough data for a transfer.

- -

Definition at line 137 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCGSTATS   9031
-
-
- -

IOCTL code: get the capture stats.

-

This command returns to the application the number of packets received and the number of packets dropped by an instance of the driver.

- -

Definition at line 75 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCISDUMPENDED   7411
-
-
- -

IOCTL code: Get the status of the kernel dump process.

-

This command returns TRUE if the kernel dump is ended, i.e if one of the limits set with BIOCSETDUMPLIMITS (amount of bytes or number of packets) has been reached.

- -

Definition at line 172 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCISETLOBBEH   7410
-
-
- -

IOCTL code: set the loopback behavior.

-

This IOCTL sets the loopback behavior of the driver with packets sent by itself: capture or drop.

- -

Definition at line 179 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCQUERYOID   0x80000004
-
-
- -

IOCTL code: get an OID value.

-

This IOCTL is used to perform an OID get operation on the NIC driver.

- -

Definition at line 120 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSENDPACKETSNOSYNC   9032
-
-
- -

IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps.

-

Command used to send a buffer of packets in a single system call. Every packet in the buffer is preceded by a sf_pkthdr structure. The timestamps of the packets are ignored, i.e. the packets are sent as fast as possible. The NPF_BufferedWrite() function is invoked to send the packets.

- -

Definition at line 146 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSENDPACKETSSYNC   9033
-
-
- -

IOCTL code: Send a buffer containing multiple packets to the network, considering the timestamps.

-

Command used to send a buffer of packets in a single system call. Every packet in the buffer is preceded by a sf_pkthdr structure. The timestamps of the packets are used to synchronize the write, i.e. the packets are sent to the network respecting the intervals specified in the sf_pkthdr structure assiciated with each packet. NPF_BufferedWrite() function is invoked to send the packets.

- -

Definition at line 156 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETBUFFERSIZE   9592
-
-
- -

IOCTL code: set kernel buffer size.

-

This IOCTL is used to set a new size of the circular buffer associated with an instance of NPF. When a BIOCSETBUFFERSIZE command is received, the driver frees the old buffer, allocates the new one and resets all the parameters associated with the buffer in the OPEN_INSTANCE structure. The currently buffered packets are lost.

- -

Definition at line 55 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETDUMPFILENAME   9029
-
-
- -

IOCTL code: set the name of a the file used by kernel dump mode.

-

This command opens a file whose name is contained in the IOCTL buffer and associates it with current NPf instance. The dump thread uses it to copy the content of the circular buffer to file. If a file was already opened, the driver closes it before opening the new one.

- -

Definition at line 129 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETDUMPLIMITS   9034
-
-
- -

IOCTL code: Set the dump file limits.

-

This IOCTL sets the limits (maximum size and maximum number of packets) of the dump file created when the driver works in dump mode.

- -

Definition at line 164 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETEVENTHANDLE   7920
-
-
- -

This IOCTL passes the read event HANDLE allocated by the user (packet.dll) to kernel level.

-

Parameter: HANDLE Parameter size: sizeof(HANDLE). If the caller is 32 bit, the parameter size is 4 bytes, even if sizeof(HANDLE) at kernel level is 8 bytes. That's why in this IOCTL code handler we detect a 32bit calling process and do the necessary thunking.

-

TODO GV:I will go to hell for this ugly IOCTL definition. We should use CTL_CODE!!

- -

Definition at line 190 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETF   9030
-
-
- -

IOCTL code: set packet filtering program.

-

This IOCTL sets a new packet filter in the driver. Before allocating any memory for the new filter, the bpf_validate() function is called to check the correctness of the filter. If this function returns TRUE, the filter is copied to the driver's memory, its address is stored in the bpfprogram field of the OPEN_INSTANCE structure associated with current instance of the driver, and the filter will be applied to every incoming packet. This command also empties the circular buffer used by current instance to store packets. This is done to avoid the presence in the buffer of packets that do not match the filter.

- -

Definition at line 67 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETOID   0x80000000
-
-
- -

IOCTL code: set an OID value.

-

This IOCTL is used to perform an OID set operation on the NIC driver.

- -

Definition at line 113 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSMINTOCOPY   7414
-
-
- -

IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call.

-

This command sets the OPEN_INSTANCE::MinToCopy member.

- -

Definition at line 106 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSMODE   7412
-
-
- -

IOCTL code: set working mode.

-

This IOCTL can be used to set the working mode of a NPF instance. The new mode, received by the driver in the buffer associated with the IOCTL command, can be MODE_CAPT for capture mode (the default), MODE_STAT for statistical mode or MODE_DUMP for dump mode.

- -

Definition at line 91 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSRTIMEOUT   7416
-
-
- -

IOCTL code: set the read timeout.

-

This command sets the maximum timeout after which a read is released, also if no data packets were received.

- -

Definition at line 82 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSWRITEREP   7413
-
-
- -

IOCTL code: set number of physical repetions of every packet written by the app.

-

Sets the number of times a single write call must be repeated. This command sets the OPEN_INSTANCE::Nwrites member, and is used to implement the 'multiple write' feature of the driver.

- -

Definition at line 99 of file ioctls.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__NPF__jitter.html b/ledset/WpdPack_4_1_2/docs/html/group__NPF__jitter.html deleted file mode 100644 index b3edb27..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__NPF__jitter.html +++ /dev/null @@ -1,1652 +0,0 @@ - - - - -WinPcap: NPF Just-in-time compiler definitions - - - - - - -
-

NPF Just-in-time compiler definitions
- -[NPF driver internals manual] -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  binary_stream
 A stream of X86 binary code. More...
struct  JIT_BPF_Filter
 Structure describing a x86 filtering program created by the jitter. More...

Defines

#define EAX   0
#define ECX   1
#define EDX   2
#define EBX   3
#define ESP   4
#define EBP   5
#define ESI   6
#define EDI   7
#define AX   0
#define CX   1
#define DX   2
#define BX   3
#define SP   4
#define BP   5
#define SI   6
#define DI   7
#define AL   0
#define CL   1
#define DL   2
#define BL   3
#define MOVid(r32, i32)   emitm(&stream, 11 << 4 | 1 << 3 | r32 & 0x7, 1); emitm(&stream, i32, 4);
 mov r32,i32
#define MOVrd(dr32, sr32)   emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
 mov dr32,sr32
#define MOVodd(dr32, sr32, off)
 mov dr32,sr32[off]
#define MOVobd(dr32, sr32, or32)
 mov dr32,sr32[or32]
#define MOVobw(dr32, sr32, or32)
 mov dr16,sr32[or32]
#define MOVobb(dr8, sr32, or32)
 mov dr8,sr32[or32]
#define MOVomd(dr32, or32, sr32)
 mov [dr32][or32],sr32
#define BSWAP(dr32)
 bswap dr32
#define SWAP_AX()
 xchg al,ah
#define PUSH(r32)   emitm(&stream, 5 << 4 | 0 << 3 | r32 & 0x7, 1);
 push r32
#define POP(r32)   emitm(&stream, 5 << 4 | 1 << 3 | r32 & 0x7, 1);
 pop r32
#define RET()   emitm(&stream, 12 << 4 | 0 << 3 | 3, 1);
 ret
#define ADDrd(dr32, sr32)
 add dr32,sr32
#define ADD_EAXi(i32)
 add eax,i32
#define ADDid(r32, i32)
 add r32,i32
#define ADDib(r32, i8)
 add r32,i8
#define SUBrd(dr32, sr32)
 sub dr32,sr32
#define SUB_EAXi(i32)
 sub eax,i32
#define MULrd(r32)
 mul r32
#define DIVrd(r32)
 div r32
#define ANDib(r8, i8)
 and r8,i8
#define ANDid(r32, i32)
 and r32,i32
#define ANDrd(dr32, sr32)
 and dr32,sr32
#define ORrd(dr32, sr32)
 or dr32,sr32
#define ORid(r32, i32)
 or r32,i32
#define SHLib(r32, i8)
 shl r32,i8
#define SHL_CLrb(dr32)
 shl dr32,cl
#define SHRib(r32, i8)
 shr r32,i8
#define SHR_CLrb(dr32)
 shr dr32,cl
#define NEGd(r32)
 neg r32
#define CMPodd(dr32, sr32, off)
 cmp dr32,sr32[off]
#define CMPrd(dr32, sr32)
 cmp dr32,sr32
#define CMPid(dr32, i32)
 cmp dr32,i32
#define JNEb(off8)
 jne off32
#define JE(off32)
 je off32
#define JLE(off32)
 jle off32
#define JLEb(off8)
 jle off8
#define JA(off32)
 ja off32
#define JAE(off32)
 jae off32
#define JG(off32)
 jg off32
#define JGE(off32)
 jge off32
#define JMP(off32)
 jmp off32

Typedefs

typedef UINT(__cdecl * BPF_filter_function )(PVOID *, ULONG, UINT)
 Prototype of a filtering function created by the jitter.
typedef void(* emit_func )(binary_stream *stream, ULONG value, UINT n)
 Prototype of the emit functions.
-

Define Documentation

- -
-
- - - - - - - - - -
#define ADD_EAXi(i32  ) 
-
-
-Value:
emitm(&stream, 0x05, 1);\
-  emitm(&stream, i32, 4);
-
-

add eax,i32

- -

Definition at line 175 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define ADDib(r32,
i8  ) 
-
-
-Value:
emitm(&stream, 0x83, 1);\
-  emitm(&stream, 24 << 3 | r32, 1);\
-  emitm(&stream, i8, 1);
-
-

add r32,i8

- -

Definition at line 186 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define ADDid(r32,
i32  ) 
-
-
-Value:
emitm(&stream, 0x81, 1);\
-  emitm(&stream, 24 << 3 | r32, 1);\
-  emitm(&stream, i32, 4);
-
-

add r32,i32

- -

Definition at line 180 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define ADDrd(dr32,
sr32  ) 
-
-
-Value:
emitm(&stream, 0x03, 1);\
-  emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | (sr32 & 0x7), 1);
-
-

add dr32,sr32

- -

Definition at line 170 of file jitter.h.

- -
-
- -
-
- - - - -
#define AL   0
-
-
- -

Definition at line 63 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define ANDib(r8,
i8  ) 
-
-
-Value:
emitm(&stream, 0x80, 1);\
-  emitm(&stream, 7 << 5 | r8, 1);\
-  emitm(&stream, i8, 1);
-
-

and r8,i8

- -

Definition at line 212 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define ANDid(r32,
i32  ) 
-
-
-Value:
if (r32 == EAX){ \
-  emitm(&stream, 0x25, 1);\
-  emitm(&stream, i32, 4);}\
-  else{ \
-  emitm(&stream, 0x81, 1);\
-  emitm(&stream, 7 << 5 | r32, 1);\
-  emitm(&stream, i32, 4);}
-
-

and r32,i32

- -

Definition at line 218 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define ANDrd(dr32,
sr32  ) 
-
-
-Value:
emitm(&stream, 0x23, 1);\
-  emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
-

and dr32,sr32

- -

Definition at line 228 of file jitter.h.

- -
-
- -
-
- - - - -
#define AX   0
-
-
- -

Definition at line 54 of file jitter.h.

- -
-
- -
-
- - - - -
#define BL   3
-
-
- -

Definition at line 66 of file jitter.h.

- -
-
- -
-
- - - - -
#define BP   5
-
-
- -

Definition at line 59 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define BSWAP(dr32  ) 
-
-
-Value:
emitm(&stream, 0xf, 1); \
-  emitm(&stream,  0x19 << 3 | dr32 , 1);
-
-

bswap dr32

- -

Definition at line 148 of file jitter.h.

- -
-
- -
-
- - - - -
#define BX   3
-
-
- -

Definition at line 57 of file jitter.h.

- -
-
- -
-
- - - - -
#define CL   1
-
-
- -

Definition at line 64 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define CMPid(dr32,
i32  ) 
-
-
-Value:
if (dr32 == EAX){ \
-  emitm(&stream, 0x3d, 1); \
-  emitm(&stream,  i32, 4);} \
-  else{ \
-  emitm(&stream, 0x81, 1); \
-  emitm(&stream,  0x1f << 3 | (dr32 & 0x7), 1);\
-  emitm(&stream,  i32, 4);}
-
-

cmp dr32,i32

- -

Definition at line 286 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
#define CMPodd(dr32,
sr32,
off  ) 
-
-
-Value:
emitm(&stream, 3 << 4 | 3 | 1 << 3, 1); \
-  emitm(&stream,  1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
-  emitm(&stream,  off, 1);
-
-

cmp dr32,sr32[off]

- -

Definition at line 275 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define CMPrd(dr32,
sr32  ) 
-
-
-Value:
emitm(&stream, 0x3b, 1); \
-  emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
-

cmp dr32,sr32

- -

Definition at line 281 of file jitter.h.

- -
-
- -
-
- - - - -
#define CX   1
-
-
- -

Definition at line 55 of file jitter.h.

- -
-
- -
-
- - - - -
#define DI   7
-
-
- -

Definition at line 61 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define DIVrd(r32  ) 
-
-
-Value:
emitm(&stream, 0xf7, 1);\
-  emitm(&stream, 15 << 4 | (r32 & 0x7), 1);
-
-

div r32

- -

Definition at line 207 of file jitter.h.

- -
-
- -
-
- - - - -
#define DL   2
-
-
- -

Definition at line 65 of file jitter.h.

- -
-
- -
-
- - - - -
#define DX   2
-
-
- -

Definition at line 56 of file jitter.h.

- -
-
- -
-
- - - - -
#define EAX   0
-
-
- -

Definition at line 45 of file jitter.h.

- -
-
- -
-
- - - - -
#define EBP   5
-
-
- -

Definition at line 50 of file jitter.h.

- -
-
- -
-
- - - - -
#define EBX   3
-
-
- -

Definition at line 48 of file jitter.h.

- -
-
- -
-
- - - - -
#define ECX   1
-
-
- -

Definition at line 46 of file jitter.h.

- -
-
- -
-
- - - - -
#define EDI   7
-
-
- -

Definition at line 52 of file jitter.h.

- -
-
- -
-
- - - - -
#define EDX   2
-
-
- -

Definition at line 47 of file jitter.h.

- -
-
- -
-
- - - - -
#define ESI   6
-
-
- -

Definition at line 51 of file jitter.h.

- -
-
- -
-
- - - - -
#define ESP   4
-
-
- -

Definition at line 49 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define JA(off32  ) 
-
-
-Value:
emitm(&stream, 0x0f, 1);\
-   emitm(&stream, 0x87, 1);\
-   emitm(&stream, off32, 4);
-
-

ja off32

- -

Definition at line 318 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define JAE(off32  ) 
-
-
-Value:
emitm(&stream, 0x0f, 1);\
-   emitm(&stream, 0x83, 1);\
-   emitm(&stream, off32, 4);
-
-

jae off32

- -

Definition at line 324 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define JE(off32  ) 
-
-
-Value:
emitm(&stream, 0x0f, 1);\
-   emitm(&stream, 0x84, 1);\
-   emitm(&stream, off32, 4);
-
-

je off32

- -

Definition at line 301 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define JG(off32  ) 
-
-
-Value:
emitm(&stream, 0x0f, 1);\
-   emitm(&stream, 0x8f, 1);\
-   emitm(&stream, off32, 4);
-
-

jg off32

- -

Definition at line 330 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define JGE(off32  ) 
-
-
-Value:
emitm(&stream, 0x0f, 1);\
-   emitm(&stream, 0x8d, 1);\
-   emitm(&stream, off32, 4);
-
-

jge off32

- -

Definition at line 336 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define JLE(off32  ) 
-
-
-Value:
emitm(&stream, 0x0f, 1);\
-   emitm(&stream, 0x8e, 1);\
-   emitm(&stream, off32, 4);
-
-

jle off32

- -

Definition at line 307 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define JLEb(off8  ) 
-
-
-Value:
emitm(&stream, 0x7e, 1);\
-   emitm(&stream, off8, 1);
-
-

jle off8

- -

Definition at line 313 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define JMP(off32  ) 
-
-
-Value:
emitm(&stream, 0xe9, 1);\
-   emitm(&stream, off32, 4);
-
-

jmp off32

- -

Definition at line 342 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define JNEb(off8  ) 
-
-
-Value:
emitm(&stream, 0x75, 1);\
-   emitm(&stream, off8, 1);
-
-

jne off32

- -

Definition at line 296 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define MOVid(r32,
i32  )    emitm(&stream, 11 << 4 | 1 << 3 | r32 & 0x7, 1); emitm(&stream, i32, 4);
-
-
- -

mov r32,i32

- -

Definition at line 109 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
#define MOVobb(dr8,
sr32,
or32  ) 
-
-
-Value:
emitm(&stream, 0x8a, 1); \
-  emitm(&stream,  (dr8 & 0x7) << 3 | 4 , 1);\
-  emitm(&stream,  (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);
-
-

mov dr8,sr32[or32]

- -

Definition at line 136 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
#define MOVobd(dr32,
sr32,
or32  ) 
-
-
-Value:
emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-  emitm(&stream,  (dr32 & 0x7) << 3 | 4 , 1);\
-  emitm(&stream,  (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);
-
-

mov dr32,sr32[or32]

- -

Definition at line 123 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
#define MOVobw(dr32,
sr32,
or32  ) 
-
-
-Value:
emitm(&stream, 0x66, 1); \
-  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-  emitm(&stream,  (dr32 & 0x7) << 3 | 4 , 1);\
-  emitm(&stream,  (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);
-
-

mov dr16,sr32[or32]

- -

Definition at line 129 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
#define MOVodd(dr32,
sr32,
off  ) 
-
-
-Value:
emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-  emitm(&stream,  1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
-  emitm(&stream,  off, 1);
-
-

mov dr32,sr32[off]

- -

Definition at line 117 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - -
#define MOVomd(dr32,
or32,
sr32  ) 
-
-
-Value:
emitm(&stream, 0x89, 1); \
-  emitm(&stream,  (sr32 & 0x7) << 3 | 4 , 1);\
-  emitm(&stream,  (or32 & 0x7) << 3 | (dr32 & 0x7) , 1);
-
-

mov [dr32][or32],sr32

- -

Definition at line 142 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define MOVrd(dr32,
sr32  )    emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
-
- -

mov dr32,sr32

- -

Definition at line 113 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define MULrd(r32  ) 
-
-
-Value:
emitm(&stream, 0xf7, 1);\
-  emitm(&stream, 7 << 5 | (r32 & 0x7), 1);
-
-

mul r32

- -

Definition at line 202 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define NEGd(r32  ) 
-
-
-Value:
emitm(&stream, 0xf7, 1);\
-  emitm(&stream,  27 << 3 | r32 & 0x7, 1);
-
-

neg r32

- -

Definition at line 270 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define ORid(r32,
i32  ) 
-
-
-Value:
if (r32 == EAX){ \
-  emitm(&stream, 0x0d, 1);\
-  emitm(&stream, i32, 4);}\
-  else{ \
-  emitm(&stream, 0x81, 1);\
-  emitm(&stream, 25 << 3 | r32, 1);\
-  emitm(&stream, i32, 4);}
-
-

or r32,i32

- -

Definition at line 238 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define ORrd(dr32,
sr32  ) 
-
-
-Value:
emitm(&stream, 0x0b, 1);\
-  emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
-

or dr32,sr32

- -

Definition at line 233 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define POP(r32  )    emitm(&stream, 5 << 4 | 1 << 3 | r32 & 0x7, 1);
-
-
- -

pop r32

- -

Definition at line 162 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define PUSH(r32  )    emitm(&stream, 5 << 4 | 0 << 3 | r32 & 0x7, 1);
-
-
- -

push r32

- -

Definition at line 158 of file jitter.h.

- -
-
- -
-
- - - - -  - - - - -
#define RET( )    emitm(&stream, 12 << 4 | 0 << 3 | 3, 1);
-
-
- -

ret

- -

Definition at line 166 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define SHL_CLrb(dr32  ) 
-
-
-Value:
emitm(&stream, 0xd3, 1);\
-  emitm(&stream,  7 << 5 | dr32 & 0x7, 1);
-
-

shl dr32,cl

- -

Definition at line 254 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define SHLib(r32,
i8  ) 
-
-
-Value:
emitm(&stream, 0xc1, 1);\
-  emitm(&stream, 7 << 5 | r32 & 0x7, 1);\
-  emitm(&stream, i8, 1);
-
-

shl r32,i8

- -

Definition at line 248 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define SHR_CLrb(dr32  ) 
-
-
-Value:
emitm(&stream, 0xd3, 1);\
-  emitm(&stream,  29 << 3 | dr32 & 0x7, 1);
-
-

shr dr32,cl

- -

Definition at line 265 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define SHRib(r32,
i8  ) 
-
-
-Value:
emitm(&stream, 0xc1, 1);\
-  emitm(&stream, 29 << 3 | r32 & 0x7, 1);\
-  emitm(&stream, i8, 1);
-
-

shr r32,i8

- -

Definition at line 259 of file jitter.h.

- -
-
- -
-
- - - - -
#define SI   6
-
-
- -

Definition at line 60 of file jitter.h.

- -
-
- -
-
- - - - -
#define SP   4
-
-
- -

Definition at line 58 of file jitter.h.

- -
-
- -
-
- - - - - - - - - -
#define SUB_EAXi(i32  ) 
-
-
-Value:
emitm(&stream, 0x2d, 1);\
-  emitm(&stream, i32, 4);
-
-

sub eax,i32

- -

Definition at line 197 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - -
#define SUBrd(dr32,
sr32  ) 
-
-
-Value:
emitm(&stream, 0x2b, 1);\
-  emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | (sr32 & 0x7), 1);
-
-

sub dr32,sr32

- -

Definition at line 192 of file jitter.h.

- -
-
- -
-
- - - - -  - - - - -
#define SWAP_AX( ) 
-
-
-Value:
emitm(&stream, 0x86, 1); \
-  emitm(&stream,  0xc4 , 1);
-
-

xchg al,ah

- -

Definition at line 153 of file jitter.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef UINT(__cdecl * BPF_filter_function)(PVOID *, ULONG, UINT)
-
-
- -

Prototype of a filtering function created by the jitter.

-

The syntax and the meaning of the parameters is analogous to the one of bpf_filter(). Notice that the filter is not among the parameters, because it is hardwired in the function.

- -

Definition at line 82 of file jitter.h.

- -
-
- -
-
- - - - -
typedef void(* emit_func)(binary_stream *stream, ULONG value, UINT n)
-
-
- -

Prototype of the emit functions.

-

Different emit functions are used to create the reference table and to generate the actual filtering code. This allows to have simpler instruction macros. The first parameter is the stream that will receive the data. The secon one is a variable containing the data, the third one is the length, that can be 1,2 or 4 since it is possible to emit a byte, a short or a work at a time.

- -

Definition at line 92 of file jitter.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__compilation.html b/ledset/WpdPack_4_1_2/docs/html/group__compilation.html deleted file mode 100644 index 8a7e140..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__compilation.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - -WinPcap: How to compile WinPcap - - - - - - -
-

How to compile WinPcap
- -[WinPcap internals] -

-
- - - - - - - - - - -

This section explains how to compile WinPcap, both the kernel level and -the user-level portion, on the various Win32 platforms. The source code can be -found on the WinPcap website.

-

Compiling the driver

-

Two main NPF source trees are available for compilation:  Windows NTx and Windows 9x. Note that, since the NPF -Driver is platform-dependent, it is STRONGLY suggested to compile it for the OS where it will be used, in order to -link the correct DDK libraries. For example, if you compile the -driver with the Windows NT 4 DDK, it will not work properly on Windows 2000 and -vice versa.

-

Compiling the driver for Windows NT4

-

Software requirements:

-
    -
  • Microsoft Driver Developer Kit (DDK) for Windows NT4
  • -
  • A recent version of the Microsoft Platform Software Development Kit - (SDK) that is compatible with Visual Studio 6 (the latest compatible one is - Platform SDK February 2003). This version of the PSDK is available on the - Microsoft web site at - - http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm. - It can be ordered online at - - http://www.qmedia.ca/launch/psdk.htm, and it's also available to - Microsoft MSDN subscribers on the Subscribers Downloads web site.
  • Microsoft Visual C++ 6.0 - with Service Pack 5 or 6 (both the service packs are available online on the - Microsoft web site).
-

If your system satisfies these requirements, follow these steps:

-
    -
  1. From the Windows NT Start menu, select the folder Programs and - then Development Kits, then Windows NT4 DDK. From here select the voice - Checked Build - Environment if you want to build a debug version, or Free Build - Environment if you want to build a release version. -
  2. A command prompt will be opened. Move to the directory PacketNTx inside the - WinPcap source folder and type the command

    CompileDriver
    -
    This script will generate the driver (npf.sys). The binary will be put in - one of these folders
      -
    • Free Build Environment: winpcap\PacketNTx\driver\bin\NT4\i386\free
    • -
    • Checked Build Environment: winpcap\PacketNTx\driver\bin\NT4\i386\checked
    • -
    -
-

Warning: sometimes, during the compilation of the driver, a lot of -'last line incomplete' errors are generated. Ignore these errors and let the -compilation process continue, they are due to bugs in some DDK versions.

-

Compiling the driver for Windows 2000/XP/2003/Vista/2008/Win7/2008R2 (x86 and x64)

-

Software requirements:

-
    -
  • Microsoft Windows Driver Kit (WDK) 6001.18002. As of release 4.1, - WinPcap is compiled with WDK 6001.18002.
  • -
-

NOTE: it should be possible to use older DDKs to compile WinPcap, but you -might need to -manually modify the compilation scripts in order to disable PREfast (PREfast is -a static code analysis tool shipped with recent versions of the DDK/WDK).

-

If your system satisfies these requirements, follow these steps:

-
    -
  1. From the Windows Start menu, select the folder Programs and - then Windows Driver K, then WDK 6001.18002, then Build Environments.
      -
    • x86 driver: Choose Windows 2000 and then Windows 2000 x86 Free Build Environment if you want to build a release version or Windows 2000 - x86 Checked Build Environment if you want to build a debug version.
    • -
    • x64 driver: Choose Windows Server 2003 and then Windows - Server 2003 x64 Free Build Environment if you want to build a release version or - Windows Server 2003 - x64 Checked Build Environment if you want to build a debug version.
    • -
    -
  2. A command prompt will be opened. Move to the directory PacketNTx inside the - WinPcap source folder and type the command

    CompileDriver
    -
    This script will generate the driver (npf.sys). The binary will be put in - one of these folders
      -
    • x86 driver (both Free and Checked Build): winpcap\PacketNTx\driver\bin\i386
    • -
    • x64 driver (both Free and Checked Build): winpcap\PacketNTx\driver\bin\amd64
    • -
    -
-

Compiling the driver on Windows 9x

-

NOTE: this Windows platform is no longer supported by -WinPcap. However, the sources for these operating systems are still available in -the sources package.

-

To compile the driver for Windows 9x you will need:

-
    -
  • Driver Developer Kit (DDK) for Windows 95/98/ME -
  • A recent version of the Microsoft Platform Software Development Kit (SDK) - that is compatible with Visual Studio 6 (the latest compatible one is - Platform SDK February 2003). This version of the PSDK is available on the - Microsoft web site at - - http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm. - It can be ordered online at - - http://www.qmedia.ca/launch/psdk.htm, and it's also available to - Microsoft MSDN subscribers on the Subscribers Downloads web site.
  • Microsoft Visual C++ 6.0 - with Service Pack 5 or 6 (both the service packs are available online on the - Microsoft web site).
-

The steps to follow are:

-
    -
  1. Open a DOS shell -
  2. Go to the VisualC++ BIN directory (for example C:\DEVSTUDIO\VC\BIN) and - execute the command
    -
    - Vcvars32
    -
    -
  3. Go to the SDK directory (for example C:\MSSDK) and execute the command
    -
    - Setenv sdk_path
    -
    - where sdk_path is the directory of SDK (for example Setenv C:\MSSDK) -
  4. Go to the DDK directory (for example C:\DDK) and execute the command
    -
    - Ddkenv 32 net
    -
    -
  5. Move to the directory whit the driver's source code and type the command
    -
    - nmake rtl
    -
    -
    to obtain a release version, or
    -
    - nmake
    -
    -
    to obtain a debug version.
    The release version of packet.vxd will be placed in the - retail - directory, the debug version in the debug directory.
  6. -
-

Warning: On some systems the NMAKE utility is not able to -launch ADRC2VXD, this means that the driver binary is generated correctly, but -without the copyright information. We don't know the cause of this problem.

-

Compiling packet.dll

-

The source tree for this DLL is located in PacketNTx\dll\.

-

NOTE: the 9x family of Windows operating systems is no longer supported -by WinPcap. However, the sources for these operating systems are still available -in the sources package.

-

Software requirements:

-
    -
  • Microsoft Visual Studio 2005 SP1. It's theoretically possible to compile - the x86 version with Visual Studio 6, but the project files are no longer - maintained.
  • The AirPcap developer's pack from - - http://www.cacetech.com/products/airpcap.htm. The AirPcap developer's - pack needs to be unzipped in a folder in the same folder where the WinPcap - sources have been unzipped.
-

To compile the PACKET.DLL, load the project packet.sln contained in the directory PacketNTx\dll\project -in Visual Studio 2005. There are several project -configurations, each of them available for the x86 (Win32) and x64 platforms:

-
    -
  • Release: standard release configuration
  • -
  • Debug: standard debug configuration
  • -
  • Release NT4: release configuration able to run on - NT4. It does not include Wan and IP helper API support.
  • -
  • Debug NT4: debug configuration able to run on - NT4. It does not include Wan and IP helper API support.
  • -
  • Release No NetMon: release configuration able to run on - Vista. It - does not include Wan support (with the NetMon API).
  • -
  • Debug No NetMon: debug configuration able to run on - Vista. It - does not include Wan support (with the NetMon API).
  • -
  • Release LOG_TO_FILE: standard release configuration with tracing to - file enabled.
  • -
  • Release NT4 LOG_TO_FILE: release configuration able to run on - NT4 with tracing to file enabled. It does not include Wan and IP helper API support.
  • -
  • Release No NetMon LOG_TO_FILE: release configuration able to run on - Vista with tracing to file enabled. It - does not include Wan support (with the NetMon API).
  • -
-

Choose the desired configuration and build the project to obtain the binary -files.

-

Compiling wpcap.dll

-

wpcap.dll can be compiled for any Win32 platform and the generated dll is system independent.

-

System Requirements:

-
    -
  • Microsoft Visual Studio 2005 SP1. It's theoretically possible to compile - the x86 version with Visual Studio 6, but the project files are no longer - maintained.
  • The AirPcap developer's pack from - - http://www.cacetech.com/products/airpcap.htm. The AirPcap developer's - pack needs to be unzipped in a folder in the same folder where the WinPcap - sources have been unzipped.There are eight build project configurations:
-

To compile the wpcap.dll, load the project wpcap.sln contained in the directory -wpcap\PRJ -in Visual Studio 2005. There are several project -configurations, each of them available for the x86 (Win32) and x64 platforms:

-
    -
  • Release: standard release configuration
  • -
  • Debug: standard debug configuration
  • -
  • Release No AirPcap: release configuration without support for - AirPcap adapters.
  • -
  • Debug No AirPcap: debug configuration without support for AirPcap - adapters.
  • -
-

Choose the desired configuration and build the project to obtain the binary -files.

-

Note: wpcap.dll contains the source code of libpcap from -www.tcpdump.org, with some modifications -for remote capture. You will be able to include and build a different libpcap -version simply copying it in the directory winpcap\wpcap\prj of the -WinPcap source code distribution, but you must use the "Debug" or "Release" -build configurations.

- - - - -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__internals.html b/ledset/WpdPack_4_1_2/docs/html/group__internals.html deleted file mode 100644 index 089963e..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__internals.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -WinPcap: WinPcap internals - - - - - - -
-

WinPcap internals

- - - - -

Modules

 NPF driver internals manual
 How to compile WinPcap
 Packet.dll -- Packet Driver API
-

Detailed Description

- - - - - - - - - - -This portion of the manual describes the internal structure and interfaces of WinPcap, -starting from the lowest-level module. It is targeted at people that must extend -or modify this software, or to the ones interested in how it works. Therefore, -developers who just want to use WinPcap in their software don't need to read it. - -

WinPcap structure

-

Quoted from the home page of winpcap:

-

WinPcap is an architecture for packet capture and network analysis for the -Win32 platforms. It includes a kernel-level packet filter, a -low-level dynamic link library (packet.dll), and a high-level and -system-independent library (wpcap.dll).

-

Why we use the term "architecture" rather than "library"? Because packet capture is a low level mechanism -that requires a strict interaction with the network adapter and with the -operating system, in particular with its networking implementation, so a simple -library is not sufficient.

-

The following figure shows the various components of WinPcap:

-

- -

-Main components of WinPcap. -

First, a capture system needs to bypass the operating systems's protocol stack in order to access -the raw data transiting on the network. This requires a portion -running inside the kernel of OS, interacting directly with the network interface -drivers. This portion is very system dependent, and in -our solution it is realized as a device driver, called Netgroup Packet Filter (NPF); -we provide different versions of the driver for Windows 95, Windows 98, Windows ME, -Windows NT 4, -Windows 2000 and Windows XP. These drivers offer both basic features like packet capture -and injection, as well as more advanced ones like a programmable filtering system and a -monitoring engine. The first one can be used to restrict a capture session to a -subset of the network traffic (e.g. it is possible to capture only the ftp -traffic generated by a particular host), the second one provides a powerful but -simple to use mechanism to obtain statistics on the traffic (e.g. it is possible -to obtain the network load or the amount of data exchanged between two hosts).

-

Second, the capture system must export an interface that user-level -applications will use to take advantage of the features provided by the kernel -driver. WinPcap provides two different libraries: packet.dll and wpcap.dll

-

-The first one offers a low-level API that can be used to directly access the -functions of the driver, with a programming interface independent from the -Microsoft OS. 

-

The second one exports a more powerful set of high level capture -primitives that are compatible with libpcap, the well known Unix capture -library. These functions enable packet capture in a manner that is independent -of the -underlying network hardware and operating system.

-

Throughout this documentation we will refer to the Packet Driver API or -packet.dll as the first set of functions, whereas wpcap, wpcap.dll or libpcap - will refer to the to the second one.

- - - - -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__language.html b/ledset/WpdPack_4_1_2/docs/html/group__language.html deleted file mode 100644 index 4dcc1bf..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__language.html +++ /dev/null @@ -1,633 +0,0 @@ - - - - -WinPcap: Filtering expression syntax - - - - - - -
-

Filtering expression syntax
- -[WinPcap user's manual] -

-
- - - - - - - - - - -
-
Note: this document has been drawn from the tcpdump man page. The original version can - be found at  www.tcpdump.org. -
 
-
wpcap filters are based on a declarative predicate syntax. A filter is - an ASCII string containing a filtering expression. pcap_compile() - takes the expression and translates it in a program for the kernel-level - packet filter. -
-

The expression selects which packets will be dumped. -If no expression -is given, all packets on the net will be accepted by the kernel-level filtering -engine. -Otherwise, -only packets for which expression is `true' will be accepted.

-

- -The expression consists of one or more -primitives. - -Primitives usually consist of an -id - -(name or number) preceded by one or more qualifiers. -There are three -different kinds of qualifier: -

-
type
-qualifiers say what kind of thing the id name or number refers to. -Possible types are -host, - -net - -and -port. - -E.g., `host foo', `net 128.3', `port 20'. -If there is no type -qualifier, -host - -is assumed. -
dir
-qualifiers specify a particular transfer direction to and/or from -id. - -Possible directions are -src, - -dst, - -src or dst - -and -src and - -dst. - -E.g., `src foo', `dst net 128.3', `src or dst port ftp-data'. -If -there is no dir qualifier, -src or dst - -is assumed. -For `null' link layers (i.e. point to point protocols such as slip) the -inbound - -and -outbound - -qualifiers can be used to specify a desired direction. -
proto
-qualifiers restrict the match to a particular protocol. -Possible -protos are: -ether, - -fddi, - -tr, - -ip, - -ip6, - -arp, - -rarp, - -decnet, - -tcp - -and -udp. - -E.g., `ether src foo', `arp net 128.3', `tcp port 21'. -If there is -no proto qualifier, all protocols consistent with the type are -assumed. -E.g., `src foo' means `(ip or arp or rarp) src foo' -(except the latter is not legal syntax), `net bar' means `(ip or -arp or rarp) net bar' and `port 53' means `(tcp or udp) port 53'. -
-

- -[`fddi' is actually an alias for `ether'; the parser treats them -identically as meaning ``the data link level used on the specified -network interface.'' FDDI headers contain Ethernet-like source -and destination addresses, and often contain Ethernet-like packet -types, so you can filter on these FDDI fields just as with the -analogous Ethernet fields. -FDDI headers also contain other fields, -but you cannot name them explicitly in a filter expression. -

- -Similarly, `tr' is an alias for `ether'; the previous paragraph's -statements about FDDI headers also apply to Token Ring headers.] -

- -In addition to the above, there are some special `primitive' keywords -that don't follow the pattern: -gateway, - -broadcast, - -less, - -greater - -and arithmetic expressions. -All of these are described below. -

- -More complex filter expressions are built up by using the words -and, - -or - -and -not - -to combine primitives. -E.g., `host foo and not port ftp and not port ftp-data'. -To save typing, identical qualifier lists can be omitted. -E.g., -`tcp dst port ftp or ftp-data or domain' is exactly the same as -`tcp dst port ftp or tcp dst port ftp-data or tcp dst port domain'. -

- -Allowable primitives are: -

-
dst host host
-True if the IPv4/v6 destination field of the packet is host, -which may be either an address or a name. -
src host host
-True if the IPv4/v6 source field of the packet is host. -
host host
-True if either the IPv4/v6 source or destination of the packet is host. -Any of the above host expressions can be prepended with the keywords, -ip, arp, rarp, or ip6 as in: -
-
- -
ip host host
- - -
-
- - -which is equivalent to: -
-
- -
ether proto \ip and host host
- - -
-
- - -If host is a name with multiple IP addresses, each address will -be checked for a match. -
ether dst ehost
-True if the ethernet destination address is ehost. -Ehost -may be either a name from /etc/ethers or a number (see -ethers(3N) - -for numeric format). -
ether src ehost
-True if the ethernet source address is ehost. -
ether host ehost
-True if either the ethernet source or destination address is ehost. -
gateway host
-True if the packet used host as a gateway. -I.e., the ethernet -source or destination address was host but neither the IP source -nor the IP destination was host. -Host must be a name and -must be found both by the machine's host-name-to-IP-address resolution -mechanisms (host name file, DNS, NIS, etc.) and by the machine's -host-name-to-Ethernet-address resolution mechanism (/etc/ethers, etc.). -(An equivalent expression is -
-
- -
ether host ehost and not host host
- - -
-
- - -which can be used with either names or numbers for host / ehost.) -This syntax does not work in IPv6-enabled configuration at this moment. -
dst net net
-True if the IPv4/v6 destination address of the packet has a network -number of net. -Net may be either a name from /etc/networks -or a network number (see networks(4) for details). -
src net net
-True if the IPv4/v6 source address of the packet has a network -number of net. -
net net
-True if either the IPv4/v6 source or destination address of the packet has a network -number of net. -
net net mask netmask
-True if the IP address matches net with the specific netmask. -May be qualified with src or dst. -Note that this syntax is not valid for IPv6 net. -
net net/len
-True if the IPv4/v6 address matches net with a netmask len -bits wide. -May be qualified with src or dst. -
dst port port
-True if the packet is ip/tcp, ip/udp, ip6/tcp or ip6/udp and has a -destination port value of port. -The port can be a number or a name used in /etc/services (see -tcp(4P) - -and -udp(4P)). - -If a name is used, both the port -number and protocol are checked. -If a number or ambiguous name is used, -only the port number is checked (e.g., dst port 513 will print both -tcp/login traffic and udp/who traffic, and port domain will print -both tcp/domain and udp/domain traffic). -
src port port
-True if the packet has a source port value of port. -
port port
-True if either the source or destination port of the packet is port. -Any of the above port expressions can be prepended with the keywords, -tcp or udp, as in: -
-
- -
tcp src port port
- - -
-
- - -which matches only tcp packets whose source port is port. -
less length
-True if the packet has a length less than or equal to length. -This is equivalent to: -
-
- -
len <= length.
- - -
-
- - -
greater length
-True if the packet has a length greater than or equal to length. -This is equivalent to: -
-
- -
len >= length.
- - -
-
- - -
ip proto protocol
-True if the packet is an IP packet (see -ip(4P)) - -of protocol type protocol. -Protocol can be a number or one of the names -icmp, icmp6, igmp, igrp, pim, ah, -esp, vrrp, udp, or tcp. -Note that the identifiers tcp, udp, and icmp are also -keywords and must be escaped via backslash (\), which is \\ in the C-shell. -Note that this primitive does not chase the protocol header chain. -
ip6 proto protocol
-True if the packet is an IPv6 packet of protocol type protocol. -Note that this primitive does not chase the protocol header chain. -
ip6 protochain protocol
-True if the packet is IPv6 packet, -and contains protocol header with type protocol -in its protocol header chain. -For example, -
-
- -
ip6 protochain 6
- - -
-
- - -matches any IPv6 packet with TCP protocol header in the protocol header chain. -The packet may contain, for example, -authentication header, routing header, or hop-by-hop option header, -between IPv6 header and TCP header. -The BPF code emitted by this primitive is complex and -cannot be optimized by BPF optimizer code in tcpdump, -so this can be somewhat slow. -
ip protochain protocol
-Equivalent to ip6 protochain protocol, but this is for IPv4. -
ether broadcast
-True if the packet is an ethernet broadcast packet. -The ether -keyword is optional. -
ip broadcast
-True if the packet is an IP broadcast packet. -It checks for both -the all-zeroes and all-ones broadcast conventions, and looks up -the local subnet mask. -
ether multicast
-True if the packet is an ethernet multicast packet. -The ether -keyword is optional. -This is shorthand for `ether[0] & 1 != 0'. -
ip multicast
-True if the packet is an IP multicast packet. -
ip6 multicast
-True if the packet is an IPv6 multicast packet. -
ether proto protocol
-True if the packet is of ether type protocol. -Protocol can be a number or one of the names -ip, ip6, arp, rarp, atalk, aarp, -decnet, sca, lat, mopdl, moprc, -iso, stp, ipx, or netbeui. -Note these identifiers are also keywords -and must be escaped via backslash (\). -
-[In the case of FDDI (e.g., `fddi protocol arp') and Token Ring -(e.g., `tr protocol arp'), for most of those protocols, the -protocol identification comes from the 802.2 Logical Link Control (LLC) -header, which is usually layered on top of the FDDI or Token Ring -header. -
-When filtering for most protocol identifiers on FDDI or Token Ring, -tcpdump checks only the protocol ID field of an LLC header in -so-called SNAP format with an Organizational Unit Identifier (OUI) of -0x000000, for encapsulated Ethernet; it doesn't check whether the packet -is in SNAP format with an OUI of 0x000000. -
-The exceptions are iso, for which it checks the DSAP (Destination -Service Access Point) and SSAP (Source Service Access Point) fields of -the LLC header, stp and netbeui, where it checks the DSAP of -the LLC header, and atalk, where it checks for a SNAP-format -packet with an OUI of 0x080007 and the Appletalk etype. -
-In the case of Ethernet, tcpdump checks the Ethernet type field -for most of those protocols; the exceptions are iso, sap, -and netbeui, for which it checks for an 802.3 frame and then -checks the LLC header as it does for FDDI and Token Ring, atalk, -where it checks both for the Appletalk etype in an Ethernet frame and -for a SNAP-format packet as it does for FDDI and Token Ring, aarp, -where it checks for the Appletalk ARP etype in either an Ethernet frame -or an 802.2 SNAP frame with an OUI of 0x000000, and ipx, where it -checks for the IPX etype in an Ethernet frame, the IPX DSAP in the LLC -header, the 802.3 with no LLC header encapsulation of IPX, and the IPX -etype in a SNAP frame.] -
decnet src host
-True if the DECNET source address is -host, - -which may be an address of the form ``10.123'', or a DECNET host -name. -[DECNET host name support is only available on Ultrix systems -that are configured to run DECNET.] -
decnet dst host
-True if the DECNET destination address is -host. - -
decnet host host
-True if either the DECNET source or destination address is -host. - -
ip, ip6, arp, rarp, atalk, aarp, decnet, iso, stp, ipx, netbeui
-Abbreviations for: -
-
- -
ether proto p
- - -
-
- - -where p is one of the above protocols. -
lat, moprc, mopdl
-Abbreviations for: -
-
- -
ether proto p
- - -
-
- - -where p is one of the above protocols. -Note that -tcpdump does not currently know how to parse these protocols. -
vlan [vlan_id]
-True if the packet is an IEEE 802.1Q VLAN packet. -If [vlan_id] is specified, only true is the packet has the specified -vlan_id. -Note that the first vlan keyword encountered in expression -changes the decoding offsets for the remainder of expression -on the assumption that the packet is a VLAN packet. -
tcp, udp, icmp
-Abbreviations for: -
-
- -
ip proto p or ip6 proto p
- - -
-
- - -where p is one of the above protocols. -
iso proto protocol
-True if the packet is an OSI packet of protocol type protocol. -Protocol can be a number or one of the names -clnp, esis, or isis. -
clnp, esis, isis
-Abbreviations for: -
-
- -
iso proto p
- - -
-
- - -where p is one of the above protocols. -Note that tcpdump does an incomplete job of parsing these protocols. -
expr relop expr
-True if the relation holds, where relop is one of >, <, >=, <=, =, !=, -and expr is an arithmetic expression composed of integer constants -(expressed in standard C syntax), the normal binary operators -[+, -, *, /, &, |], a length operator, and special packet data accessors. -To access -data inside the packet, use the following syntax: - -
-proto [ expr : size ]
-
- - -Proto is one of ether, fddi, tr, -ip, arp, rarp, tcp, udp, icmp or ip6, and -indicates the protocol layer for the index operation. -Note that tcp, udp and other upper-layer protocol types only -apply to IPv4, not IPv6 (this will be fixed in the future). -The byte offset, relative to the indicated protocol layer, is -given by expr. -Size is optional and indicates the number of bytes in the -field of interest; it can be either one, two, or four, and defaults to one. -The length operator, indicated by the keyword len, gives the -length of the packet. -

-For example, `ether[0] & 1 != 0' catches all multicast traffic. -The expression `ip[0] & 0xf != 5' -catches all IP packets with options. -The expression -`ip[6:2] & 0x1fff = 0' -catches only unfragmented datagrams and frag zero of fragmented datagrams. -This check is implicitly applied to the tcp and udp -index operations. -For instance, tcp[0] always means the first -byte of the TCP header, and never means the first byte of an -intervening fragment. -

-Some offsets and field values may be expressed as names rather than -as numeric values. -The following protocol header field offsets are -available: icmptype (ICMP type field), icmpcode (ICMP -code field), and tcpflags (TCP flags field). -

-The following ICMP type field values are available: icmp-echoreply, -icmp-unreach, icmp-sourcequench, icmp-redirect, -icmp-echo, icmp-routeradvert, icmp-routersolicit, -icmp-timxceed, icmp-paramprob, icmp-tstamp, -icmp-tstampreply, icmp-ireq, icmp-ireqreply, -icmp-maskreq, icmp-maskreply. -

-The following TCP flags field values are available: tcp-fin, -tcp-syn, tcp-rst, tcp-push, tcp-push, -tcp-ack, tcp-urg. -

-

- -Primitives may be combined using: -

-
-A parenthesized group of primitives and operators -(parentheses are special to the Shell and must be escaped). -
-Negation (`!' or `not'). -
-Concatenation (`&&' or `and'). -
-Alternation (`||' or `or'). -
-

- -Negation has highest precedence. -Alternation and concatenation have equal precedence and associate -left to right. -Note that explicit and tokens, not juxtaposition, -are now required for concatenation. -

- -If an identifier is given without a keyword, the most recent keyword -is assumed. -For example, - -

- -
not host vs and ace
- - -
- - -is short for -
- -
not host vs and host ace
- - -
- - -which should not be confused with -
- -
not ( host vs or ace )
- - -
- - -

- -Expression arguments can be passed to tcpdump as either a single -argument or as multiple arguments, whichever is more convenient. -Generally, if the expression contains Shell metacharacters, it is -easier to pass it as a single, quoted argument. -Multiple arguments are concatenated with spaces before being parsed. -

- - - - -

- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__packetapi.html b/ledset/WpdPack_4_1_2/docs/html/group__packetapi.html deleted file mode 100644 index d0f5c9e..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__packetapi.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - -WinPcap: Packet.dll -- Packet Driver API - - - - - - -
-

Packet.dll -- Packet Driver API
- -[WinPcap internals] -

-
- - - - - - - - - - -Packet.dll is a dynamic link library that offers a set of low level functions -to: -
    -
  • install, start and stop the NPF device driver
  • -
  • Receive packets from the NPF driver
  • -
  • send packets to the NPF driver
  • -
  • obtain the list of the available network adapters
  • -
  • retrieve various information about an adapter, like the description and - the list of addresses and netmasks
  • -
  • query and set various low-level parameters of an adapter
  • -
-

There are two versions of packet.dll: the first one runs under Windows 95/98/ME, the second -one is for  Windows -NT/2000/XP.

-

Packet.dll was created to provide a layer to access the low level -functionalities of WinPcap in a system independent way. This library handles all -the system-dependent details (like managing the devices, interacting with the OS -to manage the adapters, looking for the information in the registry and so on), -and exports an API that is uniform across all Windows OSes. In this way, -applications or libraries based on it can run without being recompiled -under any Windows operating system.

-

However, not all of the packet.dll API is totally portable: some advanced features, like kernel-mode dump, are present only in the WinNTx version of WinPcap, -while packet.dll for Win9x does not provide them. On the other side, the NTx -version is a superset of the 9x one, in other words all the function present in -the Win9x version are present in WinNTx too.

-

The other important feature of this library is its ability to handle NPF driver. -Packet.dll transparently installs and starts the driver when an application -attempts to access an adapter. This avoids the manual installation of the driver -through the control panel.

-

Important note, read carefully!

-

The source code of Packet.dll is freely available and completely documented. -However, packet.dll should be considered an internal API, because its purpose -inside WinPcap is to be a building block for the real public API: wpcap.dll.

-

As a consequence, since the normal and suggested way for an -application to use WinPcap is through wpcap.dll, we don't guarantee that the packet.dll -API will not be changed in future releases of winpcap, and we don't provide -support for this API. For the same reason, this manual doesn't contain -any more the Doxygen-generated documentation of Packet.dll: the user will -have to run Doxygen on his own to create it, or read the comments in the source -code.

- - - - -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remote.html b/ledset/WpdPack_4_1_2/docs/html/group__remote.html deleted file mode 100644 index ed69aca..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remote.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - -WinPcap: Remote Capture - - - - - - -
-

Remote Capture

- - - - - -

Modules

 Exported Structures and Definitions
 Exported Functions
 Internal Functions
 Internal Structures and Definitions
-

Detailed Description

- - - - - - -Using WinPcap Remote Capture - - - - -
- -
-

WinPcap comes with Remote Capture capabilities. This is an highly -experimental feature that allows to interact to a remote machine and capture -packets that are being transmitted on the remote network.

-

This requires a remote daemon (called rpcapd) which -performs the capture and sends data back and a local client that sends -the appropriate commands and receives the captured data.

-

WinPcap extends the standard WinPcap code in such a way that all -WinPcap-based tools can expoit remote capture capabilities. For instance, the -capabillity to interact with a remote daemon are added to the client software -without any explicit modification to it. Vice versa, the remote daemon must be -explicitely installed (and configured) on the remote machine.

-

Remote Capture Running Modes

-

The Remote Capture Protocol (RPCAP) can work in two modes:

-
    -
  • Passive Mode (default): the client (e.g. a network sniffer) - connects to the remote daemon, it sends them the appropriate commands, and - it starts the capture.
  • -
  • Active Mode: the remote daemon try to establish a connection toward - the client (e.g. the network sniffer); then, the client sends the - appropriate commands to the daemon and it starts the capture. This name is - due to the fact thet the daemon becomes active instead of waiting - for new connections.
  • -
-

The Active Mode is useful in case the remote daemon is behind a firewall and -it cannot receive connections from the external world. In this case, the daemon -can be configured to establish the connection to a given host, which will have -been configured in order to wait for that connection. After establishing -the connection, the protocol continues its job in almost the same way in both -Active and Passive Mode.

-

Analyzer (http://analyzer.polito.it/30alpha/) -has a set of commands (in the Capture menu) that allows you to accept a -remote connection and then start the capture on the remote device. Currently, -Analyzer is the only tool that is able to work in active mode, since it requires -some modifications to the application code.

-

Configuring the Remote Daemon (rpcapd)

-

The Remote Daemon is a standard Win32 executable running either in console -mode or as a service. The executable can be found in the WinPcap -folder and it has the following syntax:

-
        rpcapd [-b <address>] [-p <port>] [-6] [-l <host_list>] [-a <host,port>] 
-               [-n] [-v] [-d] [-s <file>] [-f <file>]
-

The daemon can be compiled and it is actually working on Linux as well.

-

Here there is a brief description of the allowed commands:

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SwitchDescription
-
-b <address>
-
It sets the address the daemon has to bind to (either numeric or - literal). Default: it binds to all local IPv4 and IPv6 addresses.
-
-p <port>
-
It sets the port the daemon has to bind to. Default: it binds to port - 2002.
-
-4
-
It binds only to IPv4 addresses. Default: both IPv4 and IPv6 waiting - sockets are used.
-
-l <host_list_file>
-
It specifies a file that keeps the list of the hosts which are allowed - to connect to this daemon (if more than one, the file keeps them one per - line). We suggest to use literal names (instead of numeric ones) in - order to avoid problems with different address families (IPv4 and IPv6).
-
-n
-
It permits NULL authentication (usually used with '-l', that - guarantees that only the allowed hosts can connect to the daemon). - Default: the username/password authentication mechanism is required.
-
-a <host, port>
-
It forces the daemon to run in active mode and to connect to 'host' on - port 'port'. This does not exclude that the daemon is still able to - accept passive connections.
-
-v
-
It forces the daemon to run in active mode only (default: the daemon - always accepts active connections, even if the '-a' switch is - specified).
-
-d
-
Forces the daemon to run in background, i.e. as a daemon (UNIX only) - or as a service (Win32 only). Warning (Win32): this switch is - provided automatically when WinPcap installs this daemon into the Win32 - services (control panel - administrative tools - services).
-
-s <file>
-
It saves the current configuration to file.
-
-f <file>
-
It loads the current configuration from file; all the switches - specified from the command line are ignored and the file settings are - used instead.
-
-h
-
It prints an help screen.
-
-

Installing the remote daemon

-

The remote daemon is installed automatically when installing WinPcap. The -installation process places the rpcapd file into the WinPcap -folder. This file can be executed either from the command line, or as a service. -For instance, the installation process updates the list of available services -list and it creates a new item (Remote Packet Capture Protocol v.0 -(experimental) ). To avoid security problems, the service is inactive and it -has to be started manually (control panel - administrative tools - services - -start).

-

The service has a set of "standard" parameters, i.e. it it launched -with the "-d" flag (in orde to make it running as a -service) and the "-f rpcapd.ini" flag. The user can -create a file called rpcapd.ini in the same folder of the -executable, and put the configuration commands in there. In order for the -service to execute the commands, you have to stop and restart it again (i.e. the -initialization file is parsed only at the beginning). Viceversa, the UNIX -version of rpcapd is able to read the configuration file when -sending a kill -HUP signal to it. In that case, all the existing connections -remain in place, while the new connections will be created according to the new -parameters.

-

In case the user does not want to create the configuration file manually, it -can launch rpcapd with the requested parameters plus the "-s -filename" one. The daemon will parse all the parameters and save -them into the specified configuration file.

-

Starting the remote daemon as a standard executable

-

The rpcapd executable can be launched directly, i.e. it can run -in the foreground as well (not as a daemon/service). The procedure is quite -simple: you have to invoke the executable from the command line with all the -requested parameters but the "-d" flag. The capture -server will start in the foreground.

-

Starting a capture on a remote machine

-

If you are using a tool that is already aware of the remote capture (like -Analyzer), everything is simple. The capture wizard will help you to locate the -appropriate interface on the remote machine.

-

If your preferred tool is not aware of the remote capture, you can still use -the remote capture. In this case you have to read the next Section.

-

Be carefully: the capture server (rpcapd) must be up and -running on the remote machine.

-

New string specifiers for interface selection

-

If your preferred tool is not aware of the remote capture, the only thing you -must do is to insert, as interface specifier, the indication of the remote -machine you want to contact. The following forms are allowed:

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Adapter StringDescription
-
file://filename
-
It opens a local file.
-
rpcap://host.foo.bar/adaptername
-
It opens a remote adapter; the host is specified by means of the - literal name, without port number (i.e. it uses the RPCAP default port).
-
rpcap://host.foo.bar:1234/adaptername
-
It is the same as before, but it uses a different port number.
-
rpcap://10.11.12.13/adaptername
-
It opens a remote adapter, but the host is specified by means of an - IPv4 numeric address, without port number (i.e. it uses the RPCAP - default port).
-
rpcap://10.11.12.13:1234/adaptername
-
It is the same as before, but it uses a different port number.
-
rpcap://[10.11.12.13]:1234/adaptername
-
It is the same as before, but the numeric address is specified within - square brackets (like IPv6 addresses).
-
rpcap://[1:2:3::4]/adaptername
-
It opens a remote adapter, but the host is specified by means of an - IPv6 numeric address, without port number (i.e. it uses the RPCAP - default port). In case of IPv6 addresses you MUST use the square - brackets.
-
rpcap://[1:2:3::4]:1234/adaptername
-
It is the same as before, but it uses a different port number.
-
rpcap://adaptername
-
It opens a local adapter, without using the RPCAP protocol.
-
adaptername
-
It opens a local adapter; it is kept for compability, but it is - strongly discouraged.
-
(NULL)
-
It opens the first local adapter; it is kept for compability, but it - is strongly discouraged.
-
-

The following formats are not allowed:

- - - - - - - - - - - - - -
Adapter StringDescription
-
rpcap://
-
It cannot be used to open the first local adapter.
-
rpcap://hostname/
-
It cannot be used to open the first remote adapter.
-

Installing the Remote Capture Daemon in UNIX

-

The WinPcap source archive can be compiled in UNIX as well. Currently, remote -capture has been tested on Linux and BSD. What you have to do is:

-
    -
  • download the WinPcap sources
  • -
  • unpack the sources -
      -
    • we suggest to use the unzip -a command in order to - convert DOS files to UNIX ones
    • -
    -
  • -
  • move to the libpcap folder
  • -
  • type: -
      -
    • ./configure
    • -
    • Warning: in case the previous step reports an error, please - regenerate the configure file using automake - (version 2.50 or higher required)
    • -
    • make
    • -
    -
  • -
  • move to the rpcapd folder
  • -
  • type make
  • -
-

The remote capture capabilities are turned on by default on Linux and -FreeBSD. In case you do not want remote capture capabilities in libpcap, you can -type

-
    ./configure --disable-remote
-

at the "configure" step. All the possible flags are -listed when typing ./configure --help.

-

What you obtained right now, is:

-
    -
  • a library file (libpcap.a), which can be linked to other - applications (like tcpdump) in order to enable the remote - capture for them.
  • -
  • an executable (rpcapd) that is the remote daemon
  • -
-

Warning: in order to run the rpcapd daemon, the program -must either

-
    -
  • run as root (or)
  • -
  • run as user, but it must be owned by root and must be SUID root (chmod - u+s rpcapd)
  • -
-

Known bugs

-

FreeBSD: the first time you call the pcap_stat(), the -function takes several seconds to return. Therefore, programs like Analyzer seem -to hang up for 20-30 seconds at the beginning of the capture (if this is done -with BSD as a remote probe). We're investigating to solve this issue.

-

For any question, please refer to the WinPcap help page.

- - - - -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remote__auth__methods.html b/ledset/WpdPack_4_1_2/docs/html/group__remote__auth__methods.html deleted file mode 100644 index 306547d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remote__auth__methods.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - -WinPcap: Authentication methods supported by the RPCAP protocol - - - - - - -
-

Authentication methods supported by the RPCAP protocol
- -[Exported Structures and Definitions] -

- - - - - -

Defines

#define RPCAP_RMTAUTH_NULL   0
 It defines the NULL authentication.
#define RPCAP_RMTAUTH_PWD   1
 It defines the username/password authentication.
-

Define Documentation

- -
-
- - - - -
#define RPCAP_RMTAUTH_NULL   0
-
-
- -

It defines the NULL authentication.

-

This value has to be used within the 'type' member of the pcap_rmtauth structure. The 'NULL' authentication has to be equal to 'zero', so that old applications can just put every field of struct pcap_rmtauth to zero, and it does work.

- -

Definition at line 304 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define RPCAP_RMTAUTH_PWD   1
-
-
- -

It defines the username/password authentication.

-

With this type of authentication, the RPCAP protocol will use the username/ password provided to authenticate the user on the remote machine. If the authentication is successful (and the user has the right to open network devices) the RPCAP connection will continue; otherwise it will be dropped.

-

This value has to be used within the 'type' member of the pcap_rmtauth structure.

- -

Definition at line 315 of file remote-ext.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remote__open__flags.html b/ledset/WpdPack_4_1_2/docs/html/group__remote__open__flags.html deleted file mode 100644 index 44def81..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remote__open__flags.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - -WinPcap: Flags defined in the pcap_open() function - - - - - - -
-

Flags defined in the pcap_open() function
- -[Exported Structures and Definitions] -

- - - - - - - - - - - -

Defines

#define PCAP_OPENFLAG_PROMISCUOUS   1
 Defines if the adapter has to go in promiscuous mode.
#define PCAP_OPENFLAG_DATATX_UDP   2
 Defines if the data trasfer (in case of a remote capture) has to be done with UDP protocol.
#define PCAP_OPENFLAG_NOCAPTURE_RPCAP   4
 Defines if the remote probe will capture its own generated traffic.
#define PCAP_OPENFLAG_NOCAPTURE_LOCAL   8
 Defines if the local adapter will capture its own generated traffic.
#define PCAP_OPENFLAG_MAX_RESPONSIVENESS   16
 This flag configures the adapter for maximum responsiveness.
-

Define Documentation

- -
-
- - - - -
#define PCAP_OPENFLAG_DATATX_UDP   2
-
-
- -

Defines if the data trasfer (in case of a remote capture) has to be done with UDP protocol.

-

If it is '1' if you want a UDP data connection, '0' if you want a TCP data connection; control connection is always TCP-based. A UDP connection is much lighter, but it does not guarantee that all the captured packets arrive to the client workstation. Moreover, it could be harmful in case of network congestion. This flag is meaningless if the source is not a remote interface. In that case, it is simply ignored.

- -

Definition at line 217 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define PCAP_OPENFLAG_MAX_RESPONSIVENESS   16
-
-
- -

This flag configures the adapter for maximum responsiveness.

-

In presence of a large value for nbytes, WinPcap waits for the arrival of several packets before copying the data to the user. This guarantees a low number of system calls, i.e. lower processor usage, i.e. better performance, which is good for applications like sniffers. If the user sets the PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will copy the packets as soon as the application is ready to receive them. This is suggested for real time applications (like, for example, a bridge) that need the best responsiveness.

- -

Definition at line 248 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define PCAP_OPENFLAG_NOCAPTURE_LOCAL   8
-
-
- -

Defines if the local adapter will capture its own generated traffic.

-

This flag tells the underlying capture driver to drop the packets that were sent by itself. This is usefult when building applications like bridges, that should ignore the traffic they just sent.

- -

Definition at line 237 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define PCAP_OPENFLAG_NOCAPTURE_RPCAP   4
-
-
- -

Defines if the remote probe will capture its own generated traffic.

-

In case the remote probe uses the same interface to capture traffic and to send data back to the caller, the captured traffic includes the RPCAP traffic as well. If this flag is turned on, the RPCAP traffic is excluded from the capture, so that the trace returned back to the collector is does not include this traffic.

- -

Definition at line 228 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define PCAP_OPENFLAG_PROMISCUOUS   1
-
-
- -

Defines if the adapter has to go in promiscuous mode.

-

It is '1' if you have to open the adapter in promiscuous mode, '0' otherwise. Note that even if this parameter is false, the interface could well be in promiscuous mode for some other reason (for example because another capture process with promiscuous mode enabled is currently using that interface). On on Linux systems with 2.2 or later kernels (that have the "any" device), this flag does not work on the "any" device; if an argument of "any" is supplied, the 'promisc' flag is ignored.

- -

Definition at line 203 of file remote-ext.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remote__pri__func.html b/ledset/WpdPack_4_1_2/docs/html/group__remote__pri__func.html deleted file mode 100644 index 718b453..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remote__pri__func.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - -WinPcap: Internal Functions - - - - - - -
-

Internal Functions
- -[Remote Capture] -

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remote__pri__struct.html b/ledset/WpdPack_4_1_2/docs/html/group__remote__pri__struct.html deleted file mode 100644 index d64b2fc..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remote__pri__struct.html +++ /dev/null @@ -1,1033 +0,0 @@ - - - - -WinPcap: Internal Structures and Definitions - - - - - - -
-

Internal Structures and Definitions
- -[Remote Capture] -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  activehosts
 Keeps a list of all the opened connections in the active mode. More...
struct  rpcap_header
 Common header for all the RPCAP messages. More...
struct  rpcap_findalldevs_if
 Format of the message for the interface description (findalldevs command). More...
struct  rpcap_findalldevs_ifaddr
 Format of the message for the address listing (findalldevs command). More...
struct  rpcap_openreply
 Format of the message of the connection opening reply (open command). More...
struct  rpcap_startcapreq
 Format of the message that starts a remote capture (startcap command). More...
struct  rpcap_startcapreply
 Format of the reply message that devoted to start a remote capture (startcap reply command). More...
struct  rpcap_pkthdr
 Format of the header which encapsulates captured packets when transmitted on the network. More...
struct  rpcap_filter
 General header used for the pcap_setfilter() command; keeps just the number of BPF instructions. More...
struct  rpcap_filterbpf_insn
 Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header. More...
struct  rpcap_auth
 Structure that keeps the data required for the authentication on the remote host. More...
struct  rpcap_stats
 Structure that keeps the statistics about the number of packets captured, dropped, etc. More...
struct  rpcap_sampling
 Structure that is needed to set sampling parameters. More...

Defines

#define RPCAP_DEFAULT_NETPORT   "2002"
#define RPCAP_DEFAULT_NETPORT_ACTIVE   "2003"
#define RPCAP_DEFAULT_NETADDR   ""
#define RPCAP_VERSION   0
#define RPCAP_TIMEOUT_INIT   90
#define RPCAP_TIMEOUT_RUNTIME   180
#define RPCAP_ACTIVE_WAIT   30
#define RPCAP_SUSPEND_WRONGAUTH   1
#define RPCAP_NETBUF_SIZE   64000
 Buffer used by socket functions to send-receive packets. In case you plan to have messages larger than this value, you have to increase it.
#define RPCAP_HOSTLIST_SEP   " ,;\n\r"
 Separators used for the host list.
#define RPCAP_MSG_ERROR   1
#define RPCAP_MSG_FINDALLIF_REQ   2
#define RPCAP_MSG_OPEN_REQ   3
#define RPCAP_MSG_STARTCAP_REQ   4
#define RPCAP_MSG_UPDATEFILTER_REQ   5
#define RPCAP_MSG_CLOSE   6
#define RPCAP_MSG_PACKET   7
#define RPCAP_MSG_AUTH_REQ   8
#define RPCAP_MSG_STATS_REQ   9
#define RPCAP_MSG_ENDCAP_REQ   10
#define RPCAP_MSG_SETSAMPLING_REQ   11
#define RPCAP_MSG_FINDALLIF_REPLY   (128+RPCAP_MSG_FINDALLIF_REQ)
#define RPCAP_MSG_OPEN_REPLY   (128+RPCAP_MSG_OPEN_REQ)
#define RPCAP_MSG_STARTCAP_REPLY   (128+RPCAP_MSG_STARTCAP_REQ)
#define RPCAP_MSG_UPDATEFILTER_REPLY   (128+RPCAP_MSG_UPDATEFILTER_REQ)
#define RPCAP_MSG_AUTH_REPLY   (128+RPCAP_MSG_AUTH_REQ)
#define RPCAP_MSG_STATS_REPLY   (128+RPCAP_MSG_STATS_REQ)
#define RPCAP_MSG_ENDCAP_REPLY   (128+RPCAP_MSG_ENDCAP_REQ)
#define RPCAP_MSG_SETSAMPLING_REPLY   (128+RPCAP_MSG_SETSAMPLING_REQ)
#define RPCAP_STARTCAPREQ_FLAG_PROMISC   1
#define RPCAP_STARTCAPREQ_FLAG_DGRAM   2
#define RPCAP_STARTCAPREQ_FLAG_SERVEROPEN   4
#define RPCAP_STARTCAPREQ_FLAG_INBOUND   8
#define RPCAP_STARTCAPREQ_FLAG_OUTBOUND   16
#define RPCAP_UPDATEFILTER_BPF   1
#define PCAP_ERR_NETW   1
#define PCAP_ERR_INITTIMEOUT   2
#define PCAP_ERR_AUTH   3
#define PCAP_ERR_FINDALLIF   4
#define PCAP_ERR_NOREMOTEIF   5
#define PCAP_ERR_OPEN   6
#define PCAP_ERR_UPDATEFILTER   7
#define PCAP_ERR_GETSTATS   8
#define PCAP_ERR_READEX   9
#define PCAP_ERR_HOSTNOAUTH   10
#define PCAP_ERR_REMOTEACCEPT   11
#define PCAP_ERR_STARTCAPTURE   12
#define PCAP_ERR_ENDCAPTURE   13
#define PCAP_ERR_RUNTIMETIMEOUT   14
#define PCAP_ERR_SETSAMPLING   15
#define PCAP_ERR_WRONGMSG   16
#define PCAP_ERR_WRONGVER   17

Typedefs

typedef unsigned char uint8
 Provides an 8-bits unsigned integer.
typedef unsigned short uint16
 Provides a 16-bits unsigned integer.
typedef unsigned int uint32
 Provides a 32-bits unsigned integer.
typedef int int32
 Provides a 32-bits integer.
-

Define Documentation

- -
-
- - - - -
#define PCAP_ERR_AUTH   3
-
-
-

Generic authentication error

- -

Definition at line 313 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_ENDCAPTURE   13
-
-
-

Generic pcap_endcapture error

- -

Definition at line 323 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_FINDALLIF   4
-
-
-

Generic findalldevs error

- -

Definition at line 314 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_GETSTATS   8
-
-
-

Generic pcap_stats error

- -

Definition at line 318 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_HOSTNOAUTH   10
-
-
-

The host is not authorized to connect to this server

- -

Definition at line 320 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_INITTIMEOUT   2
-
-
-

The RPCAP initial timeout has expired

- -

Definition at line 312 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_NETW   1
-
-
-

Network error

- -

Definition at line 311 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_NOREMOTEIF   5
-
-
-

The findalldevs was ok, but the remote end had no interfaces to list

- -

Definition at line 315 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_OPEN   6
-
-
-

Generic pcap_open error

- -

Definition at line 316 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_READEX   9
-
-
-

Generic pcap_next_ex error

- -

Definition at line 319 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_REMOTEACCEPT   11
-
-
-

Generic pcap_remoteaccept error

- -

Definition at line 321 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_RUNTIMETIMEOUT   14
-
-
-

The RPCAP run-time timeout has expired

- -

Definition at line 324 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_SETSAMPLING   15
-
-
-

Error diring the settings of sampling parameters

- -

Definition at line 325 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_STARTCAPTURE   12
-
-
-

Generic pcap_startcapture error

- -

Definition at line 322 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_UPDATEFILTER   7
-
-
-

Generic updatefilter error

- -

Definition at line 317 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_WRONGMSG   16
-
-
-

The other end endpoint sent a message which has not been recognized

- -

Definition at line 326 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_WRONGVER   17
-
-
-

The other end endpoint ahs a version number that is not compatible with our

- -

Definition at line 327 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_ACTIVE_WAIT   30
-
-
-

Waiting time betweek two attempts to open a connection, in active mode (default: 30 sec)

- -

Definition at line 92 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_DEFAULT_NETADDR   ""
-
-
-

Default network address on which the RPCAP daemon binds to.

- -

Definition at line 88 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_DEFAULT_NETPORT   "2002"
-
-
-

Default port on which the RPCAP daemon is waiting for connections.

- -

Definition at line 85 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_DEFAULT_NETPORT_ACTIVE   "2003"
-
-
-

Default port on which the client workstation is waiting for connections in case of active mode.

- -

Definition at line 87 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_HOSTLIST_SEP   " ,;\n\r"
-
-
- -

Separators used for the host list.

-

It is used:

-
    -
  • by the rpcapd daemon, when you types a list of allowed connecting hosts
  • -
  • by the rpcap in active mode, when the client waits for incoming connections from other hosts
  • -
- -

Definition at line 109 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_AUTH_REPLY   (128+RPCAP_MSG_AUTH_REQ)
-
-
-

Sends a message that says 'ok, authorization successful'

- -

Definition at line 296 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_AUTH_REQ   8
-
-
-

Message that keeps the authentication parameters

- -

Definition at line 287 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_CLOSE   6
-
-
-

Close the connection with the remote peer

- -

Definition at line 285 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_ENDCAP_REPLY   (128+RPCAP_MSG_ENDCAP_REQ)
-
-
-

Confirms that the capture stopped succesfully

- -

Definition at line 298 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_ENDCAP_REQ   10
-
-
-

Stops the current capture, keeping the device open

- -

Definition at line 289 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_ERROR   1
-
-
-

Message that keeps an error notification

- -

Definition at line 280 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_FINDALLIF_REPLY   (128+RPCAP_MSG_FINDALLIF_REQ)
-
-
-

Keeps the list of all the remote interfaces

- -

Definition at line 292 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_FINDALLIF_REQ   2
-
-
-

Request to list all the remote interfaces

- -

Definition at line 281 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_OPEN_REPLY   (128+RPCAP_MSG_OPEN_REQ)
-
-
-

The remote device has been opened correctly

- -

Definition at line 293 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_OPEN_REQ   3
-
-
-

Request to open a remote device

- -

Definition at line 282 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_PACKET   7
-
-
-

This is a 'data' message, which carries a network packet

- -

Definition at line 286 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_SETSAMPLING_REPLY   (128+RPCAP_MSG_SETSAMPLING_REQ)
-
-
-

Confirms that the capture stopped succesfully

- -

Definition at line 299 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_SETSAMPLING_REQ   11
-
-
-

Sset sampling parameters

- -

Definition at line 290 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_STARTCAP_REPLY   (128+RPCAP_MSG_STARTCAP_REQ)
-
-
-

The capture is staarting correctly

- -

Definition at line 294 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_STARTCAP_REQ   4
-
-
-

Request to start a capture on a remote device

- -

Definition at line 283 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_STATS_REPLY   (128+RPCAP_MSG_STATS_REQ)
-
-
-

Message that keeps the network statistics

- -

Definition at line 297 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_STATS_REQ   9
-
-
-

It requires to have network statistics

- -

Definition at line 288 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_UPDATEFILTER_REPLY   (128+RPCAP_MSG_UPDATEFILTER_REQ)
-
-
-

The filter has been applied correctly on the remote device

- -

Definition at line 295 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_UPDATEFILTER_REQ   5
-
-
-

Send a compiled filter into the remote device

- -

Definition at line 284 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_NETBUF_SIZE   64000
-
-
- -

Buffer used by socket functions to send-receive packets. In case you plan to have messages larger than this value, you have to increase it.

- -

Definition at line 99 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_DGRAM   2
-
-
-

Use a datagram (i.e. UDP) connection for the data stream (default: use TCP)

- -

Definition at line 302 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_INBOUND   8
-
-
-

Capture only inbound packets (take care: the flag has no effects with promiscuous enabled)

- -

Definition at line 304 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_OUTBOUND   16
-
-
-

Capture only outbound packets (take care: the flag has no effects with promiscuous enabled)

- -

Definition at line 305 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_PROMISC   1
-
-
-

Enables promiscuous mode (default: disabled)

- -

Definition at line 301 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_SERVEROPEN   4
-
-
-

The server has to open the data connection toward the client

- -

Definition at line 303 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_SUSPEND_WRONGAUTH   1
-
-
-

If the authentication is wrong, stops 1 sec before accepting a new auth message

- -

Definition at line 93 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_TIMEOUT_INIT   90
-
-
-

Initial timeout for RPCAP connections (default: 90 sec)

- -

Definition at line 90 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_TIMEOUT_RUNTIME   180
-
-
-

Run-time timeout for RPCAP connections (default: 3 min)

- -

Definition at line 91 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_UPDATEFILTER_BPF   1
-
-
-

This code tells us that the filter is encoded with the BPF/NPF syntax

- -

Definition at line 307 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_VERSION   0
-
-
-

Present version of the RPCAP protocol (0 = Experimental).

- -

Definition at line 89 of file pcap-remote.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef int int32
-
-
- -

Provides a 32-bits integer.

- -

Definition at line 118 of file pcap-remote.h.

- -
-
- -
-
- - - - -
typedef unsigned short uint16
-
-
- -

Provides a 16-bits unsigned integer.

- -

Definition at line 116 of file pcap-remote.h.

- -
-
- -
-
- - - - -
typedef unsigned int uint32
-
-
- -

Provides a 32-bits unsigned integer.

- -

Definition at line 117 of file pcap-remote.h.

- -
-
- -
-
- - - - -
typedef unsigned char uint8
-
-
- -

Provides an 8-bits unsigned integer.

- -

Definition at line 115 of file pcap-remote.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remote__samp__methods.html b/ledset/WpdPack_4_1_2/docs/html/group__remote__samp__methods.html deleted file mode 100644 index 10037d3..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remote__samp__methods.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - -WinPcap: Sampling methods defined in the pcap_setsampling() function - - - - - - -
-

Sampling methods defined in the pcap_setsampling() function
- -[Exported Structures and Definitions] -

- - - - - - - -

Defines

#define PCAP_SAMP_NOSAMP   0
 No sampling has to be done on the current capture.
#define PCAP_SAMP_1_EVERY_N   1
 It defines that only 1 out of N packets must be returned to the user.
#define PCAP_SAMP_FIRST_AFTER_N_MS   2
 It defines that we have to return 1 packet every N milliseconds.
-

Define Documentation

- -
-
- - - - -
#define PCAP_SAMP_1_EVERY_N   1
-
-
- -

It defines that only 1 out of N packets must be returned to the user.

-

In this case, the 'value' field of the 'pcap_samp' structure indicates the number of packets (minus 1) that must be discarded before one packet got accepted. In other words, if 'value = 10', the first packet is returned to the caller, while the following 9 are discarded.

- -

Definition at line 275 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define PCAP_SAMP_FIRST_AFTER_N_MS   2
-
-
- -

It defines that we have to return 1 packet every N milliseconds.

-

In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting time' in milliseconds before one packet got accepted. In other words, if 'value = 10', the first packet is returned to the caller; the next returned one will be the first packet that arrives when 10ms have elapsed.

- -

Definition at line 285 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define PCAP_SAMP_NOSAMP   0
-
-
- -

No sampling has to be done on the current capture.

-

In this case, no sampling algorithms are applied to the current capture.

- -

Definition at line 265 of file remote-ext.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remote__source__ID.html b/ledset/WpdPack_4_1_2/docs/html/group__remote__source__ID.html deleted file mode 100644 index f42a634..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remote__source__ID.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - -WinPcap: Identifiers related to the new source syntax - - - - - - -
-

Identifiers related to the new source syntax
- -[Exported Structures and Definitions] -

- - - - - - - -

Defines

#define PCAP_SRC_FILE   2
 Internal representation of the type of source in use (file, remote/local interface).
#define PCAP_SRC_IFLOCAL   3
 Internal representation of the type of source in use (file, remote/local interface).
#define PCAP_SRC_IFREMOTE   4
 Internal representation of the type of source in use (file, remote/local interface).
-

Define Documentation

- -
-
- - - - -
#define PCAP_SRC_FILE   2
-
-
- -

Internal representation of the type of source in use (file, remote/local interface).

-

This indicates a file, i.e. the user want to open a capture from a local file.

- -

Definition at line 93 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define PCAP_SRC_IFLOCAL   3
-
-
- -

Internal representation of the type of source in use (file, remote/local interface).

-

This indicates a local interface, i.e. the user want to open a capture from a local interface. This does not involve the RPCAP protocol.

- -

Definition at line 101 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define PCAP_SRC_IFREMOTE   4
-
-
- -

Internal representation of the type of source in use (file, remote/local interface).

-

This indicates a remote interface, i.e. the user want to open a capture from an interface on a remote host. This does involve the RPCAP protocol.

- -

Definition at line 109 of file remote-ext.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remote__source__string.html b/ledset/WpdPack_4_1_2/docs/html/group__remote__source__string.html deleted file mode 100644 index eeee55d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remote__source__string.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - -WinPcap: Strings related to the new source syntax - - - - - - -
-

Strings related to the new source syntax
- -[Exported Structures and Definitions] -

- - - - - -

Defines

#define PCAP_SRC_FILE_STRING   "file://"
 String that will be used to determine the type of source in use (file, remote/local interface).
#define PCAP_SRC_IF_STRING   "rpcap://"
 String that will be used to determine the type of source in use (file, remote/local interface).
-

Detailed Description

-

The formats allowed by the pcap_open() are the following:

-
    -
  • file://path_and_filename [opens a local file]
  • -
  • rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol]
  • -
  • rpcap://host/devicename [opens the selected device available on a remote host]
  • -
  • rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP]
  • -
  • adaptername [to open a local adapter; kept for compability, but it is strongly discouraged]
  • -
  • (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged]
  • -
-

The formats allowed by the pcap_findalldevs_ex() are the following:

-
    -
  • file://folder/ [lists all the files in the given folder]
  • -
  • rpcap:// [lists all local adapters]
  • -
  • rpcap://host:port/ [lists the devices available on a remote host]
  • -
-

Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since IPv6 is fully supported, these are the allowed formats:

-
    -
  • host (literal): e.g. host.foo.bar
  • -
  • host (numeric IPv4): e.g. 10.11.12.13
  • -
  • host (numeric IPv4, IPv6 style): e.g. [10.11.12.13]
  • -
  • host (numeric IPv6): e.g. [1:2:3::4]
  • -
  • port: can be either numeric (e.g. '80') or literal (e.g. 'http')
  • -
-

Here you find some allowed examples:

-
    -
  • rpcap://host.foo.bar/devicename [everything literal, no port number]
  • -
  • rpcap://host.foo.bar:1234/devicename [everything literal, with port number]
  • -
  • rpcap://10.11.12.13/devicename [IPv4 numeric, no port number]
  • -
  • rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number]
  • -
  • rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number]
  • -
  • rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number]
  • -
  • rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number]
  • -
  • rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number]
  • -
-

Define Documentation

- -
-
- - - - -
#define PCAP_SRC_FILE_STRING   "file://"
-
-
- -

String that will be used to determine the type of source in use (file, remote/local interface).

-

This string will be prepended to the interface name in order to create a string that contains all the information required to open the source.

-

This string indicates that the user wants to open a capture from a local file.

- -

Definition at line 164 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define PCAP_SRC_IF_STRING   "rpcap://"
-
-
- -

String that will be used to determine the type of source in use (file, remote/local interface).

-

This string will be prepended to the interface name in order to create a string that contains all the information required to open the source.

-

This string indicates that the user wants to open a capture from a network interface. This string does not necessarily involve the use of the RPCAP protocol. If the interface required resides on the local host, the RPCAP protocol is not involved and the local functions are used.

- -

Definition at line 177 of file remote-ext.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remote__struct.html b/ledset/WpdPack_4_1_2/docs/html/group__remote__struct.html deleted file mode 100644 index c2434f9..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remote__struct.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - -WinPcap: Exported Structures and Definitions - - - - - - -
-

Exported Structures and Definitions
- -[Remote Capture] -

- - - - - - - - - - - - - - - - -

Data Structures

struct  pcap_rmtauth
 This structure keeps the information needed to autheticate the user on a remote machine. More...
struct  pcap_samp
 This structure defines the information related to sampling. More...

Modules

 Strings related to the new source syntax
 Identifiers related to the new source syntax
 Flags defined in the pcap_open() function
 Sampling methods defined in the pcap_setsampling() function
 Authentication methods supported by the RPCAP protocol

Defines

#define PCAP_BUF_SIZE   1024
 Defines the maximum buffer size in which address, port, interface names are kept.
#define RPCAP_HOSTLIST_SIZE   1024
 Maximum lenght of an host name (needed for the RPCAP active mode).
-

Define Documentation

- -
-
- - - - -
#define PCAP_BUF_SIZE   1024
-
-
- -

Defines the maximum buffer size in which address, port, interface names are kept.

-

In case the adapter name or such is larger than this value, it is truncated. This is not used by the user; however it must be aware that an hostname / interface name longer than this value will be truncated.

- -

Definition at line 79 of file remote-ext.h.

- -
-
- -
-
- - - - -
#define RPCAP_HOSTLIST_SIZE   1024
-
-
- -

Maximum lenght of an host name (needed for the RPCAP active mode).

- -

Definition at line 399 of file remote-ext.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__remotefunc.html b/ledset/WpdPack_4_1_2/docs/html/group__remotefunc.html deleted file mode 100644 index ef0aa26..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__remotefunc.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - -WinPcap: Exported Functions - - - - - - -
-

Exported Functions
- -[Remote Capture] -

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap.html deleted file mode 100644 index 012fdd7..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -WinPcap: WinPcap user's manual - - - - - - -
-

WinPcap user's manual

- - - - - -

Modules

 Definitions
 Exported functions
 Filtering expression syntax
 Using WinPcap in your programs
-

Detailed Description

- - - - - - - - - - -

This section contains the user manual of wpcap.dll, the -dynamic library that contains the public WinPcap API. -wpcap.dll exports a set of -system-independent functions for packet capture and network analysis. These -functions can be used to:

-
    -
  • obtain the list of the available network adapters -
  • retrieve various information about an adapter, like the description and the list of addresses
  • -
  • sniff the packets using one of the network interface cards of the PC
  • -
  • send packets to the network -
  • efficiently save packets to disk and load them with an interface similar to the one of - live capture
  • -
  • create packet filters using a high level language and apply them to the captured - packets
  • -
-

wpcap.dll is compatible with libpcap, the well known packet capture library -for Unix. This compatibility means that one can develop portable network tools -that will run on the Win32 OS family and on all of the major Unix flavors.

-

Several portions of the manual present in this section derive directly from the man pages of tcpdump and libpcap, maintained by the tcpdump.org developers. Therefore, if you -are looking for updated docs, you can consult the web site www.tcpdump.org.

-

Note

-

Some functions are marked deprecated -or discouraged. The meanings of these labels are:

-
    -
  • discouraged: the use of another function with similar purpose is - suggested, however this one is still valid.
  • -
  • deprecated: the function is present only for portability and - backward compatibility. It should be avoided, and it is strongly suggested - to use another equivalent function instead.
    -
  • -
-

- - - -

- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__def.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__def.html deleted file mode 100644 index bcacddd..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__def.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - -WinPcap: Definitions - - - - - - -
-

Definitions
- -[WinPcap user's manual] -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  pcap_file_header
 Header of a libpcap dump file. More...
struct  pcap_pkthdr
 Header of a packet in the dump file. More...
struct  pcap_stat
 Structure that keeps statistical values on an interface. More...
struct  pcap_if
 Item in a list of interfaces, used by pcap_findalldevs(). More...
struct  pcap_addr
 Representation of an interface address, used by pcap_findalldevs(). More...

Defines

#define PCAP_VERSION_MAJOR   2
 Major libpcap dump file version.
#define PCAP_VERSION_MINOR   4
 Minor libpcap dump file version.
#define PCAP_ERRBUF_SIZE   256
 Size to use when allocating the buffer that contains the libpcap errors.
#define PCAP_IF_LOOPBACK   0x00000001
 interface is loopback
#define MODE_CAPT   0
 Capture mode, to be used when calling pcap_setmode().
#define MODE_STAT   1
 Statistical mode, to be used when calling pcap_setmode().

Typedefs

typedef int bpf_int32
 32-bit integer
typedef u_int bpf_u_int32
 32-bit unsigned integer
typedef struct pcap pcap_t
 Descriptor of an open capture instance. This structure is opaque to the user, that handles its content through the functions provided by wpcap.dll.
typedef struct pcap_dumper pcap_dumper_t
 libpcap savefile descriptor.
typedef struct pcap_if pcap_if_t
 Item in a list of interfaces, see pcap_if.
typedef struct pcap_addr pcap_addr_t
 Representation of an interface address, see pcap_addr.
-

Detailed Description

-

Definitions for wpcap.dll

-

Define Documentation

- -
-
- - - - -
#define MODE_CAPT   0
-
-
- -

Capture mode, to be used when calling pcap_setmode().

- -

Definition at line 172 of file incs/pcap.h.

- -
-
- -
-
- - - - -
#define MODE_STAT   1
-
-
- -

Statistical mode, to be used when calling pcap_setmode().

- -

Definition at line 173 of file incs/pcap.h.

- -
-
- -
-
- - - - -
#define PCAP_ERRBUF_SIZE   256
-
-
- -

Size to use when allocating the buffer that contains the libpcap errors.

- -

Definition at line 59 of file incs/pcap.h.

- -
-
- -
-
- - - - -
#define PCAP_IF_LOOPBACK   0x00000001
-
-
- -

interface is loopback

- -

Definition at line 156 of file incs/pcap.h.

- -
-
- -
-
- - - - -
#define PCAP_VERSION_MAJOR   2
-
-
- -

Major libpcap dump file version.

- -

Definition at line 56 of file incs/pcap.h.

- -
-
- -
-
- - - - -
#define PCAP_VERSION_MINOR   4
-
-
- -

Minor libpcap dump file version.

- -

Definition at line 57 of file incs/pcap.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef int bpf_int32
-
-
- -

32-bit integer

-

Compatibility for systems that have a bpf.h that predates the bpf typedefs for 64-bit support.

- -

Definition at line 66 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef u_int bpf_u_int32
-
-
- -

32-bit unsigned integer

- -

Definition at line 67 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef struct pcap_addr pcap_addr_t
-
-
- -

Representation of an interface address, see pcap_addr.

- -

Definition at line 73 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef struct pcap_dumper pcap_dumper_t
-
-
- -

libpcap savefile descriptor.

- -

Definition at line 71 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef struct pcap_if pcap_if_t
-
-
- -

Item in a list of interfaces, see pcap_if.

- -

Definition at line 72 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef struct pcap pcap_t
-
-
- -

Descriptor of an open capture instance. This structure is opaque to the user, that handles its content through the functions provided by wpcap.dll.

- -

Definition at line 70 of file incs/pcap.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut.html deleted file mode 100644 index 0d214d8..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - -WinPcap: WinPcap tutorial: a step by step guide to using WinPcap - - - - - - -
-

WinPcap tutorial: a step by step guide to using WinPcap

-
-

This section shows how to use the features of the WinPcap API. It is organized as a tutorial, subdivided into a set of lessons that will introduce the reader, in a step-by-step fashion, to program development using WinPcap, from the basic functions (obtaining the adapter list, starting a capture, etc.) to the most advanced ones (handling send queues and gathering statistics about network traffic).

-

Several code snippets, as well as simple but complete programs are provided as a reference: all of the source code contains links to the rest of the manual, making it is possible to click on functions and data structures to jump to the corresponding documentation.

-

The samples are written in plain C, so a basic knowledge of C programming is required. Also, since this is a tutorial about a library dealing with "raw" networking packets, good knowledge of networks and network protocols is assumed.

-

Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut1.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut1.html deleted file mode 100644 index 3c14d33..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut1.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - -WinPcap: Obtaining the device list - - - - - - -
-

Obtaining the device list

-
-

Typically, the first thing that a WinPcap-based application does is get a list of attached network adapters. Both libpcap and WinPcap provide the pcap_findalldevs_ex() function for this purpose: this function returns a linked list of pcap_if structures, each of which contains comprehensive information about an attached adapter. In particular, the fields name and description contain the name and a human readable description, respectively, of the corresponding device.

-

The following code retrieves the adapter list and shows it on the screen, printing an error if no adapters are found.

-
#include "pcap.h"
-
-main()
-{
-    pcap_if_t *alldevs;
-    pcap_if_t *d;
-    int i=0;
-    char errbuf[PCAP_ERRBUF_SIZE];
-    
-    /* Retrieve the device list from the local machine */
-    if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL /* auth is not needed */, &alldevs, errbuf) == -1)
-    {
-        fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);
-        exit(1);
-    }
-    
-    /* Print the list */
-    for(d= alldevs; d != NULL; d= d->next)
-    {
-        printf("%d. %s", ++i, d->name);
-        if (d->description)
-            printf(" (%s)\n", d->description);
-        else
-            printf(" (No description available)\n");
-    }
-    
-    if (i == 0)
-    {
-        printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-        return;
-    }
-
-    /* We don't need any more the device list. Free it */
-    pcap_freealldevs(alldevs);
-}
-

Some comments about this code.

-

First of all, pcap_findalldevs_ex(), like other libpcap functions, has an errbuf parameter. This parameter points to a string filled by libpcap with a description of the error if something goes wrong.

-

Second, remember that not all the OSes supported by libpcap provide a description of the network interfaces, therefore if we want to write a portable application, we must consider the case in which description is null: we print the string "No description available" in that situation.

-

Note finally that we free the list with pcap_freealldevs() once when we have finished with it.

-

Let's try to compile and run the code of this first sample. In order to compile it under Unix or Cygwin, simply type:

-
-  gcc -o testprog testprog.c -lpcap
-

On Windows, you will need to create a project, following the instructions in the Using WinPcap in your programs section of this manual. However, we suggest that you use the WinPcap developer's pack (available at the WinPcap website, http://www.winpcap.org ), since it provides many examples already configured as projects including all the code presented in this tutorial and the includes and libraries needed to compile and run the examples.

-

Assuming we have compiled the program, let's try to run it. On a particular WinXP workstation, the result we optained is

-
-   1. \Device\NPF_{4E273621-5161-46C8-895A-48D0E52A0B83} (Realtek RTL8029(AS) Ethernet Adapter)
-   2. \Device\NPF_{5D24AE04-C486-4A96-83FB-8B5EC6C7F430} (3Com EtherLink PCI) 
-

As you can see, the name of the network adapters (that will be passed to libpcap when opening the devices) under Windows are quite unreadable, so the parenthetical descriptions can be very helpful.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut2.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut2.html deleted file mode 100644 index 910e2df..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut2.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - -WinPcap: Obtaining advanced information about installed devices - - - - - - -
-

Obtaining advanced information about installed devices

-
-

Lesson 1 (Obtaining the device list) demonstrated how to get basic information (i.e. device name and description) about available adapters. Actually, WinPcap provides also other advanced information. In particular, every pcap_if structure returned by pcap_findalldevs_ex() contains also a list of pcap_addr structures, with:

-
    -
  • a list of addresses for that interface.
  • -
  • a list of netmasks (each of which corresponds to an entry in the addresses list).
  • -
  • a list of broadcast addresses (each of which corresponds to an entry in the addresses list).
  • -
  • a list of destination addresses (each of which corresponds to an entry in the addresses list).
  • -
-

Additionally, pcap_findalldevs_ex() can also return remote adapters and a list of pcap files that are located in a given local folder.

-

The following sample provides an ifprint() function that prints the complete contents of a pcap_if structure. It is invoked by the program for every entry returned by pcap_findalldevs_ex().

-
/*
- * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
- * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
- * nor the names of its contributors may be used to endorse or promote 
- * products derived from this software without specific prior written 
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include <stdio.h>
-
-#include "pcap.h"
-
-#ifndef WIN32
-    #include <sys/socket.h>
-    #include <netinet/in.h>
-#else
-    #include <winsock.h>
-#endif
-
-
-// Function prototypes
-void ifprint(pcap_if_t *d);
-char *iptos(u_long in);
-char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen);
-
-
-int main()
-{
-  pcap_if_t *alldevs;
-  pcap_if_t *d;
-  char errbuf[PCAP_ERRBUF_SIZE+1];
-  char source[PCAP_ERRBUF_SIZE+1];
-
-  printf("Enter the device you want to list:\n"
-            "rpcap://              ==> lists interfaces in the local machine\n"
-            "rpcap://hostname:port ==> lists interfaces in a remote machine\n"
-            "                          (rpcapd daemon must be up and running\n"
-            "                           and it must accept 'null' authentication)\n"
-            "file://foldername     ==> lists all pcap files in the give folder\n\n"
-            "Enter your choice: ");
-
-  fgets(source, PCAP_ERRBUF_SIZE, stdin);
-  source[PCAP_ERRBUF_SIZE] = '\0';
-
-  /* Retrieve the interfaces list */
-  if (pcap_findalldevs_ex(source, NULL, &alldevs, errbuf) == -1)
-  {
-    fprintf(stderr,"Error in pcap_findalldevs: %s\n",errbuf);
-    exit(1);
-  }
-
-  /* Scan the list printing every entry */
-  for(d=alldevs;d;d=d->next)
-  {
-    ifprint(d);
-  }
-
-  pcap_freealldevs(alldevs);
-
-  return 1;
-}
-
-
-
-/* Print all the available information on the given interface */
-void ifprint(pcap_if_t *d)
-{
-  pcap_addr_t *a;
-  char ip6str[128];
-
-  /* Name */
-  printf("%s\n",d->name);
-
-  /* Description */
-  if (d->description)
-    printf("\tDescription: %s\n",d->description);
-
-  /* Loopback Address*/
-  printf("\tLoopback: %s\n",(d->flags & PCAP_IF_LOOPBACK)?"yes":"no");
-
-  /* IP addresses */
-  for(a=d->addresses;a;a=a->next) {
-    printf("\tAddress Family: #%d\n",a->addr->sa_family);
-  
-    switch(a->addr->sa_family)
-    {
-      case AF_INET:
-        printf("\tAddress Family Name: AF_INET\n");
-        if (a->addr)
-          printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr));
-        if (a->netmask)
-          printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr));
-        if (a->broadaddr)
-          printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr));
-        if (a->dstaddr)
-          printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr));
-        break;
-
-      case AF_INET6:
-        printf("\tAddress Family Name: AF_INET6\n");
-        if (a->addr)
-          printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str)));
-       break;
-
-      default:
-        printf("\tAddress Family Name: Unknown\n");
-        break;
-    }
-  }
-  printf("\n");
-}
-
-
-
-/* From tcptraceroute, convert a numeric IP address to a string */
-#define IPTOSBUFFERS    12
-char *iptos(u_long in)
-{
-    static char output[IPTOSBUFFERS][3*4+3+1];
-    static short which;
-    u_char *p;
-
-    p = (u_char *)&in;
-    which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1);
-    _snprintf_s(output[which], sizeof(output[which]), sizeof(output[which]),"%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
-    return output[which];
-}
-
-char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen)
-{
-    socklen_t sockaddrlen;
-
-    #ifdef WIN32
-    sockaddrlen = sizeof(struct sockaddr_in6);
-    #else
-    sockaddrlen = sizeof(struct sockaddr_storage);
-    #endif
-
-
-    if(getnameinfo(sockaddr, 
-        sockaddrlen, 
-        address, 
-        addrlen, 
-        NULL, 
-        0, 
-        NI_NUMERICHOST) != 0) address = NULL;
-
-    return address;
-}
-
-
-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut3.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut3.html deleted file mode 100644 index fd99206..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut3.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - -WinPcap: Opening an adapter and capturing the packets - - - - - - -
-

Opening an adapter and capturing the packets

-
-

Now that we've seen how to obtain an adapter to play with, let's start the real job, opening an adapter and capturing some traffic. In this lesson we'll write a program that prints some information about each packet flowing through the adapter.

-

The function that opens a capture device is pcap_open(). The parameters, snaplen, flags and to_ms deserve some explanation.

-

snaplen specifies the portion of the packet to capture. On some OSes (like xBSD and Win32), the packet driver can be configured to capture only the initial part of any packet: this decreases the amount of data to copy to the application and therefore improves the efficiency of the capture. In this case we use the value 65536 which is higher than the greatest MTU that we could encounter. In this manner we ensure that the application will always receive the whole packet.

-

flags: the most important flag is the one that indicates if the adapter will be put in promiscuous mode. In normal operation, an adapter only captures packets from the network that are destined to it; the packets exchanged by other hosts are therefore ignored. Instead, when the adapter is in promiscuous mode it captures all packets whether they are destined to it or not. This means that on shared media (like non-switched Ethernet), WinPcap will be able to capture the packets of other hosts. Promiscuous mode is the default for most capture applications, so we enable it in the following example.

-

to_ms specifies the read timeout, in milliseconds. A read on the adapter (for example, with pcap_dispatch() or pcap_next_ex()) will always return after to_ms milliseconds, even if no packets are available from the network. to_ms also defines the interval between statistical reports if the adapter is in statistical mode (see the lesson "\ref wpcap_tut9" for information about statistical mode). Setting to_ms to 0 means no timeout, a read on the adapter never returns if no packets arrive. A -1 timeout on the other side causes a read on the adapter to always return immediately.

-
#include "pcap.h"
-
-/* prototype of the packet handler */
-void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
-
-int main()
-{
-pcap_if_t *alldevs;
-pcap_if_t *d;
-int inum;
-int i=0;
-pcap_t *adhandle;
-char errbuf[PCAP_ERRBUF_SIZE];
-    
-    /* Retrieve the device list on the local machine */
-    if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-    {
-        fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-        exit(1);
-    }
-    
-    /* Print the list */
-    for(d=alldevs; d; d=d->next)
-    {
-        printf("%d. %s", ++i, d->name);
-        if (d->description)
-            printf(" (%s)\n", d->description);
-        else
-            printf(" (No description available)\n");
-    }
-    
-    if(i==0)
-    {
-        printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-        return -1;
-    }
-    
-    printf("Enter the interface number (1-%d):",i);
-    scanf_s("%d", &inum);
-    
-    if(inum < 1 || inum > i)
-    {
-        printf("\nInterface number out of range.\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-    
-    /* Jump to the selected adapter */
-    for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-    
-    /* Open the device */
-    if ( (adhandle= pcap_open(d->name,          // name of the device
-                              65536,            // portion of the packet to capture
-                                                // 65536 guarantees that the whole packet will be captured on all the link layers
-                              PCAP_OPENFLAG_PROMISCUOUS,    // promiscuous mode
-                              1000,             // read timeout
-                              NULL,             // authentication on the remote machine
-                              errbuf            // error buffer
-                              ) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name);
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-    
-    printf("\nlistening on %s...\n", d->description);
-    
-    /* At this point, we don't need any more the device list. Free it */
-    pcap_freealldevs(alldevs);
-    
-    /* start the capture */
-    pcap_loop(adhandle, 0, packet_handler, NULL);
-    
-    return 0;
-}
-
-
-/* Callback function invoked by libpcap for every incoming packet */
-void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
-{
-    struct tm ltime;
-    char timestr[16];
-    time_t local_tv_sec;
-
-    /*
-     * unused variables
-     */
-    (VOID)(param);
-    (VOID)(pkt_data);
-
-    /* convert the timestamp to readable format */
-    local_tv_sec = header->ts.tv_sec;
-    localtime_s(&ltime, &local_tv_sec);
-    strftime( timestr, sizeof timestr, "%H:%M:%S", &ltime);
-    
-    printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len);
-    
-}
-

Once the adapter is opened, the capture can be started with pcap_dispatch() or pcap_loop(). These two functions are very similar, the difference is that pcap_ dispatch() returns (although not guaranteed) when the timeout expires while pcap_loop() doesn't return until cnt packets have been captured, so it can block for an arbitrary period on an under-utilized network. pcap_loop() is enough for the purpose of this sample, while pcap_dispatch() is normally used in a more complex program.

-

Both of these functions have a callback parameter, packet_handler, pointing to a function that will receive the packets. This function is invoked by libpcap for every new packet coming from the network and receives a generic status (corresponding to the user parameter of pcap_loop() and pcap_dispatch()), a header with some information on the packet like the timestamp and the length and the actual data of the packet including all the protocol headers. Note that the frame CRC is normally not present, because it is removed by the network adapter after frame validation. Note also that most adapters discard packets with wrong CRCs, therefore WinPcap is normally not able to capture them.

-

The above example extracts the timestamp and the length of every packet from the pcap_pkthdr header and prints them on the screen.

-

Please note that there may be a drawback using pcap_loop() mainly related to the fact that the handler is called by the packet capture driver; therefore the user application does not have direct control over it. Another approach (and to have more readable programs) is to use the pcap_next_ex() function, which is presented in the next example (Capturing the packets without the callback).

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut4.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut4.html deleted file mode 100644 index ef5ef03..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut4.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - -WinPcap: Capturing the packets without the callback - - - - - - -
-

Capturing the packets without the callback

-
-

The example program in this lesson behaves exactly like the previous program (Opening an adapter and capturing the packets), but it uses pcap_next_ex() instead of pcap_loop().

-

The callback-based capture mechanism of pcap_loop() is elegant and it could be a good choice in some situations. However, handling a callback is sometimes not practical -- it often makes the program more complex especially in situations with multithreaded applications or C++ classes.

-

In these cases, pcap_next_ex() retrievs a packet with a direct call -- using pcap_next_ex() packets are received only when the programmer wants them.

-

The parameters of this function are the same as a capture callback -- it takes an adapter descriptor and a couple of pointers that will be initialized and returned to the user (one to a pcap_pkthdr structure and another to a buffer with the packet data).

-

In the following program, we recycle the callback code of the previous lesson's example and move it inside main() right after the call to pcap_next_ex().

-
#include "pcap.h"
-
-
-int main()
-{
-pcap_if_t *alldevs;
-pcap_if_t *d;
-int inum;
-int i=0;
-pcap_t *adhandle;
-int res;
-char errbuf[PCAP_ERRBUF_SIZE];
-struct tm ltime;
-char timestr[16];
-struct pcap_pkthdr *header;
-const u_char *pkt_data;
-time_t local_tv_sec;
-    
-    
-    /* Retrieve the device list on the local machine */
-    if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-    {
-        fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-        exit(1);
-    }
-    
-    /* Print the list */
-    for(d=alldevs; d; d=d->next)
-    {
-        printf("%d. %s", ++i, d->name);
-        if (d->description)
-            printf(" (%s)\n", d->description);
-        else
-            printf(" (No description available)\n");
-    }
-    
-    if(i==0)
-    {
-        printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-        return -1;
-    }
-    
-    printf("Enter the interface number (1-%d):",i);
-    scanf_s("%d", &inum);
-    
-    if(inum < 1 || inum > i)
-    {
-        printf("\nInterface number out of range.\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-    
-    /* Jump to the selected adapter */
-    for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-    
-    /* Open the device */
-    if ( (adhandle= pcap_open(d->name,          // name of the device
-                              65536,            // portion of the packet to capture. 
-                                                // 65536 guarantees that the whole packet will be captured on all the link layers
-                              PCAP_OPENFLAG_PROMISCUOUS,    // promiscuous mode
-                              1000,             // read timeout
-                              NULL,             // authentication on the remote machine
-                              errbuf            // error buffer
-                              ) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name);
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-    
-    printf("\nlistening on %s...\n", d->description);
-    
-    /* At this point, we don't need any more the device list. Free it */
-    pcap_freealldevs(alldevs);
-    
-    /* Retrieve the packets */
-    while((res = pcap_next_ex( adhandle, &header, &pkt_data)) >= 0){
-        
-        if(res == 0)
-            /* Timeout elapsed */
-            continue;
-        
-        /* convert the timestamp to readable format */
-        local_tv_sec = header->ts.tv_sec;
-        localtime_s(&ltime, &local_tv_sec);
-        strftime( timestr, sizeof timestr, "%H:%M:%S", &ltime);
-        
-        printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len);
-    }
-    
-    if(res == -1){
-        printf("Error reading the packets: %s\n", pcap_geterr(adhandle));
-        return -1;
-    }
-    
-    return 0;
-}
-

Why do we use pcap_next_ex() instead of the old pcap_next()? Because pcap_next() has some drawbacks. First of all, it is inefficient because it hides the callback method but still relies on pcap_dispatch(). Second, it is not able to detect EOF, so it's not very useful when gathering packets from a file.

-

Notice also that pcap_next_ex() returns different values for success, timeout elapsed, error and EOF conditions.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut5.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut5.html deleted file mode 100644 index 1c535e4..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut5.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - -WinPcap: Filtering the traffic - - - - - - -
-

Filtering the traffic

-
-

One of the most powerful features offered by WinPcap (and by libpcap as well) is the filtering engine. It provides a very efficient way to receive subsets of the network traffic, and is (usually) integrated with the capture mechanism provided by WinPcap. The functions used to filter packets are pcap_compile() and pcap_setfilter().

-

pcap_compile() takes a string containing a high-level Boolean (filter) expression and produces a low-level byte code that can be interpreted by the fileter engine in the packet driver. The syntax of the boolean expression can be found in the Filtering expression syntax section of this documentation.

-

pcap_setfilter() associates a filter with a capture session in the kernel driver. Once pcap_setfilter() is called, the associated filter will be applied to all the packets coming from the network, and all the conformant packets (i.e., packets for which the Boolean expression evaluates to true) will be actually copied to the application.

-

The following code shows how to compile and set a filter. Note that we must retrieve the netmask from the pcap_if structure that describes the adapter, because some filters created by pcap_compile() require it.

-

The filter passed to pcap_compile() in this code snippet is "ip and tcp", which means to "keep only the packets that are both IPv4 and TCP and deliver them to the application".

-
    if (d->addresses != NULL)
-        /* Retrieve the mask of the first address of the interface */
-        netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr;
-    else
-        /* If the interface is without an address we suppose to be in a C class network */
-        netmask=0xffffff; 
-
-
-compile the filter
-    if (pcap_compile(adhandle, &fcode, "ip and tcp", 1, netmask) < 0)
-    {
-        fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-    
-set the filter
-    if (pcap_setfilter(adhandle, &fcode) < 0)
-    {
-        fprintf(stderr,"\nError setting the filter.\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-

If you want to see some code that uses the filtering functions shown in this lesson, look at the example presented in the next Lesson, Interpreting the packets.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut6.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut6.html deleted file mode 100644 index 91a7f93..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut6.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - -WinPcap: Interpreting the packets - - - - - - -
-

Interpreting the packets

-
-

Now that we are able to capture and filter network traffic, we want to put our knowledge to work with a simple "real world" application.

-

In this lesson we will take code from the previous lessons and use these pieces to build a more useful program. the main purpose of the current program is to show how the protocol headers of a captured packet can be parsed and interpreted. The resulting application, called UDPdump, prints a summary of the UDP traffic on our network.

-

We have chosen to parse and display the UDP protocol because it is more accessible than other protocols such as TCP and consequently is an excellent initial example. Let's look at the code:

-
/*
- * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
- * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
- * nor the names of its contributors may be used to endorse or promote 
- * products derived from this software without specific prior written 
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include "pcap.h"
-
-/* 4 bytes IP address */
-typedef struct ip_address{
-    u_char byte1;
-    u_char byte2;
-    u_char byte3;
-    u_char byte4;
-}ip_address;
-
-/* IPv4 header */
-typedef struct ip_header{
-    u_char  ver_ihl;        // Version (4 bits) + Internet header length (4 bits)
-    u_char  tos;            // Type of service 
-    u_short tlen;           // Total length 
-    u_short identification; // Identification
-    u_short flags_fo;       // Flags (3 bits) + Fragment offset (13 bits)
-    u_char  ttl;            // Time to live
-    u_char  proto;          // Protocol
-    u_short crc;            // Header checksum
-    ip_address  saddr;      // Source address
-    ip_address  daddr;      // Destination address
-    u_int   op_pad;         // Option + Padding
-}ip_header;
-
-/* UDP header*/
-typedef struct udp_header{
-    u_short sport;          // Source port
-    u_short dport;          // Destination port
-    u_short len;            // Datagram length
-    u_short crc;            // Checksum
-}udp_header;
-
-/* prototype of the packet handler */
-void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
-
-
-int main()
-{
-pcap_if_t *alldevs;
-pcap_if_t *d;
-int inum;
-int i=0;
-pcap_t *adhandle;
-char errbuf[PCAP_ERRBUF_SIZE];
-u_int netmask;
-char packet_filter[] = "ip and udp";
-struct bpf_program fcode;
-
-    /* Retrieve the device list */
-    if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-    {
-        fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-        exit(1);
-    }
-    
-    /* Print the list */
-    for(d=alldevs; d; d=d->next)
-    {
-        printf("%d. %s", ++i, d->name);
-        if (d->description)
-            printf(" (%s)\n", d->description);
-        else
-            printf(" (No description available)\n");
-    }
-
-    if(i==0)
-    {
-        printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-        return -1;
-    }
-    
-    printf("Enter the interface number (1-%d):",i);
-    scanf_s("%d", &inum);
-    
-    if(inum < 1 || inum > i)
-    {
-        printf("\nInterface number out of range.\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-
-    /* Jump to the selected adapter */
-    for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-    
-    /* Open the adapter */
-    if ( (adhandle= pcap_open(d->name,  // name of the device
-                             65536,     // portion of the packet to capture. 
-                                        // 65536 grants that the whole packet will be captured on all the MACs.
-                             PCAP_OPENFLAG_PROMISCUOUS,         // promiscuous mode
-                             1000,      // read timeout
-                             NULL,      // remote authentication
-                             errbuf     // error buffer
-                             ) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-    
-    /* Check the link layer. We support only Ethernet for simplicity. */
-    if(pcap_datalink(adhandle) != DLT_EN10MB)
-    {
-        fprintf(stderr,"\nThis program works only on Ethernet networks.\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-    
-    if(d->addresses != NULL)
-        /* Retrieve the mask of the first address of the interface */
-        netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr;
-    else
-        /* If the interface is without addresses we suppose to be in a C class network */
-        netmask=0xffffff; 
-
-
-    //compile the filter
-    if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 )
-    {
-        fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-    
-    //set the filter
-    if (pcap_setfilter(adhandle, &fcode)<0)
-    {
-        fprintf(stderr,"\nError setting the filter.\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-    
-    printf("\nlistening on %s...\n", d->description);
-    
-    /* At this point, we don't need any more the device list. Free it */
-    pcap_freealldevs(alldevs);
-    
-    /* start the capture */
-    pcap_loop(adhandle, 0, packet_handler, NULL);
-    
-    return 0;
-}
-
-/* Callback function invoked by libpcap for every incoming packet */
-void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
-{
-    struct tm ltime;
-    char timestr[16];
-    ip_header *ih;
-    udp_header *uh;
-    u_int ip_len;
-    u_short sport,dport;
-    time_t local_tv_sec;
-
-    /*
-     * Unused variable
-     */
-    (VOID)(param);
-
-    /* convert the timestamp to readable format */
-    local_tv_sec = header->ts.tv_sec;
-    localtime_s(&ltime, &local_tv_sec);
-    strftime( timestr, sizeof timestr, "%H:%M:%S", &ltime);
-
-    /* print timestamp and length of the packet */
-    printf("%s.%.6d len:%d ", timestr, header->ts.tv_usec, header->len);
-
-    /* retireve the position of the ip header */
-    ih = (ip_header *) (pkt_data +
-        14); //length of ethernet header
-
-    /* retireve the position of the udp header */
-    ip_len = (ih->ver_ihl & 0xf) * 4;
-    uh = (udp_header *) ((u_char*)ih + ip_len);
-
-    /* convert from network byte order to host byte order */
-    sport = ntohs( uh->sport );
-    dport = ntohs( uh->dport );
-
-    /* print ip addresses and udp ports */
-    printf("%d.%d.%d.%d.%d -> %d.%d.%d.%d.%d\n",
-        ih->saddr.byte1,
-        ih->saddr.byte2,
-        ih->saddr.byte3,
-        ih->saddr.byte4,
-        sport,
-        ih->daddr.byte1,
-        ih->daddr.byte2,
-        ih->daddr.byte3,
-        ih->daddr.byte4,
-        dport);
-}
-

First of all, we set the filter to "ip and udp". In this way we are sure that packet_handler() will receive only UDP packets over IPv4: this simplifies the parsing and increases the efficiency of the program.

-

We have also created a couple of structs that describe the IP and UDP headers. These structs are used by packet_handler() to properly locate the various header fields.

-

packet_handler(), although limited to a single protocol dissector (UDP over IPv4), shows how complex "sniffers" like tcpdump/WinDump decode the network traffic. Since we aren't interested in the MAC header, we skip it. For simplicity and before starting the capture, we check the MAC layer with pcap_datalink() to make sure that we are dealing with an Ethernet network. This way we can be sure that the MAC header is exactly 14 bytes.

-

The IP header is located just after the MAC header. We will extract the IP source and destination addresses from the IP header.

-

Reaching the UDP header is a bit more complicated, because the IP header doesn't have a fixed length. Therefore, we use the IP header's length field to know its size. Once we know the location of the UDP header, we extract the source and destination ports.

-

The extracted values are printed on the screen, and the result is something like:

-

1. \Device\Packet_{A7FD048A-5D4B-478E-B3C1-34401AC3B72F} (Xircom t 10/100 Adapter)
- Enter the interface number (1-2):1
-

-

listening on Xircom CardBus Ethernet 10/100 Adapter...
- 16:13:15.312784 len:87 130.192.31.67.2682 -> 130.192.3.21.53
- 16:13:15.314796 len:137 130.192.3.21.53 -> 130.192.31.67.2682
- 16:13:15.322101 len:78 130.192.31.67.2683 -> 130.192.3.21.53
-

-

Each of the final 3 lines represents a different packet.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut7.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut7.html deleted file mode 100644 index 0e89203..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut7.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - -WinPcap: Handling offline dump files - - - - - - -
-

Handling offline dump files

-
-

In this lession we are going to learn how to handle packet capture to a file (dump to file). WinPcap offers a wide range of functions to save the network traffic to a file and to read the content of dumps -- this lesson will teach how to use all of these functions. We'll see also how to use the kernel dump feature of WinPcap to obtain high-performance dumps (NOTE: At the moment, due to some problems with the new kernel buffer, this feature has been disabled).

-

The format for dump files is the libpcap one. This format contains the data of the captured packets in binary form and is a standard used by many network tools including WinDump, Ethereal and Snort.

-

Saving packets to a dump file

-

First of all, let's see how to write packets in libpcap format.

-

The following example captures the packets from the selected interface and saves them on a file whose name is provided by the user.

-
#include "pcap.h"
-
-/* prototype of the packet handler */
-void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
-
-int main(int argc, char **argv)
-{
-pcap_if_t *alldevs;
-pcap_if_t *d;
-int inum;
-int i=0;
-pcap_t *adhandle;
-char errbuf[PCAP_ERRBUF_SIZE];
-pcap_dumper_t *dumpfile;
-
-
-    
-    /* Check command line */
-    if(argc != 2)
-    {
-        printf("usage: %s filename", argv[0]);
-        return -1;
-    }
-    
-    /* Retrieve the device list on the local machine */
-    if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-    {
-        fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-        exit(1);
-    }
-    
-    /* Print the list */
-    for(d=alldevs; d; d=d->next)
-    {
-        printf("%d. %s", ++i, d->name);
-        if (d->description)
-            printf(" (%s)\n", d->description);
-        else
-            printf(" (No description available)\n");
-    }
-
-    if(i==0)
-    {
-        printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-        return -1;
-    }
-    
-    printf("Enter the interface number (1-%d):",i);
-    scanf_s("%d", &inum);
-    
-    if(inum < 1 || inum > i)
-    {
-        printf("\nInterface number out of range.\n");
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-        
-    /* Jump to the selected adapter */
-    for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-    
-    
-    /* Open the device */
-    if ( (adhandle= pcap_open(d->name,          // name of the device
-                              65536,            // portion of the packet to capture
-                                                // 65536 guarantees that the whole packet will be captured on all the link layers
-                              PCAP_OPENFLAG_PROMISCUOUS,    // promiscuous mode
-                              1000,             // read timeout
-                              NULL,             // authentication on the remote machine
-                              errbuf            // error buffer
-                              ) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name);
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-        return -1;
-    }
-
-    /* Open the dump file */
-    dumpfile = pcap_dump_open(adhandle, argv[1]);
-
-    if(dumpfile==NULL)
-    {
-        fprintf(stderr,"\nError opening output file\n");
-        return -1;
-    }
-    
-    printf("\nlistening on %s... Press Ctrl+C to stop...\n", d->description);
-    
-    /* At this point, we no longer need the device list. Free it */
-    pcap_freealldevs(alldevs);
-    
-    /* start the capture */
-    pcap_loop(adhandle, 0, packet_handler, (unsigned char *)dumpfile);
-
-    return 0;
-}
-
-/* Callback function invoked by libpcap for every incoming packet */
-void packet_handler(u_char *dumpfile, const struct pcap_pkthdr *header, const u_char *pkt_data)
-{
-    /* save the packet on the dump file */
-    pcap_dump(dumpfile, header, pkt_data);
-}
-

As you can see, the structure of the program is very similar to the ones we have seen in the previous lessons. The differences are:

-
    -
  • a call to pcap_dump_open() is issued once the interface is opened. This call opens a dump file and associates it with the interface.
  • -
  • the packets are written to this file with a pcap_dump() from the packet_handler() callback. The parameters of pcap_dump() are in 1-1 correspondence with the parameters of pcap_handler().
  • -
-

Reading packets from a dump file

-

Now that we have a dump file available, we can try to read its content. The following code opens a WinPcap/libpcap dump file and displays every packet contained in the file. The file is opened with pcap_open_offline(), then the usual pcap_loop() is used to sequence through the packets. As you can see, reading packets from an offline capture is nearly identical to receiving them from a physical interface.

-

This example introduces another function: pcap_createsrcsrc(). This function is required to create a source string that begins with a marker used to tell WinPcap the type of the source, e.g. "rpcap://" if we are going to open an adapter, or "file://" if we are going to open a file. This step is not required when pcap_findalldevs_ex() is used (the returned values already contain these strings). However, it is required in this example because the name of the file is read from the user input.

-
#include <stdio.h>
-#include <pcap.h>
-
-#define LINE_LEN 16
-
-void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *);
-
-int main(int argc, char **argv)
-{
-pcap_t *fp;
-char errbuf[PCAP_ERRBUF_SIZE];
-char source[PCAP_BUF_SIZE];
-
-    if(argc != 2){
-
-        printf("usage: %s filename", argv[0]);
-        return -1;
-
-    }
-
-    /* Create the source string according to the new WinPcap syntax */
-    if ( pcap_createsrcstr( source,         // variable that will keep the source string
-                            PCAP_SRC_FILE,  // we want to open a file
-                            NULL,           // remote host
-                            NULL,           // port on the remote host
-                            argv[1],        // name of the file we want to open
-                            errbuf          // error buffer
-                            ) != 0)
-    {
-        fprintf(stderr,"\nError creating a source string\n");
-        return -1;
-    }
-    
-    /* Open the capture file */
-    if ( (fp= pcap_open(source,         // name of the device
-                        65536,          // portion of the packet to capture
-                                        // 65536 guarantees that the whole packet will be captured on all the link layers
-                         PCAP_OPENFLAG_PROMISCUOUS,     // promiscuous mode
-                         1000,              // read timeout
-                         NULL,              // authentication on the remote machine
-                         errbuf         // error buffer
-                         ) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open the file %s.\n", source);
-        return -1;
-    }
-
-    // read and dispatch packets until EOF is reached
-    pcap_loop(fp, 0, dispatcher_handler, NULL);
-
-    return 0;
-}
-
-
-
-void dispatcher_handler(u_char *temp1, 
-                        const struct pcap_pkthdr *header, const u_char *pkt_data)
-{
-    u_int i=0;
-
-    /*
-     * Unused variable
-     */
-    (VOID)temp1;
-
-    /* print pkt timestamp and pkt len */
-    printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len);          
-    
-    /* Print the packet */
-    for (i=1; (i < header->caplen + 1 ) ; i++)
-    {
-        printf("%.2x ", pkt_data[i-1]);
-        if ( (i % LINE_LEN) == 0) printf("\n");
-    }
-    
-    printf("\n\n");     
-    
-}
-

The following example has the same purpose of the last one, but pcap_next_ex() is used instead of the pcap_loop() callback method.

-
#include <stdio.h>
-#include <pcap.h>
-
-#define LINE_LEN 16
-
-int main(int argc, char **argv)
-{
-pcap_t *fp;
-char errbuf[PCAP_ERRBUF_SIZE];
-char source[PCAP_BUF_SIZE];
-struct pcap_pkthdr *header;
-const u_char *pkt_data;
-u_int i=0;
-int res;
-
-    if(argc != 2)
-    {
-        printf("usage: %s filename", argv[0]);
-        return -1;
-    }
-    
-    /* Create the source string according to the new WinPcap syntax */
-    if ( pcap_createsrcstr( source,         // variable that will keep the source string
-                            PCAP_SRC_FILE,  // we want to open a file
-                            NULL,           // remote host
-                            NULL,           // port on the remote host
-                            argv[1],        // name of the file we want to open
-                            errbuf          // error buffer
-                            ) != 0)
-    {
-        fprintf(stderr,"\nError creating a source string\n");
-        return -1;
-    }
-    
-    /* Open the capture file */
-    if ( (fp= pcap_open(source,         // name of the device
-                        65536,          // portion of the packet to capture
-                                        // 65536 guarantees that the whole packet will be captured on all the link layers
-                         PCAP_OPENFLAG_PROMISCUOUS,     // promiscuous mode
-                         1000,              // read timeout
-                         NULL,              // authentication on the remote machine
-                         errbuf         // error buffer
-                         ) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open the file %s.\n", source);
-        return -1;
-    }
-    
-    /* Retrieve the packets from the file */
-    while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0)
-    {
-        /* print pkt timestamp and pkt len */
-        printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len);          
-        
-        /* Print the packet */
-        for (i=1; (i < header->caplen + 1 ) ; i++)
-        {
-            printf("%.2x ", pkt_data[i-1]);
-            if ( (i % LINE_LEN) == 0) printf("\n");
-        }
-        
-        printf("\n\n");     
-    }
-    
-    
-    if (res == -1)
-    {
-        printf("Error reading the packets: %s\n", pcap_geterr(fp));
-    }
-    
-    return 0;
-}
-
-

Writing packets to a dump file with pcap_live_dump

-

NOTE: At the moment, due to some problems with the new kernel buffer, this feature has been disabled.

-

Recent versions of WinPcap provide a further way to save network traffic to disk, the pcap_live_dump() function. pcap_live_dump() takes three parameters: a file name, the maximum size (in bytes) that this file is allowed to reach and the maximum amount of packets that the file is allowed to contain. Zero means no limit for both these values. Notice that the program can set a filter (with pcap_setfilter(), see the tutorial Filtering the traffic) before calling pcap_live_dump() to define the subset of the traffic that will be saved.

-

pcap_live_dump() is non-blocking, therefore it starts the dump and returns immediately: The dump process goes on asynchronously until the maximum file size or the maximum amount of packets has been reached.

-

The application can wait or check the end of the dump with pcap_live_dump_ended(). Beware that if the sync parameter is nonzero, this function will block your application forever if the limits are both 0.

-
/*
- * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
- * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
- * nor the names of its contributors may be used to endorse or promote 
- * products derived from this software without specific prior written 
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <pcap.h>
-
-#error At the moment the kernel dump feature is not supported in the driver
-
-main(int argc, char **argv) {
-    
-    pcap_if_t *alldevs, *d;
-    pcap_t *fp;
-    u_int inum, i=0;
-    char errbuf[PCAP_ERRBUF_SIZE];
-
-    printf("kdump: saves the network traffic to file using WinPcap kernel-level dump faeature.\n");
-    printf("\t Usage: %s [adapter] | dump_file_name max_size max_packs\n", argv[0]);
-    printf("\t Where: max_size is the maximum size that the dump file will reach (0 means no limit)\n");
-    printf("\t Where: max_packs is the maximum number of packets that will be saved (0 means no limit)\n\n");
-
-
-    if(argc < 5){
-
-        /* The user didn't provide a packet source: Retrieve the device list */
-        if (pcap_findalldevs(&alldevs, errbuf) == -1)
-        {
-            fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-            exit(1);
-        }
-        
-        /* Print the list */
-        for(d=alldevs; d; d=d->next)
-        {
-            printf("%d. %s", ++i, d->name);
-            if (d->description)
-                printf(" (%s)\n", d->description);
-            else
-                printf(" (No description available)\n");
-        }
-        
-        if(i==0)
-        {
-            printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-            return -1;
-        }
-        
-        printf("Enter the interface number (1-%d):",i);
-        scanf("%d", &inum);
-        
-        if(inum < 1 || inum > i)
-        {
-            printf("\nInterface number out of range.\n");
-            /* Free the device list */
-            return -1;
-        }
-        
-        /* Jump to the selected adapter */
-        for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-        
-        /* Open the device */
-        if ( (fp = pcap_open_live(d->name, 100, 1, 20, errbuf) ) == NULL)
-        {
-            fprintf(stderr,"\nError opening adapter\n");
-            return -1;
-        }
-
-        /* Free the device list */
-        pcap_freealldevs(alldevs);
-
-        /* Start the dump */
-        if(pcap_live_dump(fp, argv[1], atoi(argv[2]), atoi(argv[3]))==-1){
-            printf("Unable to start the dump, %s\n", pcap_geterr(fp));
-            return -1;
-        }
-    }
-    else{
-        
-        /* Open the device */
-        if ( (fp= pcap_open_live(argv[1], 100, 1, 20, errbuf) ) == NULL)
-        {
-            fprintf(stderr,"\nError opening adapter\n");
-            return -1;
-        }
-
-        /* Start the dump */
-        if(pcap_live_dump(fp, argv[0], atoi(argv[1]), atoi(argv[2]))==-1){
-            printf("Unable to start the dump, %s\n", pcap_geterr(fp));
-            return -1;
-        }
-    }
-
-    /* Wait until the dump finishes, i.e. when  max_size or max_packs is reached*/
-    pcap_live_dump_ended(fp, TRUE);
-    
-    /* Close the adapter, so that the file is correctly flushed */
-    pcap_close(fp);
-
-    return 0;
-}
-

The difference between pcap_live_dump() and pcap_dump(), apart from the possibility to set limits, is performance. pcap_live_dump() exploits the ability of the WinPcap NPF driver (see NPF driver internals manual) to write dumps from kernel level, minimizing the number of context switches and memory copies.

-

Obviously, since this feature is currently not available on other operating systems, pcap_live_dump() is WinPcap specific and is present only under Win32.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut8.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut8.html deleted file mode 100644 index 7d0320b..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut8.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - -WinPcap: Sending Packets - - - - - - -
-

Sending Packets

-
-

Although the name WinPcap indicates clearly that the purpose of the library is packet capture, other useful features for raw networking are provided. Among them, the user can find a complete set of functions to send packets.

-

Note that the original libpcap library at the moment doesn't provide any way to send packets, therefore all the functions shown here are WinPcap extensions and will not work under Unix.

-

Sending a single packet with pcap_sendpacket()

-

The simplest way to send a packet is shown in the following code snippet. After opening an adapter, pcap_sendpacket() is called to send a hand-crafted packet. pcap_sendpacket() takes as arguments a buffer containing the data to send, the length of the buffer and the adapter that will send it. Notice that the buffer is sent to the net as is, without any manipulation. This means that the application has to create the correct protocol headers in order to send something meaningful.

-
#include <stdlib.h>
-#include <stdio.h>
-
-#include <pcap.h>
-
-
-void main(int argc, char **argv)
-{
-pcap_t *fp;
-char errbuf[PCAP_ERRBUF_SIZE];
-u_char packet[100];
-int i;
-
-    /* Check the validity of the command line */
-    if (argc != 2)
-    {
-        printf("usage: %s interface (e.g. 'rpcap://eth0')", argv[0]);
-        return;
-    }
-    
-    /* Open the output device */
-    if ( (fp= pcap_open(argv[1],            // name of the device
-                        100,                // portion of the packet to capture (only the first 100 bytes)
-                        PCAP_OPENFLAG_PROMISCUOUS,  // promiscuous mode
-                        1000,               // read timeout
-                        NULL,               // authentication on the remote machine
-                        errbuf              // error buffer
-                        ) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", argv[1]);
-        return;
-    }
-
-    /* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */
-    packet[0]=1;
-    packet[1]=1;
-    packet[2]=1;
-    packet[3]=1;
-    packet[4]=1;
-    packet[5]=1;
-    
-    /* set mac source to 2:2:2:2:2:2 */
-    packet[6]=2;
-    packet[7]=2;
-    packet[8]=2;
-    packet[9]=2;
-    packet[10]=2;
-    packet[11]=2;
-    
-    /* Fill the rest of the packet */
-    for(i=12;i<100;i++)
-    {
-        packet[i]=(u_char)i;
-    }
-
-    /* Send down the packet */
-    if (pcap_sendpacket(fp, packet, 100 /* size */) != 0)
-    {
-        fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp));
-        return;
-    }
-
-    return;
-}
-

Send queues

-

While pcap_sendpacket() offers a simple and immediate way to send a single packet, send queues provides an advanced, powerful and optimized mechanism to send a collection of packets. A send queue is a container for a variable number of packets that will be sent to the network. It has a size, that represents the maximum amount of bytes it can store.

-

A send queue is created calling the pcap_sendqueue_alloc() function, specifying the size of the new send queue.

-

Once the send queue is created, pcap_sendqueue_queue() can be used to add a packet to the send queue. This function takes a pcap_pkthdr with the timestamp and the length and a buffer with the data of the packet. These parameters are the same as those received by pcap_next_ex() and pcap_handler(), therefore queuing a packet that was just captured or read from a file is a matter of passing these parameters to pcap_sendqueue_queue().

-

To transmit a send queue, WinPcap provides the pcap_sendqueue_transmit() function. Note the third parameter: if nonzero, the send will be synchronized, i.e. the relative timestamps of the packets will be respected. This operation requires a remarkable amount of CPU, because the synchronization takes place in the kernel driver using "busy wait" loops. Although this operation is quite CPU intensive, it often results in very high precision packet transmissions (often around few microseconds or less).

-

Note that transmitting a send queue with pcap_sendqueue_transmit() is much more efficient than performing a series of pcap_sendpacket(), because the send queue is buffered at kernel level drastically decreasing the number of context switches.

-

When a queue is no longer needed, it can be deleted with pcap_sendqueue_destroy() that frees all the buffers associated with the send queue.

-

The next program shows how to use send queues. It opens a capture file with pcap_open_offline(), then it moves the packets from the file to a properly allocated send queue. At his point it transmits the queue, synchronizing it if requested by the user.

-

Note that the link-layer of the dumpfile is compared with the one of the interface that will send the packets using pcap_datalink(), and a warning is printed if they are different -- it is important that the capture-file link-layer be the same as the adapter's link layer for otherwise the tranmission is pointless.

-
/*
- * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
- * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
- * nor the names of its contributors may be used to endorse or promote 
- * products derived from this software without specific prior written 
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <pcap.h>
-
-void usage();
-
-void main(int argc, char **argv)
-{
-    pcap_t *indesc,*outdesc;
-    char errbuf[PCAP_ERRBUF_SIZE];
-    char source[PCAP_BUF_SIZE];
-    FILE *capfile;
-    int caplen, sync;
-    u_int res;
-    pcap_send_queue *squeue;
-    struct pcap_pkthdr *pktheader;
-    u_char *pktdata;
-    float cpu_time;
-    u_int npacks = 0;
-    errno_t fopen_error;
-
-    /* Check the validity of the command line */
-    if (argc <= 2 || argc >= 5)
-    {
-        usage();
-        return;
-    }
-        
-    /* Retrieve the length of the capture file */
-    fopen_error = fopen_s(&capfile, argv[1],"rb");
-    if(fopen_error != 0){
-        printf("Error opening the file, errno %d.\n", fopen_error);
-        return;
-    }
-    
-    fseek(capfile , 0, SEEK_END);
-    caplen= ftell(capfile)- sizeof(struct pcap_file_header);
-    fclose(capfile);
-            
-    /* Chek if the timestamps must be respected */
-    if(argc == 4 && argv[3][0] == 's')
-        sync = TRUE;
-    else
-        sync = FALSE;
-
-    /* Open the capture */
-    /* Create the source string according to the new WinPcap syntax */
-    if ( pcap_createsrcstr( source,         // variable that will keep the source string
-                            PCAP_SRC_FILE,  // we want to open a file
-                            NULL,           // remote host
-                            NULL,           // port on the remote host
-                            argv[1],        // name of the file we want to open
-                            errbuf          // error buffer
-                            ) != 0)
-    {
-        fprintf(stderr,"\nError creating a source string\n");
-        return;
-    }
-    
-    /* Open the capture file */
-    if ( (indesc= pcap_open(source, 65536, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open the file %s.\n", source);
-        return;
-    }
-
-    /* Open the output adapter */
-    if ( (outdesc= pcap_open(argv[2], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open adapter %s.\n", source);
-        return;
-    }
-
-    /* Check the MAC type */
-    if (pcap_datalink(indesc) != pcap_datalink(outdesc))
-    {
-        printf("Warning: the datalink of the capture differs from the one of the selected interface.\n");
-        printf("Press a key to continue, or CTRL+C to stop.\n");
-        getchar();
-    }
-
-    /* Allocate a send queue */
-    squeue = pcap_sendqueue_alloc(caplen);
-
-    /* Fill the queue with the packets from the file */
-    while ((res = pcap_next_ex( indesc, &pktheader, &pktdata)) == 1)
-    {
-        if (pcap_sendqueue_queue(squeue, pktheader, pktdata) == -1)
-        {
-            printf("Warning: packet buffer too small, not all the packets will be sent.\n");
-            break;
-        }
-
-        npacks++;
-    }
-
-    if (res == -1)
-    {
-        printf("Corrupted input file.\n");
-        pcap_sendqueue_destroy(squeue);
-        return;
-    }
-
-    /* Transmit the queue */
-    
-    cpu_time = (float)clock ();
-
-    if ((res = pcap_sendqueue_transmit(outdesc, squeue, sync)) < squeue->len)
-    {
-        printf("An error occurred sending the packets: %s. Only %d bytes were sent\n", pcap_geterr(outdesc), res);
-    }
-    
-    cpu_time = (clock() - cpu_time)/CLK_TCK;
-    
-    printf ("\n\nElapsed time: %5.3f\n", cpu_time);
-    printf ("\nTotal packets generated = %d", npacks);
-    printf ("\nAverage packets per second = %d", (int)((double)npacks/cpu_time));
-    printf ("\n");
-
-    /* free the send queue */
-    pcap_sendqueue_destroy(squeue);
-
-    /* Close the input file */
-    pcap_close(indesc);
-
-    /* 
-     * lose the output adapter 
-     * IMPORTANT: remember to close the adapter, otherwise there will be no guarantee that all the 
-     * packets will be sent!
-     */
-    pcap_close(outdesc);
-
-
-    return;
-}
-
-
-void usage()
-{
-    
-    printf("\nSendcap, sends a libpcap/tcpdump capture file to the net. Copyright (C) 2002 Loris Degioanni.\n");
-    printf("\nUsage:\n");
-    printf("\t sendcap file_name adapter [s]\n");
-    printf("\nParameters:\n");
-    printf("\nfile_name: the name of the dump file that will be sent to the network\n");
-    printf("\nadapter: the device to use. Use \"WinDump -D\" for a list of valid devices\n");
-    printf("\ns: if present, forces the packets to be sent synchronously, i.e. respecting the timestamps in the dump file. This option will work only under Windows NTx.\n\n");
-
-    exit(0);
-}
-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut9.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut9.html deleted file mode 100644 index 2bbceef..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcap__tut9.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - -WinPcap: Gathering Statistics on the network traffic - - - - - - -
-

Gathering Statistics on the network traffic

-
-

This lesson shows another advanced feature of WinPcap: the ability to collect statistics about network traffic. The statistical engine makes use of the kernel-level packet filter to efficiently classify the incoming packet. You can take a look at the NPF driver internals manual if you want to know more details.

-

In order to use this feature, the programmer must open an adapter and put it in statistical mode. This can be done with pcap_setmode(). In particular, MODE_STAT must be used as the mode argument of this function.

-

With statistical mode, making an application that monitors the TCP traffic load is a matter of few lines of code. The following sample shows how to do it.

-
/*
- * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
- * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
- * nor the names of its contributors may be used to endorse or promote 
- * products derived from this software without specific prior written 
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <pcap.h>
-
-void usage();
-
-void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *);
-
-
-void main(int argc, char **argv)
-{
-pcap_t *fp;
-char errbuf[PCAP_ERRBUF_SIZE];
-struct timeval st_ts;
-u_int netmask;
-struct bpf_program fcode;
-  
-    /* Check the validity of the command line */
-    if (argc != 2)
-    {
-        usage();
-        return;
-    }
-        
-    /* Open the output adapter */
-    if ( (fp= pcap_open(argv[1], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL)
-    {
-        fprintf(stderr,"\nUnable to open adapter %s.\n", errbuf);
-        return;
-    }
-
-    /* Don't care about netmask, it won't be used for this filter */
-    netmask=0xffffff; 
-
-    //compile the filter
-    if (pcap_compile(fp, &fcode, "tcp", 1, netmask) <0 )
-    {
-        fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n");
-        /* Free the device list */
-        return;
-    }
-    
-    //set the filter
-    if (pcap_setfilter(fp, &fcode)<0)
-    {
-        fprintf(stderr,"\nError setting the filter.\n");
-        pcap_close(fp);
-        /* Free the device list */
-        return;
-    }
-
-    /* Put the interface in statstics mode */
-    if (pcap_setmode(fp, MODE_STAT)<0)
-    {
-        fprintf(stderr,"\nError setting the mode.\n");
-        pcap_close(fp);
-        /* Free the device list */
-        return;
-    }
-
-
-    printf("TCP traffic summary:\n");
-
-    /* Start the main loop */
-    pcap_loop(fp, 0, dispatcher_handler, (PUCHAR)&st_ts);
-
-    pcap_close(fp);
-    return;
-}
-
-void dispatcher_handler(u_char *state, const struct pcap_pkthdr *header, const u_char *pkt_data)
-{
-    struct timeval *old_ts = (struct timeval *)state;
-    u_int delay;
-    LARGE_INTEGER Bps,Pps;
-    struct tm ltime;
-    char timestr[16];
-    time_t local_tv_sec;
-
-    /* Calculate the delay in microseconds from the last sample. */
-    /* This value is obtained from the timestamp that the associated with the sample. */
-    delay=(header->ts.tv_sec - old_ts->tv_sec) * 1000000 - old_ts->tv_usec + header->ts.tv_usec;
-    /* Get the number of Bits per second */
-    Bps.QuadPart=(((*(LONGLONG*)(pkt_data + 8)) * 8 * 1000000) / (delay));
-    /*                                            ^      ^
-                                                  |      |
-                                                  |      | 
-                                                  |      |
-                         converts bytes in bits --       |
-                                                         |
-                    delay is expressed in microseconds --
-    */
-
-    /* Get the number of Packets per second */
-    Pps.QuadPart=(((*(LONGLONG*)(pkt_data)) * 1000000) / (delay));
-
-    /* Convert the timestamp to readable format */
-    local_tv_sec = header->ts.tv_sec;
-    localtime_s(&ltime, &local_tv_sec);
-    strftime( timestr, sizeof timestr, "%H:%M:%S", &ltime);
-
-    /* Print timestamp*/
-    printf("%s ", timestr);
-
-    /* Print the samples */
-    printf("BPS=%I64u ", Bps.QuadPart);
-    printf("PPS=%I64u\n", Pps.QuadPart);
-
-    //store current timestamp
-    old_ts->tv_sec=header->ts.tv_sec;
-    old_ts->tv_usec=header->ts.tv_usec;
-}
-
-
-void usage()
-{
-    
-    printf("\nShows the TCP traffic load, in bits per second and packets per second.\nCopyright (C) 2002 Loris Degioanni.\n");
-    printf("\nUsage:\n");
-    printf("\t tcptop adapter\n");
-    printf("\t You can use \"WinDump -D\" if you don't know the name of your adapters.\n");
-
-    exit(0);
-}
-

Before enabling statistical mode, the user has the option to set a filter that defines the subset of network traffic that will be monitored. See the paragraph on the Filtering expression syntax for details. If no filter has been set, all of the traffic will be monitored.

-

Once

- -

the interface descriptor starts to work in statistical mode. Notice the fourth parameter (to_ms) of pcap_open(): it defines the interval among the statistical samples. The callback function receives the samples calculated by the driver every to_ms milliseconds. These samples are encapsulated in the second and third parameters of the callback function, as shown in the following figure:

-
-stats_wpcap.gif -
-

Two 64-bit counters are provided: the number of packets and the amount of bytes received during the last interval.

-

In the example, the adapter is opened with a timeout of 1000 ms. This means that dispatcher_handler() is called once per second. At this point a filter that keeps only tcp packets is compiled and set. Then pcap_setmode() and pcap_loop() are called. Note that a struct timeval pointer is passed to pcap_loop() as the user parameter. This structure will be used to store a timestamp in order to calculate the interval between two samples. dispatcher_handler()uses this interval to obtain the bits per second and the packets per second and then prints these values on the screen.

-

Note finally that this example is by far more efficient than a program that captures the packets in the traditional way and calculates statistics at user-level. Statistical mode requires the minumum amount of data copies and context switches and therefore the CPU is optimized. Moreover, a very small amount of memory is required.

-

<<< Previous

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcapfunc.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcapfunc.html deleted file mode 100644 index 64f577f..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcapfunc.html +++ /dev/null @@ -1,2452 +0,0 @@ - - - - -WinPcap: Exported functions - - - - - - -
-

Exported functions
- -[WinPcap user's manual] -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Unix-compatible Functions

These functions are part of the libpcap library, and therefore work both on Windows and on Linux.

-
Note:
errbuf in pcap_open_live(), pcap_open_dead(), pcap_open_offline(), pcap_setnonblock(), pcap_getnonblock(), pcap_findalldevs(), pcap_lookupdev(), and pcap_lookupnet() is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.
-

typedef void(* pcap_handler )(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Prototype of the callback function that receives the packets.
pcap_tpcap_open_live (const char *device, int snaplen, int promisc, int to_ms, char *ebuf)
 Open a live capture from the network.
pcap_tpcap_open_dead (int linktype, int snaplen)
 Create a pcap_t structure without starting a capture.
pcap_tpcap_open_offline (const char *fname, char *errbuf)
 Open a savefile in the tcpdump/libpcap format to read packets.
pcap_dumper_tpcap_dump_open (pcap_t *p, const char *fname)
 Open a file to write packets.
int pcap_setnonblock (pcap_t *p, int nonblock, char *errbuf)
 Switch between blocking and nonblocking mode.
int pcap_getnonblock (pcap_t *p, char *errbuf)
 Get the "non-blocking" state of an interface.
int pcap_findalldevs (pcap_if_t **alldevsp, char *errbuf)
 Construct a list of network devices that can be opened with pcap_open_live().
void pcap_freealldevs (pcap_if_t *alldevsp)
 Free an interface list returned by pcap_findalldevs().
char * pcap_lookupdev (char *errbuf)
 Return the first valid device in the system.
int pcap_lookupnet (const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf)
 Return the subnet and netmask of an interface.
int pcap_dispatch (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets.
int pcap_loop (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets.
u_char * pcap_next (pcap_t *p, struct pcap_pkthdr *h)
 Return the next available packet.
int pcap_next_ex (pcap_t *p, struct pcap_pkthdr **pkt_header, const u_char **pkt_data)
 Read a packet from an interface or from an offline capture.
void pcap_breakloop (pcap_t *)
 set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping.
int pcap_sendpacket (pcap_t *p, u_char *buf, int size)
 Send a raw packet.
void pcap_dump (u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
 Save a packet to disk.
long pcap_dump_ftell (pcap_dumper_t *)
 Return the file position for a "savefile".
int pcap_compile (pcap_t *p, struct bpf_program *fp, char *str, int optimize, bpf_u_int32 netmask)
 Compile a packet filter, converting an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.
int pcap_compile_nopcap (int snaplen_arg, int linktype_arg, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask)
 Compile a packet filter without the need of opening an adapter. This function converts an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.
int pcap_setfilter (pcap_t *p, struct bpf_program *fp)
 Associate a filter to a capture.
void pcap_freecode (struct bpf_program *fp)
 Free a filter.
int pcap_datalink (pcap_t *p)
 Return the link layer of an adapter.
int pcap_list_datalinks (pcap_t *p, int **dlt_buf)
 list datalinks
int pcap_set_datalink (pcap_t *p, int dlt)
 Set the current data link type of the pcap descriptor to the type specified by dlt. -1 is returned on failure.
int pcap_datalink_name_to_val (const char *name)
 Translates a data link type name, which is a DLT_ name with the DLT_ removed, to the corresponding data link type value. The translation is case-insensitive. -1 is returned on failure.
const char * pcap_datalink_val_to_name (int dlt)
 Translates a data link type value to the corresponding data link type name. NULL is returned on failure.
const char * pcap_datalink_val_to_description (int dlt)
 Translates a data link type value to a short description of that data link type. NULL is returned on failure.
int pcap_snapshot (pcap_t *p)
 Return the dimension of the packet portion (in bytes) that is delivered to the application.
int pcap_is_swapped (pcap_t *p)
 returns true if the current savefile uses a different byte order than the current system.
int pcap_major_version (pcap_t *p)
 return the major version number of the pcap library used to write the savefile.
int pcap_minor_version (pcap_t *p)
 return the minor version number of the pcap library used to write the savefile.
FILE * pcap_file (pcap_t *p)
 Return the standard stream of an offline capture.
int pcap_stats (pcap_t *p, struct pcap_stat *ps)
 Return statistics on current capture.
void pcap_perror (pcap_t *p, char *prefix)
 print the text of the last pcap library error on stderr, prefixed by prefix.
char * pcap_geterr (pcap_t *p)
 return the error text pertaining to the last pcap library error.
char * pcap_strerror (int error)
 Provided in case strerror() isn't available.
const char * pcap_lib_version (void)
 Returns a pointer to a string giving information about the version of the libpcap library being used; note that it contains more information than just a version number.
void pcap_close (pcap_t *p)
 close the files associated with p and deallocates resources.
FILE * pcap_dump_file (pcap_dumper_t *p)
 return the standard I/O stream of the 'savefile' opened by pcap_dump_open().
int pcap_dump_flush (pcap_dumper_t *p)
 Flushes the output buffer to the ``savefile,'' so that any packets written with pcap_dump() but not yet written to the ``savefile'' will be written. -1 is returned on error, 0 on success.
void pcap_dump_close (pcap_dumper_t *p)
 Closes a savefile.

Windows-specific Extensions

The functions in this section extend libpcap to offer advanced functionalities (like remote packet capture, packet buffer size variation or high-precision packet injection). Howerver, at the moment they can be used only in Windows.

-

PAirpcapHandle pcap_get_airpcap_handle (pcap_t *p)
 Returns the AirPcap handler associated with an adapter. This handler can be used to change the wireless-related settings of the CACE Technologies AirPcap wireless capture adapters.
int pcap_offline_filter (struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
 Returns if a given filter applies to an offline packet.
int pcap_live_dump (pcap_t *p, char *filename, int maxsize, int maxpacks)
 Save a capture to file.
int pcap_live_dump_ended (pcap_t *p, int sync)
 Return the status of the kernel dump process, i.e. tells if one of the limits defined with pcap_live_dump() has been reached.
struct pcap_statpcap_stats_ex (pcap_t *p, int *pcap_stat_size)
 Return statistics on current capture.
int pcap_setbuff (pcap_t *p, int dim)
 Set the size of the kernel buffer associated with an adapter.
int pcap_setmode (pcap_t *p, int mode)
 Set the working mode of the interface p to mode.
int pcap_setmintocopy (pcap_t *p, int size)
 Set the minumum amount of data received by the kernel in a single call.
HANDLE pcap_getevent (pcap_t *p)
 Return the handle of the event associated with the interface p.
pcap_send_queuepcap_sendqueue_alloc (u_int memsize)
 Allocate a send queue.
void pcap_sendqueue_destroy (pcap_send_queue *queue)
 Destroy a send queue.
int pcap_sendqueue_queue (pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Add a packet to a send queue.
u_int pcap_sendqueue_transmit (pcap_t *p, pcap_send_queue *queue, int sync)
 Send a queue of raw packets to the network.
int pcap_findalldevs_ex (char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
 Create a list of network devices that can be opened with pcap_open().
int pcap_createsrcstr (char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
 Accept a set of strings (host name, port, ...), and it returns the complete source string according to the new format (e.g. 'rpcap://1.2.3.4/eth0').
int pcap_parsesrcstr (const char *source, int *type, char *host, char *port, char *name, char *errbuf)
 Parse the source string and returns the pieces in which the source can be split.
pcap_tpcap_open (const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
 Open a generic source in order to capture / send (WinPcap only) traffic.
struct pcap_samppcap_setsampling (pcap_t *p)
 Define a sampling method for packet capture.
SOCKET pcap_remoteact_accept (const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
 Block until a network connection is accepted (active mode only).
int pcap_remoteact_close (const char *host, char *errbuf)
 Drop an active connection (active mode only).
void pcap_remoteact_cleanup ()
 Clean the socket that is currently used in waiting active connections.
int pcap_remoteact_list (char *hostlist, char sep, int size, char *errbuf)
 Return the hostname of the host that have an active connection with us (active mode only).
-

Detailed Description

-

Functions exported by wpcap.dll

-

Typedef Documentation

- -
-
- - - - -
typedef void(* pcap_handler)(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
-
-
- -

Prototype of the callback function that receives the packets.

-

When pcap_dispatch() or pcap_loop() are called by the user, the packets are passed to the application by means of this callback. user is a user-defined parameter that contains the state of the capture session, it corresponds to the user parameter of pcap_dispatch() and pcap_loop(). pkt_header is the header associated by the capture driver to the packet. It is NOT a protocol header. pkt_data points to the data of the packet, including the protocol headers.

- -

Definition at line 27 of file funcs/pcap.h.

- -
-
-

Function Documentation

- -
-
- - - - - - - - - -
void pcap_breakloop (pcap_t ) 
-
-
- -

set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping.

-

They will return the number of packets that have been processed so far, or -2 if no packets have been processed so far. This routine is safe to use inside a signal handler on UNIX or a console control handler on Windows, as it merely sets a flag that is checked within the loop. The flag is checked in loops reading packets from the OS - a signal by itself will not necessarily terminate those loops - as well as in loops processing a set of packets returned by the OS. Note that if you are catching signals on UNIX systems that support restarting system calls after a signal, and calling pcap_breakloop() in the signal handler, you must specify, when catching those signals, that system calls should NOT be restarted by that signal. Otherwise, if the signal interrupted a call reading packets in a live capture, when your signal handler returns after calling pcap_breakloop(), the call will be restarted, and the loop will not terminate until more packets arrive and the call completes.

-
Note:
pcap_next() will, on some platforms, loop reading packets from the OS; that loop will not necessarily be terminated by a signal, so pcap_breakloop() should be used to terminate packet processing even if pcap_next() is being used. pcap_breakloop() does not guarantee that no further packets will be processed by pcap_dispatch() or pcap_loop() after it is called; at most one more packet might be processed. If -2 is returned from pcap_dispatch() or pcap_loop(), the flag is cleared, so a subsequent call will resume reading packets. If a positive number is returned, the flag is not cleared, so a subsequent call will return -2 and clear the flag.
- -
-
- -
-
- - - - - - - - - -
void pcap_close (pcap_t p ) 
-
-
- -

close the files associated with p and deallocates resources.

-
See also:
pcap_open_live(), pcap_open_offline(), pcap_open_dead()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_compile (pcap_t p,
struct bpf_program *  fp,
char *  str,
int  optimize,
bpf_u_int32  netmask 
)
-
-
- -

Compile a packet filter, converting an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.

-

pcap_compile() is used to compile the string str into a filter program. program is a pointer to a bpf_program struct and is filled in by pcap_compile(). optimize controls whether optimization on the resulting code is performed. netmask specifies the IPv4 netmask of the network on which packets are being captured; it is used only when checking for IPv4 broadcast addresses in the filter program. If the netmask of the network on which packets are being captured isn't known to the program, or if packets are being captured on the Linux "any" pseudo-interface that can capture on more than one network, a value of 0 can be supplied; tests for IPv4 broadcast addreses won't be done correctly, but all other tests in the filter program will be OK. A return of -1 indicates an error in which case pcap_geterr() may be used to display the error text.

-
See also:
pcap_open_live(), pcap_setfilter(), pcap_freecode(), pcap_snapshot()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_compile_nopcap (int  snaplen_arg,
int  linktype_arg,
struct bpf_program *  program,
char *  buf,
int  optimize,
bpf_u_int32  mask 
)
-
-
- -

Compile a packet filter without the need of opening an adapter. This function converts an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.

-

pcap_compile_nopcap() is similar to pcap_compile() except that instead of passing a pcap structure, one passes the snaplen and linktype explicitly. It is intended to be used for compiling filters for direct BPF usage, without necessarily having called pcap_open(). A return of -1 indicates an error; the error text is unavailable. (pcap_compile_nopcap() is a wrapper around pcap_open_dead(), pcap_compile(), and pcap_close(); the latter three routines can be used directly in order to get the error text for a compilation error.)

-

Look at the Filtering expression syntax section for details on the str parameter.

-
See also:
pcap_open_live(), pcap_setfilter(), pcap_freecode(), pcap_snapshot()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_createsrcstr (char *  source,
int  type,
const char *  host,
const char *  port,
const char *  name,
char *  errbuf 
)
-
-
- -

Accept a set of strings (host name, port, ...), and it returns the complete source string according to the new format (e.g. 'rpcap://1.2.3.4/eth0').

-

This function is provided in order to help the user creating the source string according to the new format. An unique source string is used in order to make easy for old applications to use the remote facilities. Think about tcpdump, for example, which has only one way to specify the interface on which the capture has to be started. However, GUI-based programs can find more useful to specify hostname, port and interface name separately. In that case, they can use this function to create the source string before passing it to the pcap_open() function.

-
Parameters:
- - - - - - - -
source,: a user-allocated buffer that will contain the complete source string wen the function returns.
- The source will start with an identifier according to the new Source Specification Syntax .
- This function assumes that the allocated buffer is at least PCAP_BUF_SIZE bytes.
type,: its value tells the type of the source we want to create. It can assume the values defined in the Source identification Codes .
-
host,: an user-allocated buffer that keeps the host (e.g. "foo.bar.com") we want to connect to. It can be NULL in case we want to open an interface on a local host.
port,: an user-allocated buffer that keeps the network port (e.g. "2002") we want to use for the RPCAP protocol. It can be NULL in case we want to open an interface on a local host.
name,: an user-allocated buffer that keeps the interface name we want to use (e.g. "eth0"). It can be NULL in case the return string (i.e. 'source') has to be used with the pcap_findalldevs_ex(), which does not require the interface name.
errbuf,: a pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns:
'0' if everything is fine, '-1' if some errors occurred. The string containing the complete source is returned in the 'source' variable.
-
Warning:
If the source is longer than PCAP_BUF_SIZE, the excess characters are truncated.
- -
-
- -
-
- - - - - - - - - -
int pcap_datalink (pcap_t p ) 
-
-
- -

Return the link layer of an adapter.

-

returns the link layer type; link layer types it can return include:

-
    -
  • DLT_NULL BSD loopback encapsulation; the link layer header is a 4-byte field, in host byte order, containing a PF_ value from socket.h for the network-layer protocol of the packet. Note that ``host byte order'' is the byte order of the machine on which the packets are captured, and the PF_ values are for the OS of the machine on which the packets are captured; if a live capture is being done, ``host byte order'' is the byte order of the machine capturing the packets, and the PF_ values are those of the OS of the machine capturing the packets, but if a ``savefile'' is being read, the byte order and PF_ values are not necessarily those of the machine reading the capture file.
  • -
  • DLT_EN10MB Ethernet (10Mb, 100Mb, 1000Mb, and up)
  • -
  • DLT_IEEE802: IEEE 802.5 Token Ring
  • -
  • DLT_ARCNET: ARCNET
  • -
  • DLT_SLIP: SLIP; the link layer header contains, in order:
      -
    1. a 1-byte flag, which is 0 for packets received by the machine and 1 for packets sent by the machine;
    2. -
    3. a 1-byte field, the upper 4 bits of which indicate the type of packet, as per RFC 1144:
        -
      • 0x40: an unmodified IP datagram (TYPE_IP);
      • -
      • 0x70: an uncompressed-TCP IP datagram (UNCOMPRESSED_TCP), with that byte being the first byte of the raw IP header on the wire, containing the connection number in the protocol field;
      • -
      • 0x80: a compressed-TCP IP datagram (COMPRESSED_TCP), with that byte being the first byte of the compressed TCP/IP datagram header;
      • -
      -
    4. -
    5. for UNCOMPRESSED_TCP, the rest of the modified IP header, and for COMPRESSED_TCP, the compressed TCP/IP datagram header;
    6. -
    7. for a total of 16 bytes; the uncompressed IP datagram follows the header.
    8. -
    -
  • -
-
    -
  • DLT_PPP: PPP; if the first 2 bytes are 0xff and 0x03, it's PPP in HDLC-like framing, with the PPP header following those two bytes, otherwise it's PPP without framing, and the packet begins with the PPP header.
  • -
  • DLT_FDDI: FDDI
  • -
  • DLT_ATM_RFC1483: RFC 1483 LLC/SNAP-encapsulated ATM; the packet begins with an IEEE 802.2 LLC header.
  • -
  • DLT_RAW: raw IP; the packet begins with an IP header.
  • -
  • DLT_PPP_SERIAL: PPP in HDLC-like framing, as per RFC 1662, or Cisco PPP with HDLC framing, as per section 4.3.1 of RFC 1547; the first byte will be 0xFF for PPP in HDLC-like framing, and will be 0x0F or 0x8F for Cisco PPP with HDLC framing.
  • -
  • DLT_PPP_ETHER: PPPoE; the packet begins with a PPPoE header, as per RFC 2516.
  • -
  • DLT_C_HDLC: Cisco PPP with HDLC framing, as per section 4.3.1 of RFC 1547.
  • -
  • DLT_IEEE802_11: IEEE 802.11 wireless LAN
  • -
  • DLT_FRELAY: Frame Relay
  • -
  • DLT_LOOP: OpenBSD loopback encapsulation; the link layer header is a 4-byte field, in network byte order, containing a PF_ value from OpenBSD's socket.h for the network-layer protocol of the packet. Note that, if a ``savefile'' is being read, those PF_ values are not necessarily those of the machine reading the capture file.
  • -
  • DLT_LINUX_SLL: Linux "cooked" capture encapsulation; the link layer header contains, in order:
      -
    • a 2-byte "packet type", in network byte order, which is one of:
        -
      1. packet was sent to us by somebody else
      2. -
      3. packet was broadcast by somebody else
      4. -
      5. packet was multicast, but not broadcast, by somebody else
      6. -
      7. packet was sent by somebody else to somebody else
      8. -
      9. packet was sent by us
      10. -
      -
    • -
    • a 2-byte field, in network byte order, containing a Linux ARPHRD_ value for the link layer device type;
    • -
    • a 2-byte field, in network byte order, containing the length of the link layer address of the sender of the packet (which could be 0);
    • -
    • an 8-byte field containing that number of bytes of the link layer header (if there are more than 8 bytes, only the first 8 are present);
    • -
    • 2-byte field containing an Ethernet protocol type, in network byte order, or containing 1 for Novell 802.3 frames without an 802.2 LLC header or 4 for frames beginning with an 802.2 LLC header.
    • -
    -
  • -
  • DLT_LTALK: Apple LocalTalk; the packet begins with an AppleTalk LLAP header.
  • -
  • DLT_PFLOG: OpenBSD pflog; the link layer header contains, in order:
      -
    • a 4-byte PF_ value, in network byte order;
    • -
    • a 16-character interface name;
    • -
    • a 2-byte rule number, in network byte order;
    • -
    • a 2-byte reason code, in network byte order, which is one of:
        -
      1. match
      2. -
      3. bad offset
      4. -
      5. fragment
      6. -
      7. short
      8. -
      9. normalize
      10. -
      11. memory -a 2-byte action code, in network byte order, which is one of:
      12. -
      13. passed
      14. -
      15. dropped
      16. -
      17. scrubbed
      18. -
      -
    • -
    • a 2-byte direction, in network byte order, which is one of:
        -
      1. incoming or outgoing
      2. -
      3. incoming
      4. -
      5. outgoing
      6. -
      -
    • -
    -
  • -
  • DLT_PRISM_HEADER: Prism monitor mode information followed by an 802.11 header.
  • -
  • DLT_IP_OVER_FC: RFC 2625 IP-over-Fibre Channel, with the link-layer header being the Network_Header as described in that RFC.
  • -
  • DLT_SUNATM: SunATM devices; the link layer header contains, in order:
      -
    • a 1-byte flag field, containing a direction flag in the uppermost bit, which is set for packets transmitted by the machine and clear for packets received by the machine, and a 4-byte traffic type in the low-order 4 bits, which is one of:
        -
      1. raw traffic
      2. -
      3. LANE traffic
      4. -
      5. LLC-encapsulated traffic
      6. -
      7. MARS traffic
      8. -
      9. IFMP traffic
      10. -
      11. ILMI traffic
      12. -
      13. Q.2931 traffic
      14. -
      -
    • -
    • a 1-byte VPI value;
    • -
    • a 2-byte VCI field, in network byte order.
    • -
    -
  • -
  • DLT_IEEE802_11_RADIO: link-layer information followed by an 802.11 header - see http://www.radiotap.org/ for a description of the link-layer information.
  • -
  • DLT_ARCNET_LINUX: ARCNET, with no exception frames, reassembled packets rather than raw frames, and an extra 16-bit offset field between the destination host and type bytes.
  • -
  • DLT_LINUX_IRDA: Linux-IrDA packets, with a DLT_LINUX_SLL header followed by the IrLAP header.
  • -
-
See also:
pcap_list_datalinks(), pcap_set_datalink(), pcap_datalink_name_to_val()
- -
-
- -
-
- - - - - - - - - -
int pcap_datalink_name_to_val (const char *  name ) 
-
-
- -

Translates a data link type name, which is a DLT_ name with the DLT_ removed, to the corresponding data link type value. The translation is case-insensitive. -1 is returned on failure.

- -
-
- -
-
- - - - - - - - - -
const char* pcap_datalink_val_to_description (int  dlt ) 
-
-
- -

Translates a data link type value to a short description of that data link type. NULL is returned on failure.

- -
-
- -
-
- - - - - - - - - -
const char* pcap_datalink_val_to_name (int  dlt ) 
-
-
- -

Translates a data link type value to the corresponding data link type name. NULL is returned on failure.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_dispatch (pcap_t p,
int  cnt,
pcap_handler  callback,
u_char *  user 
)
-
-
- -

Collect a group of packets.

-

pcap_dispatch() is used to collect and process packets. cnt specifies the maximum number of packets to process before returning. This is not a minimum number; when reading a live capture, only one bufferful of packets is read at a time, so fewer than cnt packets may be processed. A cnt of -1 processes all the packets received in one buffer when reading a live capture, or all the packets in the file when reading a ``savefile''. callback specifies a routine to be called with three arguments: a u_char pointer which is passed in from pcap_dispatch(), a const struct pcap_pkthdr pointer, and a const u_char pointer to the first caplen (as given in the struct pcap_pkthdr a pointer to which is passed to the callback routine) bytes of data from the packet (which won't necessarily be the entire packet; to capture the entire packet, you will have to provide a value for snaplen in your call to pcap_open_live() that is sufficiently large to get all of the packet's data - a value of 65535 should be sufficient on most if not all networks).

-

The number of packets read is returned. 0 is returned if no packets were read from a live capture (if, for example, they were discarded because they didn't pass the packet filter, or if, on platforms that support a read timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read) or if no more packets are available in a ``savefile.'' A return of -1 indicates an error in which case pcap_perror() or pcap_geterr() may be used to display the error text. A return of -2 indicates that the loop terminated due to a call to pcap_breakloop() before any packets were processed. If your application uses pcap_breakloop(), make sure that you explicitly check for -1 and -2, rather than just checking for a return value < 0.

-
Note:
when reading a live capture, pcap_dispatch() will not necessarily return when the read times out; on some platforms, the read timeout isn't supported, and, on other platforms, the timer doesn't start until at least one packet arrives. This means that the read timeout should NOT be used in, for example, an interactive application, to allow the packet capture loop to ``poll'' for user input periodically, as there's no guarantee that pcap_dispatch() will return after the timeout expires.
-
See also:
pcap_loop(), pcap_next(), pcap_open_live(), pcap_open_offline(), pcap_handler
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void pcap_dump (u_char *  user,
const struct pcap_pkthdr h,
const u_char *  sp 
)
-
-
- -

Save a packet to disk.

-

pcap_dump() outputs a packet to the "savefile" opened with pcap_dump_open(). Note that its calling arguments are suitable for use with pcap_dispatch() or pcap_loop(). If called directly, the user parameter is of type pcap_dumper_t as returned by pcap_dump_open().

-
See also:
pcap_dump_open(), pcap_dump_close(), pcap_dispatch(), pcap_loop()
- -
-
- -
-
- - - - - - - - - -
void pcap_dump_close (pcap_dumper_t p ) 
-
-
- -

Closes a savefile.

-
See also:
pcap_dump_open(), pcap_dump()
- -
-
- -
-
- - - - - - - - - -
FILE* pcap_dump_file (pcap_dumper_t p ) 
-
-
- -

return the standard I/O stream of the 'savefile' opened by pcap_dump_open().

- -
-
- -
-
- - - - - - - - - -
int pcap_dump_flush (pcap_dumper_t p ) 
-
-
- -

Flushes the output buffer to the ``savefile,'' so that any packets written with pcap_dump() but not yet written to the ``savefile'' will be written. -1 is returned on error, 0 on success.

- -
-
- -
-
- - - - - - - - - -
long pcap_dump_ftell (pcap_dumper_t ) 
-
-
- -

Return the file position for a "savefile".

-

pcap_dump_ftell() returns the current file position for the "savefile", representing the number of bytes written by pcap_dump_open() and pcap_dump() . -1 is returned on error.

-
See also:
pcap_dump_open(), pcap_dump()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
pcap_dumper_t* pcap_dump_open (pcap_t p,
const char *  fname 
)
-
-
- -

Open a file to write packets.

-

pcap_dump_open() is called to open a "savefile" for writing. The name "-" in a synonym for stdout. NULL is returned on failure. p is a pcap struct as returned by pcap_open_offline() or pcap_open_live(). fname specifies the name of the file to open. Alternatively, you may call pcap_dump_fopen() to write data to an existing open stream fp. Note that on Windows, that stream should be opened in binary mode. If NULL is returned, pcap_geterr() can be used to get the error text.

-
See also:
pcap_dump_close(), pcap_dump()
- -
-
- -
-
- - - - - - - - - -
FILE* pcap_file (pcap_t p ) 
-
-
- -

Return the standard stream of an offline capture.

-

pcap_file() returns the standard I/O stream of the "savefile", if a "savefile" was opened with pcap_open_offline(), or NULL, if a network device was opened with pcap_open_live().

-
Deprecated:
Due to incompatibilities between the C Runtime (CRT) used to compile WinPcap and the one used by WinPcap-based applications, this function may return an invalid FILE pointer, i.e. a descriptor that causes all the standard I/O stream functions (ftell, fseek, fclose...) to fail. The function is still available for backwards binary compatibility, only.
-
See also:
pcap_open_offline(), pcap_open_live()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_findalldevs (pcap_if_t **  alldevsp,
char *  errbuf 
)
-
-
- -

Construct a list of network devices that can be opened with pcap_open_live().

-
Note:
that there may be network devices that cannot be opened with pcap_open_live() by the process calling pcap_findalldevs(), because, for example, that process might not have sufficient privileges to open them for capturing; if so, those devices will not appear on the list.) alldevsp is set to point to the first element of the list; each element of the list is of type pcap_if_t,
-

-1 is returned on failure, in which case errbuf is filled in with an appropriate error message; 0 is returned on success.

-
See also:
struct pcap_if, pcap_freealldevs(), pcap_open_live(), pcap_lookupdev(), pcap_lookupnet()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_findalldevs_ex (char *  source,
struct pcap_rmtauth auth,
pcap_if_t **  alldevs,
char *  errbuf 
)
-
-
- -

Create a list of network devices that can be opened with pcap_open().

-

This function is a superset of the old 'pcap_findalldevs()', which allows listing only the devices present on the local machine. Vice versa, pcap_findalldevs_ex() allows listing the devices present on a remote machine as well. Additionally, it can list all the pcap files available into a given folder. Moreover, pcap_findalldevs_ex() is platform independent, since it relies on the standard pcap_findalldevs() to get addresses on the local machine.

-

In case the function has to list the interfaces on a remote machine, it opens a new control connection toward that machine, it retrieves the interfaces, and it drops the connection. However, if this function detects that the remote machine is in 'active' mode, the connection is not dropped and the existing socket is used.

-

The 'source' is a parameter that tells the function where the lookup has to be done and it uses the same syntax of the pcap_open().

-

Differently from the pcap_findalldevs(), the interface names (pointed by the alldevs->name and the other ones in the linked list) are already ready to be used in the pcap_open() call. Vice versa, the output that comes from pcap_findalldevs() must be formatted with the new pcap_createsrcstr() before passing the source identifier to the pcap_open().

-
Parameters:
- - - - - -
source,: a char* buffer that keeps the 'source localtion', according to the new WinPcap syntax. This source will be examined looking for adapters (local or remote) (e.g. source can be 'rpcap://' for local adapters or 'rpcap://host:port' for adapters on a remote host) or pcap files (e.g. source can be 'file://c:/myfolder/').
- The strings that must be prepended to the 'source' in order to define if we want local/remote adapters or files is defined in the new Source Specification Syntax .
auth,: a pointer to a pcap_rmtauth structure. This pointer keeps the information required to authenticate the RPCAP connection to the remote host. This parameter is not meaningful in case of a query to the local host: in that case it can be NULL.
alldevs,: a 'struct pcap_if_t' pointer, which will be properly allocated inside this function. When the function returns, it is set to point to the first element of the interface list; each element of the list is of type 'struct pcap_if_t'.
errbuf,: a pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns:
'0' if everything is fine, '-1' if some errors occurred. The list of the devices is returned in the 'alldevs' variable. When the function returns correctly, 'alldevs' cannot be NULL. In other words, this function returns '-1' also in case the system does not have any interface to list.
-

The error message is returned in the 'errbuf' variable. An error could be due to several reasons:

-
    -
  • libpcap/WinPcap was not installed on the local/remote host
  • -
  • the user does not have enough privileges to list the devices / files
  • -
  • a network problem
  • -
  • the RPCAP version negotiation failed
  • -
  • other errors (not enough memory and others).
  • -
-
Warning:
There may be network devices that cannot be opened with pcap_open() by the process calling pcap_findalldevs(), because, for example, that process might not have sufficient privileges to open them for capturing; if so, those devices will not appear on the list.
-
-The interface list must be deallocated manually by using the pcap_freealldevs().
- -
-
- -
-
- - - - - - - - - -
void pcap_freealldevs (pcap_if_t alldevsp ) 
-
-
- -

Free an interface list returned by pcap_findalldevs().

-

pcap_freealldevs() is used to free a list allocated by pcap_findalldevs().

-
See also:
pcap_findalldevs()
- -
-
- -
-
- - - - - - - - - -
void pcap_freecode (struct bpf_program *  fp ) 
-
-
- -

Free a filter.

-

pcap_freecode() is used to free up allocated memory pointed to by a bpf_program struct generated by pcap_compile() when that BPF program is no longer needed, for example after it has been made the filter program for a pcap structure by a call to pcap_setfilter().

-
See also:
pcap_compile(), pcap_compile_nopcap()
- -
-
- -
-
- - - - - - - - - -
PAirpcapHandle pcap_get_airpcap_handle (pcap_t p ) 
-
-
- -

Returns the AirPcap handler associated with an adapter. This handler can be used to change the wireless-related settings of the CACE Technologies AirPcap wireless capture adapters.

-
Note:
THIS FUNCTION SHOULD BE CONSIDERED PROVISIONAL, AND MAY BE REPLACED IN THE FUTURE BY A MORE COMPLETE SET OF FUNCTIONS FOR WIRELESS SUPPORT.
-

pcap_get_airpcap_handle() allows to obtain the airpcap handle of an open adapter. This handle can be used with the AirPcap API functions to perform wireless-releated operations, e.g. changing the channel or enabling WEP decryption. For more details about the AirPcap wireless capture adapters, see http://www.cacetech.com/products/airpcap.htm

-
Parameters:
- - -
p,: handle to an open libpcap adapter
-
-
-
Returns:
a pointer to an open AirPcap handle, used internally by the libpcap open adapter. NULL if the libpcap adapter doesn't have wireless support through AirPcap.
- -
-
- -
-
- - - - - - - - - -
char* pcap_geterr (pcap_t p ) 
-
-
- -

return the error text pertaining to the last pcap library error.

-
Note:
the pointer Return will no longer point to a valid error message string after the pcap_t passed to it is closed; you must use or copy the string before closing the pcap_t.
-
See also:
pcap_perror()
- -
-
- -
-
- - - - - - - - - -
HANDLE pcap_getevent (pcap_t p ) 
-
-
- -

Return the handle of the event associated with the interface p.

-

This event can be passed to functions like WaitForSingleObject() or WaitForMultipleObjects() to wait until the driver's buffer contains some data without performing a read.

-

We disourage the use of this function because it is not portable.

-
See also:
pcap_open_live()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_getnonblock (pcap_t p,
char *  errbuf 
)
-
-
- -

Get the "non-blocking" state of an interface.

-

pcap_getnonblock() returns the current "non-blocking" state of the capture descriptor; it always returns 0 on "savefiles". If there is an error, -1 is returned and errbuf is filled in with an appropriate error message.

-
See also:
pcap_setnonblock()
- -
-
- -
-
- - - - - - - - - -
int pcap_is_swapped (pcap_t p ) 
-
-
- -

returns true if the current savefile uses a different byte order than the current system.

- -
-
- -
-
- - - - - - - - - -
const char* pcap_lib_version (void  ) 
-
-
- -

Returns a pointer to a string giving information about the version of the libpcap library being used; note that it contains more information than just a version number.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_list_datalinks (pcap_t p,
int **  dlt_buf 
)
-
-
- -

list datalinks

-

pcap_list_datalinks() is used to get a list of the supported data link types of the interface associated with the pcap descriptor. pcap_list_datalinks() allocates an array to hold the list and sets *dlt_buf. The caller is responsible for freeing the array. -1 is returned on failure; otherwise, the number of data link types in the array is returned.

-
See also:
pcap_datalink(), pcap_set_datalink(), pcap_datalink_name_to_val()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_live_dump (pcap_t p,
char *  filename,
int  maxsize,
int  maxpacks 
)
-
-
- -

Save a capture to file.

-
Note:
: this function does not work in current version of WinPcap.
-

pcap_live_dump() dumps the network traffic from an interface to a file. Using this function the dump is performed at kernel level, therefore it is more efficient than using pcap_dump().

-

The parameters of this function are an interface descriptor (obtained with pcap_open_live()), a string with the name of the dump file, the maximum size of the file (in bytes) and the maximum number of packets that the file will contain. Setting maxsize or maxpacks to 0 means no limit. When maxsize or maxpacks are reached, the dump ends.

-

pcap_live_dump() is non-blocking, threfore Return immediately. pcap_live_dump_ended() can be used to check the status of the dump process or to wait until it is finished. pcap_close() can instead be used to end the dump process.

-

Note that when one of the two limits is reached, the dump is stopped, but the file remains opened. In order to correctly flush the data and put the file in a consistent state, the adapter must be closed with pcap_close().

-
See also:
pcap_live_dump_ended(), pcap_open_live(), pcap_close(), pcap_dump_open(), pcap_dump()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_live_dump_ended (pcap_t p,
int  sync 
)
-
-
- -

Return the status of the kernel dump process, i.e. tells if one of the limits defined with pcap_live_dump() has been reached.

-
Note:
: this function does not work in current version of WinPcap.
-

pcap_live_dump_ended() informs the user about the limits that were set with a previous call to pcap_live_dump() on the interface pointed by p: if the return value is nonzero, one of the limits has been reched and the dump process is currently stopped.

-

If sync is nonzero, the function blocks until the dump is finished, otherwise Return immediately.

-
Warning:
if the dump process has no limits (i.e. if the maxsize and maxpacks arguments of pcap_live_dump() were both 0), the dump process will never stop, therefore setting sync to TRUE will block the application on this call forever.
-
See also:
pcap_live_dump()
- -
-
- -
-
- - - - - - - - - -
char* pcap_lookupdev (char *  errbuf ) 
-
-
- -

Return the first valid device in the system.

-
Deprecated:
Use pcap_findalldevs() or pcap_findalldevs_ex() instead.
-

pcap_lookupdev() returns a pointer to a network device suitable for use with pcap_open_live() and pcap_lookupnet(). If there is an error, NULL is returned and errbuf is filled in with an appropriate error message.

-
See also:
pcap_findalldevs(), pcap_open_live()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_lookupnet (const char *  device,
bpf_u_int32 netp,
bpf_u_int32 maskp,
char *  errbuf 
)
-
-
- -

Return the subnet and netmask of an interface.

-
Deprecated:
Use pcap_findalldevs() or pcap_findalldevs_ex() instead.
-

pcap_lookupnet() is used to determine the network number and mask associated with the network device device. Both netp and maskp are bpf_u_int32 pointers. A return of -1 indicates an error in which case errbuf is filled in with an appropriate error message.

-
See also:
pcap_findalldevs()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_loop (pcap_t p,
int  cnt,
pcap_handler  callback,
u_char *  user 
)
-
-
- -

Collect a group of packets.

-

pcap_loop() is similar to pcap_dispatch() except it keeps reading packets until cnt packets are processed or an error occurs. It does not return when live read timeouts occur. Rather, specifying a non-zero read timeout to pcap_open_live() and then calling pcap_dispatch() allows the reception and processing of any packets that arrive when the timeout occurs. A negative cnt causes pcap_loop() to loop forever (or at least until an error occurs). -1 is returned on an error; 0 is returned if cnt is exhausted; -2 is returned if the loop terminated due to a call to pcap_breakloop() before any packets were processed. If your application uses pcap_breakloop(), make sure that you explicitly check for -1 and -2, rather than just checking for a return value < 0.

-
See also:
pcap_dispatch(), pcap_next(), pcap_open_live(), pcap_open_offline(), pcap_handler
- -
-
- -
-
- - - - - - - - - -
int pcap_major_version (pcap_t p ) 
-
-
- -

return the major version number of the pcap library used to write the savefile.

-
See also:
pcap_minor_version()
- -
-
- -
-
- - - - - - - - - -
int pcap_minor_version (pcap_t p ) 
-
-
- -

return the minor version number of the pcap library used to write the savefile.

-
See also:
pcap_major_version()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
u_char* pcap_next (pcap_t p,
struct pcap_pkthdr h 
)
-
-
- -

Return the next available packet.

-

pcap_next() reads the next packet (by calling pcap_dispatch() with a cnt of 1) and returns a u_char pointer to the data in that packet. (The pcap_pkthdr struct for that packet is not supplied.) NULL is returned if an error occured, or if no packets were read from a live capture (if, for example, they were discarded because they didn't pass the packet filter, or if, on platforms that support a read timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read), or if no more packets are available in a ``savefile.'' Unfortunately, there is no way to determine whether an error occured or not.

-
See also:
pcap_dispatch(), pcap_loop()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_next_ex (pcap_t p,
struct pcap_pkthdr **  pkt_header,
const u_char **  pkt_data 
)
-
-
- -

Read a packet from an interface or from an offline capture.

-

This function is used to retrieve the next available packet, bypassing the callback method traditionally provided by libpcap.

-

pcap_next_ex fills the pkt_header and pkt_data parameters (see pcap_handler()) with the pointers to the header and to the data of the next captured packet.

-

The return value can be:

-
    -
  • 1 if the packet has been read without problems
  • -
  • 0 if the timeout set with pcap_open_live() has elapsed. In this case pkt_header and pkt_data don't point to a valid packet
  • -
  • -1 if an error occurred
  • -
  • -2 if EOF was reached reading from an offline capture
  • -
-
See also:
pcap_open_live(), pcap_loop(), pcap_dispatch(), pcap_handler()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_offline_filter (struct bpf_program *  prog,
const struct pcap_pkthdr header,
const u_char *  pkt_data 
)
-
-
- -

Returns if a given filter applies to an offline packet.

-

This function is used to apply a filter to a packet that is currently in memory. This process does not need to open an adapter; we need just to create the proper filter (by settings parameters like the snapshot length, or the link-layer type) by means of the pcap_compile_nopcap().

-

The current API of libpcap does not allow to receive a packet and to filter the packet after it has been received. However, this can be useful in case you want to filter packets in the application, instead of into the receiving process. This function allows you to do the job.

-
Parameters:
- - - - -
prog,: bpf program (created with the pcap_compile_nopcap() )
header,: header of the packet that has to be filtered
pkt_data,: buffer containing the packet, in network-byte order.
-
-
-
Returns:
the length of the bytes that are currently available into the packet if the packet satisfies the filter, 0 otherwise.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pcap_t* pcap_open (const char *  source,
int  snaplen,
int  flags,
int  read_timeout,
struct pcap_rmtauth auth,
char *  errbuf 
)
-
-
- -

Open a generic source in order to capture / send (WinPcap only) traffic.

-

The pcap_open() replaces all the pcap_open_xxx() functions with a single call.

-

This function hides the differences between the different pcap_open_xxx() functions so that the programmer does not have to manage different opening function. In this way, the 'true' open function is decided according to the source type, which is included into the source string (in the form of source prefix).

-

This function can rely on the pcap_createsrcstr() to create the string that keeps the capture device according to the new syntax, and the pcap_parsesrcstr() for the other way round.

-
Parameters:
- - - - - - - -
source,: zero-terminated string containing the source name to open. The source name has to include the format prefix according to the new Source Specification Syntax and it cannot be NULL.
- On on Linux systems with 2.2 or later kernels, a device argument of "any" (i.e. rpcap://any) can be used to capture packets from all interfaces.
- In order to makes the source syntax easier, please remember that:

- -
snaplen,: length of the packet that has to be retained. For each packet received by the filter, only the first 'snaplen' bytes are stored in the buffer and passed to the user application. For instance, snaplen equal to 100 means that only the first 100 bytes of each packet are stored.
flags,: keeps several flags that can be needed for capturing packets. The allowed flags are defined in the pcap_open() flags .
read_timeout,: read timeout in milliseconds. The read timeout is used to arrange that the read not necessarily return immediately when a packet is seen, but that it waits for some amount of time to allow more packets to arrive and to read multiple packets from the OS kernel in one operation. Not all platforms support a read timeout; on platforms that don't, the read timeout is ignored.
auth,: a pointer to a 'struct pcap_rmtauth' that keeps the information required to authenticate the user on a remote machine. In case this is not a remote capture, this pointer can be set to NULL.
errbuf,: a pointer to a user-allocated buffer which will contain the error in case this function fails. The pcap_open() and findalldevs() are the only two functions which have this parameter, since they do not have (yet) a pointer to a pcap_t structure, which reserves space for the error string. Since these functions do not have (yet) a pcap_t pointer (the pcap_t pointer is NULL in case of errors), they need an explicit 'errbuf' variable. 'errbuf' may also be set to warning text when pcap_open_live() succeds; to detect this case the caller should store a zero-length string in 'errbuf' before calling pcap_open_live() and display the warning to the user if 'errbuf' is no longer a zero-length string.
-
-
-
Returns:
A pointer to a 'pcap_t' which can be used as a parameter to the following calls (pcap_compile() and so on) and that specifies an opened WinPcap session. In case of problems, it returns NULL and the 'errbuf' variable keeps the error message.
-
Warning:
The source cannot be larger than PCAP_BUF_SIZE.
-
-The following formats are not allowed as 'source' strings:
    -
  • rpcap:// [to open the first local adapter]
  • -
  • rpcap://hostname/ [to open the first remote adapter]
  • -
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
pcap_t* pcap_open_dead (int  linktype,
int  snaplen 
)
-
-
- -

Create a pcap_t structure without starting a capture.

-

pcap_open_dead() is used for creating a pcap_t structure to use when calling the other functions in libpcap. It is typically used when just using libpcap for compiling BPF code.

-
See also:
pcap_open_offline(), pcap_open_live(), pcap_findalldevs(), pcap_compile(), pcap_setfilter(), pcap_close()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pcap_t* pcap_open_live (const char *  device,
int  snaplen,
int  promisc,
int  to_ms,
char *  ebuf 
)
-
-
- -

Open a live capture from the network.

-

pcap_open_live() is used to obtain a packet capture descriptor to look at packets on the network. device is a string that specifies the network device to open; on Linux systems with 2.2 or later kernels, a device argument of "any" or NULL can be used to capture packets from all interfaces. snaplen specifies the maximum number of bytes to capture. If this value is less than the size of a packet that is captured, only the first snaplen bytes of that packet will be captured and provided as packet data. A value of 65535 should be sufficient, on most if not all networks, to capture all the data available from the packet. promisc specifies if the interface is to be put into promiscuous mode. (Note that even if this parameter is false, the interface could well be in promiscuous mode for some other reason.) For now, this doesn't work on the "any" device; if an argument of "any" or NULL is supplied, the promisc flag is ignored. to_ms specifies the read timeout in milliseconds. The read timeout is used to arrange that the read not necessarily return immediately when a packet is seen, but that it wait for some amount of time to allow more packets to arrive and to read multiple packets from the OS kernel in one operation. Not all platforms support a read timeout; on platforms that don't, the read timeout is ignored. A zero value for to_ms, on platforms that support a read timeout, will cause a read to wait forever to allow enough packets to arrive, with no timeout. errbuf is used to return error or warning text. It will be set to error text when pcap_open_live() fails and returns NULL. errbuf may also be set to warning text when pcap_open_live() succeds; to detect this case the caller should store a zero-length string in errbuf before calling pcap_open_live() and display the warning to the user if errbuf is no longer a zero-length string.

-
See also:
pcap_open_offline(), pcap_open_dead(), pcap_findalldevs(), pcap_close()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
pcap_t* pcap_open_offline (const char *  fname,
char *  errbuf 
)
-
-
- -

Open a savefile in the tcpdump/libpcap format to read packets.

-

pcap_open_offline() is called to open a "savefile" for reading. fname specifies the name of the file to open. The file has the same format as those used by tcpdump(1) and tcpslice(1). The name "-" in a synonym for stdin. Alternatively, you may call pcap_fopen_offline() to read dumped data from an existing open stream fp. Note that on Windows, that stream should be opened in binary mode. errbuf is used to return error text and is only set when pcap_open_offline() or pcap_fopen_offline() fails and returns NULL.

-
See also:
pcap_open_live(), pcap_dump_open(), pcap_findalldevs(), pcap_close()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_parsesrcstr (const char *  source,
int *  type,
char *  host,
char *  port,
char *  name,
char *  errbuf 
)
-
-
- -

Parse the source string and returns the pieces in which the source can be split.

-

This call is the other way round of pcap_createsrcstr(). It accepts a null-terminated string and it returns the parameters related to the source. This includes:

-
    -
  • the type of the source (file, winpcap on a remote adapter, winpcap on local adapter), which is determined by the source prefix (PCAP_SRC_IF_STRING and so on)
  • -
  • the host on which the capture has to be started (only for remote captures)
  • -
  • the 'raw' name of the source (file name, name of the remote adapter, name of the local adapter), without the source prefix. The string returned does not include the type of the source itself (i.e. the string returned does not include "file://" or rpcap:// or such).
  • -
-

The user can omit some parameters in case it is not interested in them.

-
Parameters:
- - - - - - - -
source,: a null-terminated string containing the WinPcap source. This source starts with an identifier according to the new Source Specification Syntax .
type,: pointer to an integer, which is used to return the code corrisponding to the selected source. The code will be one defined in the Source identification Codes .
- In case the source string does not exists (i.e. 'source == NULL') or it is empty ('*source == NULL'), it returns PCAP_SRC_IF_LOCAL (i.e. you are ready to call pcap_open_live() ). This behavior is kept only for compatibility with older applications (e.g. tcpdump); therefore we suggest to move to the new syntax for sources.
- This parameter can be NULL in case the user is not interested in that.
host,: user-allocated buffer (of size PCAP_BUF_SIZE) that is used to return the host name on which the capture has to be started. This value is meaningful only in case of remote capture; otherwise, the returned string will be empty (""). This parameter can be NULL in case the user is not interested in that.
port,: user-allocated buffer (of size PCAP_BUF_SIZE) that is used to return the port that has to be used by the RPCAP protocol to contact the other host. This value is meaningful only in case of remote capture and if the user wants to use a non-standard port; otherwise, the returned string will be empty (""). In case of remote capture, an emply string means "use the standard RPCAP port". This parameter can be NULL in case the user is not interested in that.
name,: user-allocated buffer (of size PCAP_BUF_SIZE) that is used to return the source name, without the source prefix. If the name does not exist (for example because source contains 'rpcap://' that means 'default local adapter'), it returns NULL. This parameter can be NULL in case the user is not interested in that.
errbuf,: pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one). This parameter can be NULL in case the user is not interested in that.
-
-
-
Returns:
'0' if everything is fine, '-1' if some errors occurred. The requested values (host name, network port, type of the source) are returned into the proper variables passed by reference.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void pcap_perror (pcap_t p,
char *  prefix 
)
-
-
- -

print the text of the last pcap library error on stderr, prefixed by prefix.

-
See also:
pcap_geterr()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SOCKET pcap_remoteact_accept (const char *  address,
const char *  port,
const char *  hostlist,
char *  connectinghost,
struct pcap_rmtauth auth,
char *  errbuf 
)
-
-
- -

Block until a network connection is accepted (active mode only).

-

This function has been defined to allow the client dealing with the 'active mode'. In other words, in the 'active mode' the server opens the connection toward the client, so that the client has to open a socket in order to wait for connections. When a new connection is accepted, the RPCAP protocol starts as usual; the only difference is that the connection is initiated by the server.

-

This function accepts only ONE connection, then it closes the waiting socket. This means that if some error occurs, the application has to call it again in order to accept another connection.

-

This function returns when a new connection (coming from a valid host 'connectinghost') is accepted; it returns error otherwise.

-
Parameters:
- - - - - - - -
address,: a string that keeps the network address we have to bind to; usually it is NULL (it means 'bind on all local addresses').
port,: a string that keeps the network port on which we have to bind to; usually it is NULL (it means 'bind on the predefined port', i.e. RPCAP_DEFAULT_NETPORT_ACTIVE).
hostlist,: a string that keeps the host name of the host from whom we are expecting a connection; it can be NULL (it means 'accept connection from everyone'). Host names are separated by a whatever character in the RPCAP_HOSTLIST_SEP list.
connectinghost,: a user-allocated buffer that will contain the name of the host is trying to connect to us. This variable must be at least RPCAP_HOSTLIST_SIZE bytes..
auth,: a pointer to a pcap_rmtauth structure. This pointer keeps the information required to authenticate the RPCAP connection to the remote host.
errbuf,: a pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns:
The SOCKET identifier of the new control connection if everything is fine, a negative number if some errors occurred. The error message is returned into the errbuf variable. In case it returns '-1', this means 'everything is fine', but the host cannot be admitted. In case it returns '-2', in means 'unrecoverable error' (for example it is not able to bind the socket, or something like that). In case it returns '-3', it means 'authentication failed'. The authentication check is performed only if the connecting host is among the ones that are allowed to connect to this host.
-

The host that is connecting to us is returned into the hostlist variable, which ust be allocated by the user. This variable contains the host name both in case the host is allowed, and in case the connection is refused.

-
Warning:
Although this function returns the socket established by the new control connection, this value should not be used. This value will be stored into some libpcap internal variables and it will be managed automatically by the library. In other words, all the following calls to findalldevs() and pcap_open() will check if the host is among one that already has a control connection in place; if so, that one will be used.
-
-This function has several problems if used inside a thread, which is stopped when this call is blocked into the accept(). In this case, the socket on which we accept connections is not freed (thread termination is a very dirty job), so that we are no longer able to accept other connections until the program (i.e. the process) stops. In order to solve the problem, call the pcap_remoteact_cleanup().
- -
-
- -
-
- - - - - - - - -
void pcap_remoteact_cleanup ( ) 
-
-
- -

Clean the socket that is currently used in waiting active connections.

-

This function does a very dirty job. The fact is that is the waiting socket is not freed if the pcap_remoteaccept() is killed inside a new thread. This function is able to clean the socket in order to allow the next calls to pcap_remoteact_accept() to work.

-

This function is useful *only* if you launch pcap_remoteact_accept() inside a new thread, and you stops (not very gracefully) the thread (for example because the user changed idea, and it does no longer want to wait for an active connection). So, basically, the flow should be the following:

- -

This function has no effects in other cases.

-
Returns:
None.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_remoteact_close (const char *  host,
char *  errbuf 
)
-
-
- -

Drop an active connection (active mode only).

-

This function has been defined to allow the client dealing with the 'active mode'. This function closes an active connection that is still in place and it purges the host name from the 'activeHost' list. From this point on, the client will not have any connection with that host in place.

-
Parameters:
- - - -
host,: a string that keeps the host name of the host for which we want to close the active connection.
errbuf,: a pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns:
'0' if everything is fine, '-1' if some errors occurred. The error message is returned into the errbuf variable.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_remoteact_list (char *  hostlist,
char  sep,
int  size,
char *  errbuf 
)
-
-
- -

Return the hostname of the host that have an active connection with us (active mode only).

-

This function has been defined to allow the client dealing with the 'active mode'. This function returns the list of hosts that are currently having an active connection with us. This function is useful in order to delete an active connection that is still in place.

-
Parameters:
- - - - - -
hostlist,: a user-allocated string that will keep the list of host that are currently connected with us.
sep,: the character that has to be sued as a separator between the hosts (',' for example).
size,: size of the hostlist buffer.
errbuf,: a pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns:
'0' if everything is fine, '-1' if some errors occurred. The error message is returned into the errbuf variable.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_sendpacket (pcap_t p,
u_char *  buf,
int  size 
)
-
-
- -

Send a raw packet.

-

This function allows to send a raw packet to the network. p is the interface that will be used to send the packet, buf contains the data of the packet to send (including the various protocol headers), size is the dimension of the buffer pointed by buf, i.e. the size of the packet to send. The MAC CRC doesn't need to be included, because it is transparently calculated and added by the network interface driver. The return value is 0 if the packet is succesfully sent, -1 otherwise.

-
See also:
pcap_open_live()
- -
-
- -
-
- - - - - - - - - -
pcap_send_queue* pcap_sendqueue_alloc (u_int  memsize ) 
-
-
- -

Allocate a send queue.

-

This function allocates a send queue, i.e. a buffer containing a set of raw packets that will be transimtted on the network with pcap_sendqueue_transmit().

-

memsize is the size, in bytes, of the queue, therefore it determines the maximum amount of data that the queue will contain.

-

Use pcap_sendqueue_queue() to insert packets in the queue.

-
See also:
pcap_sendqueue_queue(), pcap_sendqueue_transmit(), pcap_sendqueue_destroy()
- -
-
- -
-
- - - - - - - - - -
void pcap_sendqueue_destroy (pcap_send_queue queue ) 
-
-
- -

Destroy a send queue.

-

Deletes a send queue and frees all the memory associated with it.

-
See also:
pcap_sendqueue_alloc(), pcap_sendqueue_queue(), pcap_sendqueue_transmit()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_sendqueue_queue (pcap_send_queue queue,
const struct pcap_pkthdr pkt_header,
const u_char *  pkt_data 
)
-
-
- -

Add a packet to a send queue.

-

pcap_sendqueue_queue() adds a packet at the end of the send queue pointed by the queue parameter. pkt_header points to a pcap_pkthdr structure with the timestamp and the length of the packet, pkt_data points to a buffer with the data of the packet.

-

The pcap_pkthdr structure is the same used by WinPcap and libpcap to store the packets in a file, therefore sending a capture file is straightforward. 'Raw packet' means that the sending application will have to include the protocol headers, since every packet is sent to the network 'as is'. The CRC of the packets needs not to be calculated, because it will be transparently added by the network interface.

-
See also:
pcap_sendqueue_alloc(), pcap_sendqueue_transmit(), pcap_sendqueue_destroy()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
u_int pcap_sendqueue_transmit (pcap_t p,
pcap_send_queue queue,
int  sync 
)
-
-
- -

Send a queue of raw packets to the network.

-

This function transmits the content of a queue to the wire. p is a pointer to the adapter on which the packets will be sent, queue points to a pcap_send_queue structure containing the packets to send (see pcap_sendqueue_alloc() and pcap_sendqueue_queue()), sync determines if the send operation must be synchronized: if it is non-zero, the packets are sent respecting the timestamps, otherwise they are sent as fast as possible.

-

The return value is the amount of bytes actually sent. If it is smaller than the size parameter, an error occurred during the send. The error can be caused by a driver/adapter problem or by an inconsistent/bogus send queue.

-
Note:
Using this function is more efficient than issuing a series of pcap_sendpacket(), because the packets are buffered in the kernel driver, so the number of context switches is reduced. Therefore, expect a better throughput when using pcap_sendqueue_transmit.
-
-When Sync is set to TRUE, the packets are synchronized in the kernel with a high precision timestamp. This requires a non-negligible amount of CPU, but allows normally to send the packets with a precision of some microseconds (depending on the accuracy of the performance counter of the machine). Such a precision cannot be reached sending the packets with pcap_sendpacket().
-
See also:
pcap_sendqueue_alloc(), pcap_sendqueue_queue(), pcap_sendqueue_destroy()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_set_datalink (pcap_t p,
int  dlt 
)
-
-
- -

Set the current data link type of the pcap descriptor to the type specified by dlt. -1 is returned on failure.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setbuff (pcap_t p,
int  dim 
)
-
-
- -

Set the size of the kernel buffer associated with an adapter.

-

dim specifies the size of the buffer in bytes. The return value is 0 when the call succeeds, -1 otherwise. If an old buffer was already created with a previous call to pcap_setbuff(), it is deleted and its content is discarded. pcap_open_live() creates a 1 MByte buffer by default.

-
See also:
pcap_open_live(), pcap_loop(), pcap_dispatch()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setfilter (pcap_t p,
struct bpf_program *  fp 
)
-
-
- -

Associate a filter to a capture.

-

pcap_setfilter() is used to specify a filter program. fp is a pointer to a bpf_program struct, usually the result of a call to pcap_compile(). -1 is returned on failure, in which case pcap_geterr() may be used to display the error text; 0 is returned on success.

-
See also:
pcap_compile(), pcap_compile_nopcap()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setmintocopy (pcap_t p,
int  size 
)
-
-
- -

Set the minumum amount of data received by the kernel in a single call.

-

pcap_setmintocopy() changes the minimum amount of data in the kernel buffer that causes a read from the application to return (unless the timeout expires). If the value of size is large, the kernel is forced to wait the arrival of several packets before copying the data to the user. This guarantees a low number of system calls, i.e. low processor usage, and is a good setting for applications like packet-sniffers and protocol analyzers. Vice versa, in presence of a small value for this variable, the kernel will copy the packets as soon as the application is ready to receive them. This is useful for real time applications that need the best responsiveness from the kernel. pcap_open_live() sets a default mintocopy value of 16000 bytes.

-
See also:
pcap_open_live(), pcap_loop(), pcap_dispatch()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setmode (pcap_t p,
int  mode 
)
-
-
- -

Set the working mode of the interface p to mode.

-

Valid values for mode are MODE_CAPT (default capture mode) and MODE_STAT (statistical mode). See the tutorial "\ref wpcap_tut9" for details about statistical mode.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_setnonblock (pcap_t p,
int  nonblock,
char *  errbuf 
)
-
-
- -

Switch between blocking and nonblocking mode.

-

pcap_setnonblock() puts a capture descriptor, opened with pcap_open_live(), into "non-blocking" mode, or takes it out of "non-blocking" mode, depending on whether the nonblock argument is non-zero or zero. It has no effect on "savefiles". If there is an error, -1 is returned and errbuf is filled in with an appropriate error message; otherwise, 0 is returned. In "non-blocking" mode, an attempt to read from the capture descriptor with pcap_dispatch() will, if no packets are currently available to be read, return 0 immediately rather than blocking waiting for packets to arrive. pcap_loop() and pcap_next() will not work in "non-blocking" mode.

-
See also:
pcap_getnonblock(), pcap_dispatch()
- -
-
- -
-
- - - - - - - - - -
struct pcap_samp* pcap_setsampling (pcap_t p )  [read]
-
-
- -

Define a sampling method for packet capture.

-

This function allows applying a sampling method to the packet capture process. The currently sampling methods (and the way to set them) are described into the struct pcap_samp. In other words, the user must set the appropriate parameters into it; these will be applied as soon as the capture starts.

-
Warning:
Sampling parameters cannot be changed when a capture is active. These parameters must be applied before starting the capture. If they are applied when the capture is in progress, the new settings are ignored.
-
-Sampling works only when capturing data on Win32 or reading from a file. It has not been implemented on other platforms. Sampling works on remote machines provided that the probe (i.e. the capturing device) is a Win32 workstation.
- -
-
- -
-
- - - - - - - - - -
int pcap_snapshot (pcap_t p ) 
-
-
- -

Return the dimension of the packet portion (in bytes) that is delivered to the application.

-

pcap_snapshot() returns the snapshot length specified when pcap_open_live was called.

-
See also:
pcap_open_live(), pcap_compile(), pcap_compile_nopcap()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_stats (pcap_t p,
struct pcap_stat ps 
)
-
-
- -

Return statistics on current capture.

-

pcap_stats() returns 0 and fills in a pcap_stat struct. The values represent packet statistics from the start of the run to the time of the call. If there is an error or the underlying packet capture doesn't support packet statistics, -1 is returned and the error text can be obtained with pcap_perror() or pcap_geterr(). pcap_stats() is supported only on live captures, not on "savefiles"; no statistics are stored in "savefiles", so no statistics are available when reading from a "savefile".

-
See also:
pcap_stats_ex(), pcap_open_live()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct pcap_stat* pcap_stats_ex (pcap_t p,
int *  pcap_stat_size 
) [read]
-
-
- -

Return statistics on current capture.

-

pcap_stats_ex() extends the pcap_stats() allowing to return more statistical parameters than the old call. One of the advantages of this new call is that the pcap_stat structure is not allocated by the user; instead, it is returned back by the system. This allow to extend the pcap_stat structure without affecting backward compatibility on older applications. These will simply check at the values of the members at the beginning of the structure, while only newest applications are able to read new statistical values, which are appended in tail.

-

To be sure not to read a piece of mamory which has not been allocated by the system, the variable pcap_stat_size will return back the size of the structure pcap_stat allocated by the system.

-
Parameters:
- - - -
p,: pointer to the pcap_t currently in use.
pcap_stat_size,: pointer to an integer that will contain (when the function returns back) the size of the structure pcap_stat as it has been allocated by the system.
-
-
-
Returns:
: a pointer to a pcap_stat structure, that will contain the statistics related to the current device. The return value is NULL in case of errors, and the error text can be obtained with pcap_perror() or pcap_geterr().
-
Warning:
pcap_stats_ex() is supported only on live captures, not on "savefiles"; no statistics are stored in "savefiles", so no statistics are available when reading from a "savefile".
-
See also:
pcap_stats()
- -
-
- -
-
- - - - - - - - - -
char* pcap_strerror (int  error ) 
-
-
- -

Provided in case strerror() isn't available.

-
See also:
pcap_perror(), pcap_geterr()
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/group__wpcapsamps.html b/ledset/WpdPack_4_1_2/docs/html/group__wpcapsamps.html deleted file mode 100644 index c52804a..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/group__wpcapsamps.html +++ /dev/null @@ -1,500 +0,0 @@ - - - - -WinPcap: Using WinPcap in your programs - - - - - - -
-

Using WinPcap in your programs
- -[WinPcap user's manual] -

-
- - - - - - - - - - -

Creating an application that uses wpcap.dll

-

To create an application that uses wpcap.dll with Microsoft Visual C++, -follow these -steps:

-
    -
  • Include the file pcap.h at the beginning of every source file that - uses the functions exported by library.
  • -
  • If your program uses Win32 specific functions of WinPcap, remember to include WPCAP - among the preprocessor definitions.
  • -
  • If your program uses the remote capture capabilities of WinPcap, add - HAVE_REMOTE among the preprocessor definitions. Do not include - remote-ext.h directly in your source files.
  • Set the options of the linker to include the wpcap.lib library - file specific for your target (x86 or x64). wpcap.lib for x86 can be - found in the \lib folder of the WinPcap developer's - pack, wpcap.lib for x64 can - be found in the \lib\x64 folder.
  • Set the options of the linker to include the winsock library file - ws2_32.lib. This file is distributed with the C compiler - and contains the socket functions for Windows. It is needed by some - functions used by the samples in the tutorial.
  • -
-

How to properly set Microsoft Visual Studio
-
-
Visual Studio 6

-
    -
  • To add a preprocessor definition, you must select Settings from the Project menu, then select C/C++ - from the tab control, and under the category General, you must add - the definition under the Preprocessor Definitions text box. -
  • To add a new library to the project with Microsoft Visual C++, you must - select Settings from the Project menu, then select Link - from the tab control, and then add the name of the new library in the Object/library - modules editbox. -
  • To add a new path where Microsoft Visual C++ will look for the libraries, - you must select Options from the Tools menu, then - Directories - from the tab control, Library files from the Show directories - for combobox, and the add the path in the Directories box. -
  • To add a new path where Microsoft Visual C++ will look for include files, you must select Options from the Tools menu, then - Directories - from the tab control, Include files from the Show directories - for combobox, and the add the path in the Directories box.
  • -
-

Visual Studio 2005 (needed to compile x64 applications)

-
    -
  • To add a preprocessor definition, you must select Properties from the Project menu, then select C/C++ - from the list control on the left, and under the category Preprocessor, you must add - the definition under the Preprocessor Definitions text box. -
  • To add a new library to the project, you must - select Properties from the Project menu, then select Linker - from the list control on the left, and under the category Input add the name of the new library in the - Additional Dependencies text box.
  • To add a new path where Microsoft Visual - Studio will look for the libraries, - you must select Options from the Tools menu, then - Project and Solutions from the list control on the left, VC++ - Directories, then choose Library Files in the Show directories - for combobox, and the add the path in the box below. -
  • To add a new path where Microsoft Visual - Studio will look for the include files, - you must select Options from the Tools menu, then - Project and Solutions from the list control on the left, VC++ - Directories, then choose Include Files in the Show directories - for combobox, and the add the path in the box below. -
-

 

-

Sample programs

-

A couple of sample programs are provided to show the usage of the WinPcap API. The -source of the examples, along with all the files needed to compile and run them, can be found in the Developer's -Pack.  For didactic purpose we provide here a browsable version of the -code: it is possible to click on the variables and functions to jump the -documentation of each of them. For a more complete set of samples, try WinPcap -Tutorial Section.

- - - - - - - - - - - - - - - -

Packet Dump

-

This program reads packets from a file or a network adapter, depending on -a command line switch. If a source is not provided, the program shows a list of -available adapters, one of which can be selected. Once the -capture is started, the program prints the timestamp, the length and the raw -contents of the packets. Once compiled, it will run on all the Win32 platforms. It -can be compiled to run on Unix as well (the makefile is provided).

- - - - -
/*
- * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
- * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
- * nor the names of its contributors may be used to endorse or promote 
- * products derived from this software without specific prior written 
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-
-#include <stdlib.h>
-#include <stdio.h>
-
-//
-// NOTE: remember to include WPCAP and HAVE_REMOTE among your
-// preprocessor definitions.
-//
-
-#include <pcap.h>
-
-#define LINE_LEN 16
-
-int main(int argc, char **argv)
-{   
-pcap_if_t *alldevs, *d;
-pcap_t *fp;
-u_int inum, i=0;
-char errbuf[PCAP_ERRBUF_SIZE];
-int res;
-struct pcap_pkthdr *header;
-const u_char *pkt_data;
-
-    printf("pktdump_ex: prints the packets of the network using WinPcap.\n");
-    printf("   Usage: pktdump_ex [-s source]\n\n"
-           "   Examples:\n"
-           "      pktdump_ex -s file://c:/temp/file.acp\n"
-           "      pktdump_ex -s rpcap://\\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n");
-
-    if(argc < 3)
-    {
-
-        printf("\nNo adapter selected: printing the device list:\n");
-        /* The user didn't provide a packet source: Retrieve the local device list */
-        if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-        {
-            fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);
-            return -1;
-        }
-        
-        /* Print the list */
-        for(d=alldevs; d; d=d->next)
-        {
-            printf("%d. %s\n    ", ++i, d->name);
-
-            if (d->description)
-                printf(" (%s)\n", d->description);
-            else
-                printf(" (No description available)\n");
-        }
-        
-        if (i==0)
-        {
-            fprintf(stderr,"No interfaces found! Exiting.\n");
-            return -1;
-        }
-        
-        printf("Enter the interface number (1-%d):",i);
-        scanf_s("%d", &inum);
-        
-        if (inum < 1 || inum > i)
-        {
-            printf("\nInterface number out of range.\n");
-
-            /* Free the device list */
-            pcap_freealldevs(alldevs);
-            return -1;
-        }
-        
-        /* Jump to the selected adapter */
-        for (d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-        
-        /* Open the device */
-        if ( (fp= pcap_open(d->name,
-                            100 /*snaplen*/,
-                            PCAP_OPENFLAG_PROMISCUOUS /*flags*/,
-                            20 /*read timeout*/,
-                            NULL /* remote authentication */,
-                            errbuf)
-                            ) == NULL)
-        {
-            fprintf(stderr,"\nError opening adapter\n");
-            return -1;
-        }
-    }
-    else 
-    {
-        // Do not check for the switch type ('-s')
-        if ( (fp= pcap_open(argv[2],
-                            100 /*snaplen*/,
-                            PCAP_OPENFLAG_PROMISCUOUS /*flags*/,
-                            20 /*read timeout*/,
-                            NULL /* remote authentication */,
-                            errbuf)
-                            ) == NULL)
-        {
-            fprintf(stderr,"\nError opening source: %s\n", errbuf);
-            return -1;
-        }
-    }
-
-    /* Read the packets */
-    while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0)
-    {
-
-        if(res == 0)
-            /* Timeout elapsed */
-            continue;
-
-        /* print pkt timestamp and pkt len */
-        printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len);          
-        
-        /* Print the packet */
-        for (i=1; (i < header->caplen + 1 ) ; i++)
-        {
-            printf("%.2x ", pkt_data[i-1]);
-            if ( (i % LINE_LEN) == 0) printf("\n");
-        }
-        
-        printf("\n\n");     
-    }
-
-    if(res == -1)
-    {
-        fprintf(stderr, "Error reading the packets: %s\n", pcap_geterr(fp));
-        return -1;
-    }
-
-    return 0;
-}
-
- - - - - - - - - - -

Packet Filter

- -

This is a more complete example of libpcap usage. It shows, among other -things, how to create and set filters and how to save a capture to disk. It can -be compiled under Win32 or Unix (projects and makefiles are provided). -Pcap_filter (pf.exe) is a general-purpose packet filtering application: its -input parameters are a source of packets (it can be a physical interface or a -file), a filter and an output file. It takes packets from the source until -CTRL+C is pressed or the whole file is processed, applies the filter to the -incoming packets and saves them to the output file if they satisfy the filter. -Pcap_filter can be used to dump network data according to a particular filter, -but also to extract a set of packets from a previously saved file. The format of -both input and output files is the format used by libpcap, i.e. same of WinDump, tcpdump -and many other network tools.

- - - - -
/*
- * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
- * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the Politecnico di Torino, CACE Technologies 
- * nor the names of its contributors may be used to endorse or promote 
- * products derived from this software without specific prior written 
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <pcap.h>
-
-#define MAX_PRINT 80
-#define MAX_LINE 16
-
-
-void usage();
-
-
-void main(int argc, char **argv)
-{
-pcap_t *fp;
-char errbuf[PCAP_ERRBUF_SIZE];
-char *source=NULL;
-char *ofilename=NULL;
-char *filter=NULL;
-int i;
-pcap_dumper_t *dumpfile;
-struct bpf_program fcode;
-bpf_u_int32 NetMask;
-int res;
-struct pcap_pkthdr *header;
-const u_char *pkt_data;
-
-    if (argc == 1)
-    {
-        usage();
-        return;
-    }
-
-    for(i=1;i < argc; i+= 2)
-    {
-
-        switch (argv[i] [1])
-        {
-            case 's':
-            {
-                source=argv[i+1];
-            };
-            break;
-
-            case 'o':
-            {
-                ofilename=argv[i+1];
-            };
-            break;
-
-            case 'f':
-            {
-                filter=argv[i+1];
-            };
-            break;
-        }
-    }
-
-    // open a capture from the network
-    if (source != NULL)
-    {
-        if ( (fp= pcap_open(source,
-                            1514 /*snaplen*/,
-                            PCAP_OPENFLAG_PROMISCUOUS /*flags*/,
-                            20 /*read timeout*/,
-                            NULL /* remote authentication */,
-                            errbuf)
-                            ) == NULL)
-        {
-            fprintf(stderr,"\nUnable to open the adapter.\n");
-            return;
-        }
-    }
-
-    else usage();
-
-    if (filter != NULL)
-    {
-        // We should loop through the adapters returned by the pcap_findalldevs_ex()
-        // in order to locate the correct one.
-        //
-        // Let's do things simpler: we suppose to be in a C class network ;-)
-        NetMask=0xffffff;
-
-        //compile the filter
-        if(pcap_compile(fp, &fcode, filter, 1, NetMask) < 0)
-        {
-            fprintf(stderr,"\nError compiling filter: wrong syntax.\n");
-            return;
-        }
-
-        //set the filter
-        if(pcap_setfilter(fp, &fcode)<0)
-        {
-            fprintf(stderr,"\nError setting the filter\n");
-            return;
-        }
-
-    }
-
-    //open the dump file
-    if (ofilename != NULL)
-    {
-        dumpfile= pcap_dump_open(fp, ofilename);
-
-        if (dumpfile == NULL)
-        {
-            fprintf(stderr,"\nError opening output file\n");
-            return;
-        }
-    }
-    else usage();
-
-    //start the capture
-    while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0)
-    {
-
-        if(res == 0)
-        /* Timeout elapsed */
-        continue;
-
-        //save the packet on the dump file
-        pcap_dump((unsigned char *) dumpfile, header, pkt_data);
-
-    }
-}
-
-
-void usage()
-{
-
-    printf("\npf - Generic Packet Filter.\n");
-    printf("\nUsage:\npf -s source -o output_file_name [-f filter_string]\n\n");
-    exit(0);
-}
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/incs_2pcap_8h.html b/ledset/WpdPack_4_1_2/docs/html/incs_2pcap_8h.html deleted file mode 100644 index 40a901d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/incs_2pcap_8h.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - -WinPcap: pcap.h File Reference - - - - - - -
-

pcap.h File Reference

#include <pcap-stdinc.h>
-#include <net/bpf.h>
-#include <stdio.h>
- -

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  pcap_file_header
 Header of a libpcap dump file. More...
struct  pcap_pkthdr
 Header of a packet in the dump file. More...
struct  pcap_stat
 Structure that keeps statistical values on an interface. More...
struct  pcap_if
 Item in a list of interfaces, used by pcap_findalldevs(). More...
struct  pcap_addr
 Representation of an interface address, used by pcap_findalldevs(). More...

Defines

#define PCAP_VERSION_MAJOR   2
 Major libpcap dump file version.
#define PCAP_VERSION_MINOR   4
 Minor libpcap dump file version.
#define PCAP_ERRBUF_SIZE   256
 Size to use when allocating the buffer that contains the libpcap errors.
#define PCAP_IF_LOOPBACK   0x00000001
 interface is loopback
#define MODE_CAPT   0
 Capture mode, to be used when calling pcap_setmode().
#define MODE_STAT   1
 Statistical mode, to be used when calling pcap_setmode().

Typedefs

typedef int bpf_int32
 32-bit integer
typedef u_int bpf_u_int32
 32-bit unsigned integer
typedef struct pcap pcap_t
 Descriptor of an open capture instance. This structure is opaque to the user, that handles its content through the functions provided by wpcap.dll.
typedef struct pcap_dumper pcap_dumper_t
 libpcap savefile descriptor.
typedef struct pcap_if pcap_if_t
 Item in a list of interfaces, see pcap_if.
typedef struct pcap_addr pcap_addr_t
 Representation of an interface address, see pcap_addr.
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/incs_2pcap_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/incs_2pcap_8h_source.html deleted file mode 100644 index e265868..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/incs_2pcap_8h_source.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - -WinPcap: pcap.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/index.hhc b/ledset/WpdPack_4_1_2/docs/html/index.hhc deleted file mode 100644 index ba871e1..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/index.hhc +++ /dev/null @@ -1,171 +0,0 @@ - - - - - -
    -
  • -
  • -
      -
    -
  • -
      -
    • -
        -
      -
    • -
        -
      -
    • -
        -
      -
    • -
        -
      -
    • -
        -
      -
    • -
        -
      -
    • -
        -
      -
    • -
        -
      -
    • -
        -
      -
    • -
        -
      -
    • -
        -
      • -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        -
      • -
          -
        -
      • -
          -
        -
      -
    • -
        -
      • -
          -
        -
      • -
          -
        -
      • -
          -
        -
      • -
          -
        -
      -
    • -
        -
      • -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        -
      • -
          -
        -
      • -
          -
        -
      • -
          -
        -
      -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
- - diff --git a/ledset/WpdPack_4_1_2/docs/html/index.hhk b/ledset/WpdPack_4_1_2/docs/html/index.hhk deleted file mode 100644 index e3be416..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/index.hhk +++ /dev/null @@ -1,2939 +0,0 @@ - - - - - -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
  • -
  • -
  • -
      -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
  • -
  • -
      -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    -
  • -
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    -
  • -
  • -
  • -
  • -
- - diff --git a/ledset/WpdPack_4_1_2/docs/html/index.hhp b/ledset/WpdPack_4_1_2/docs/html/index.hhp deleted file mode 100644 index 0ececa2..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/index.hhp +++ /dev/null @@ -1,160 +0,0 @@ -[OPTIONS] -Compatibility=1.1 -Full-text search=Yes -Contents file=index.hhc -Default Window=main -Default topic=main.html -Index file=index.hhk -Language=0x409 English (United States) -Binary TOC=YES -Title=WinPcap - -[WINDOWS] -main="WinPcap","index.hhc","index.hhk","main.html","main.html",,,,,0x23520,,0x10387e,,,,,,,,0 - -[FILES] -main.html -pages.html -daemon_8h_source.html -fileconf_8h_source.html -ioctls_8h_source.html -jitter_8h_source.html -Packet_8h_source.html -pcap-remote_8h_source.html -incs_2pcap_8h_source.html -funcs_2pcap_8h_source.html -remote-ext_8h_source.html -rpcapd_8h_source.html -utils_8h_source.html -Win32-Extensions_8h_source.html -win32-svc_8h_source.html -wpcap__remote_8htm_source.html -daemon_8h.html -doxygen__groups_8txt.html -fileconf_8h.html -ioctls_8h.html -jitter_8h.html -main_8txt.html -Packet_8h.html -pcap-remote_8h.html -incs_2pcap_8h.html -funcs_2pcap_8h.html -remote-ext_8h.html -rpcapd_8h.html -utils_8h.html -Win32-Extensions_8h.html -win32-svc_8h.html -wpcap__remote_8htm.html -wpcap__tut_8txt.html -wpcap__tut1_8txt.html -wpcap__tut2_8txt.html -wpcap__tut3_8txt.html -wpcap__tut4_8txt.html -wpcap__tut5_8txt.html -wpcap__tut6_8txt.html -wpcap__tut7_8txt.html -wpcap__tut8_8txt.html -wpcap__tut9_8txt.html -deprecated.html -group__NPF__ioctl.html -group__NPF__include.html -group__NPF__code.html -group__NPF__jitter.html -group__wpcap__def.html -group__wpcapfunc.html -group__wpcap__tut.html -group__wpcap__tut1.html -group__wpcap__tut2.html -group__wpcap__tut3.html -group__wpcap__tut4.html -group__wpcap__tut5.html -group__wpcap__tut6.html -group__wpcap__tut7.html -group__wpcap__tut8.html -group__wpcap__tut9.html -group__internals.html -group__NPF.html -group__compilation.html -group__packetapi.html -group__wpcap.html -group__language.html -group__wpcapsamps.html -group__remote.html -group__remote__struct.html -group__remotefunc.html -group__remote__pri__func.html -group__remote__pri__struct.html -group__remote__source__string.html -group__remote__source__ID.html -group__remote__open__flags.html -group__remote__samp__methods.html -group__remote__auth__methods.html -modules.html -annotated.html -classes.html -functions.html -functions_vars.html -struct____CPU__Private__Data.html -struct__DEVICE__EXTENSION.html -struct__INTERNAL__REQUEST.html -struct__OPEN__INSTANCE.html -struct__PACKET__OID__DATA.html -struct__PACKET__RESERVED.html -structactive__pars.html -structactivehosts.html -structbinary__stream.html -structdaemon__slpars.html -structJIT__BPF__Filter.html -structpacket__file__header.html -structPacketHeader.html -structpcap__addr.html -structpcap__file__header.html -structpcap__if.html -structpcap__pkthdr.html -structpcap__rmtauth.html -structpcap__samp.html -structpcap__send__queue.html -structpcap__stat.html -structrpcap__auth.html -structrpcap__filter.html -structrpcap__filterbpf__insn.html -structrpcap__findalldevs__if.html -structrpcap__findalldevs__ifaddr.html -structrpcap__header.html -structrpcap__openreply.html -structrpcap__pkthdr.html -structrpcap__sampling.html -structrpcap__startcapreply.html -structrpcap__startcapreq.html -structrpcap__stats.html -structsf__pkthdr.html -files.html -globals.html -globals_0x62.html -globals_0x63.html -globals_0x64.html -globals_0x65.html -globals_0x66.html -globals_0x67.html -globals_0x68.html -globals_0x69.html -globals_0x6a.html -globals_0x6b.html -globals_0x6d.html -globals_0x6e.html -globals_0x6f.html -globals_0x70.html -globals_0x72.html -globals_0x73.html -globals_0x74.html -globals_0x75.html -globals_func.html -globals_vars.html -globals_type.html -globals_enum.html -globals_eval.html -globals_defs.html -tabs.css -tab_b.gif -tab_l.gif -tab_r.gif diff --git a/ledset/WpdPack_4_1_2/docs/html/index.html b/ledset/WpdPack_4_1_2/docs/html/index.html deleted file mode 100644 index c5a530d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - -WinPcap - - - - - - <body> - <a href="main.html">Frames are disabled. Click here to go to the main page.</a> - </body> - - - diff --git a/ledset/WpdPack_4_1_2/docs/html/internals-arch.gif b/ledset/WpdPack_4_1_2/docs/html/internals-arch.gif deleted file mode 100644 index 37b7ea6758d56cb8d94879309d1ecc26b0a624e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4650 zcmeH`_ct2~Eg1_s{sA^M20xob&wrob%`#KG6U=h;TS@9034;TOc_-J&>Q5 zH3(#F4YCfwhIG`Vk#X3N5G*zX+s7u)j&{`4bgZ!Zw*P$}du4^az0GF#vDqtZ_P_AI z{m;PvV*`Kwn*iYdS^)5{017-e3@Y>6F7OD+zwWFoXh#VC4#FB#75)>?$LBfSSyl8k zN$OGD)!1jSE|lyG;_EI7j-ILF)QvTymUO3R_^nTO`8gS8Ka98}0jgf5bLybvZHfD( zgQd@kKoZsfxnYteRr0M$4QZ^xp5!TER4Zpu={`)v$<>xk)!oV|&oK(}v7v$YuB6%2 zRoD}P4lae!k1D>mKRhR3S5~94@HN>+-qjdF_|b{JYg*m|Sy}4I7kI}o#w<<@;BO`= z^)~!i8L9kM?qkw8zcEg0?kn#-4P?wc3)(B$5~sZg-j{~3i_}8oe2zWc>kSl zD13A>t!c77lEfl?$<5h2ET4HE$ofhLw|&Hub8AuhVEpg z*?+tsjn5A_x4tqD-_l*43y(i9Vjd}=**OotR68OCKkwR^XD?(Xi;jBcKr4v3;fl8l z6@ZUBB4X0r9qnYr%;yr-y7AwU>(@lS$0-mqrW43ZmT5r`?oZqXi}Q=#iN7Kl>+AvI z|7R}vmL$_TlM8gwHRg$(;cGuHZ^BLFMappz?0BngIdmUl=$h~f;~|NOA;{(WK-Mox zgim8`Z<@b@1?_g6?gPeL)u&YXZlIARDckssvOpTol9obW{@ns$Ve z&ou-hs}(XSZ(8v=F1w5x?7C4-TJ9F9_=JfhRcM;KY*uwjlQtvB5~D#JM`tu{Ht=pYEp;1hH&0K-Z@09p)3;mm zPIz}d1z$4WX_FR1?tG@p_3X4)120!qTs2mKab35^-tD;VSN8s^IO6hd=grK`pIx`J zvG+Ov$w&%a;p^qS9{J(3T`nQNkt#0jqs_hkhun($1Ahy9s{x+KkoSj-1#+lQuBj^? zjJ&k)KKS-RX2)Mw%W3Oi>xS0KD`go;S zK=PzLDYN`!wp3O7WWBO(=HxTst53*xmzB^{#@qhHoelW!ThtvLA^WQME-}te!CL*H|`dspY8G z6u$rBCdWmd&%dP#!bY9uzbhSn`b}>DzTWjm!4NZfU|Lp#mh|+RgvW)rqVAdo_h+1@$yGvDbh!+`Y>@3P5r};pB zH$_MFPVYp9b%u@-O3L^$oktFuQ4ZW1PH27wGwdug#SZ+@I84 zveo2}O-&O{spbmZ_T-98^BGR%uPZ$cVlRIGN4w4j zvLcnxYxRMe4UPqH-InV6kl}}2xwE1%SpPHtL(N%3%4n|~_XSg^xd4`LsrJ@dU&skH z4=}Ux*LkslfIc&zA}+f5Ni_;!E?%msFhqqGj*;OHxA($@75phELuiZ~0p#=AcYT!mF=4ZnU-`z1TBH z#AXgOR@ZUO(T_~B>kS@5ECp0Rdp+$%563={O#|xydJH+R#CyxIx1K>v} z(*KmXZgsyXl{_G$f4RFW8%_2E`%`^FH`{J2d>ef5rdsO?OVP!Y*Q|GRrMix+=<kQB0kFC-)wy5vi;seVRnO(*|ayqu$tjjVJexoEa7|t_q5E;9P64+ ze|cL(OuYiAkF~7Ml!t9?OpnN;We!i4)wwAS2}}zD;C==4vG&~Ja>kd9nJw5|Oq-Okm8OXB8q zzGYKi41BVjSkTiW6J*tKa!EBUy~jn_)Jn>{g~Gz^u zL`!wfV?Ix9H|t^bWwpZgP3MR4m@HIOO(`#*CmAdDEy4Vt(I;V}eH~-l#0Yp3-m7$h z=XBinkKJLxPn)hS z=NnRbNrRCy{S1$hx%s@@=mB~(=4yR zHt`n2H&zC_aIK%#aaU<6<{kD&ZlXpTtIBaFUIP1%E|4RohNE)3qmRZ8s~M zwCtLyhWv%Siv7K7#lms7PjSW%&hcyIZ{^^jyKns?zfFF#ZBa#An5+i^>qpIePTGp? zmLJ|crsI~6@$LM9WOa#!*SP@`W2|*eBZ-ah<*~tc{s(u)nm2@#8e7joSDO&Q_I{@0 zMFEUM8X|Zb71r?Gl(7$@Ht!@0YtFKb58>($hRClPr&Q+_Llv6#yjv~iy%WiUs9ejE z@cMJF`cFn1SqGI#&6{qfr;}7kKy80BBd9-Qw10?$m#1Y1VS2V8&SrL+w(Mr!{0LBC z9}gt8>_>$ItT^WYm{%|2T-Z9P1{)4f4r|Jq4vJzFtl z@9;_iH2lMV9rd$Wr}nI)%y8bFa4t*e1$QV1kNQav^zt~A-#zT2`+Z&}^r|IHKm=x^ z3cF5&-53uSVXBFZ!)|N9*NqN(U=L>e%|AIGTZqa&YMh8uxZOqh``dBUF?sJyU@vId7)XsB4x zqTcX?+488^i$uH9LY1LH1~)Mni3ivt3r!iABxSz!}GyP zg&J{pEaR3x#NlHin5EEj<8dMQxTVi=6dJ5rR;d;o|9}~HMI^on99=J>)F^`F*Fesj zAv+8rThOpiG^9-oa;6YDUVsqDSEV&E5|94hGE{asb&VLItD4SqAZk* zsNF3&r~?m5{y2qO4&}g;^yPNa*;tCiM5t63;?LM9rLG7)Nb0mjn)xcKg){B6G+D3< z^_v`0e=W)o5^)WfW>TMee?GWpOM)Z6K5gs`V_VKBoq_0>!=Ct7X|YAYH8F+_w|g-dm%95|#)6HqU$vf_cL z3xw1Jk7V=uln6p%pdk#^h02sm(a1u*tk1e@m7cqnLcW;I!$ddHAZynUG+=mxDEf;>dOjhmwJW>13&Rb>EP=5RXzVVl4m+EPA&KUc%VCYz za_lEE$75qAMZ>2((7mF$7C`K_VJ@RS0e1||TgxT`bLJp<_pG;V~Za(0UZl z#T<5Q7FTROIyRqm5v#R;<#r|u>S2=O-<#23W+*=Ra5)9`?z)iH_9M^Dkj*?%pCEdCuO!ty@Sjir~q^Yfh zv075YQMx8uTCH2U=w3>OmCoTy%i2mOS4(jmc-A*re6cQmz#X3h!_)D2Y#Y8~6`#&Q zXp<$R=@OdU2}l^B4o`@0BT!Ze5gbIaED^3t#JdxNVZs;@zbTaa8XYs8sMo@^jb zPm*U($n#?53!3GN*5%8=<*V!D;cg|4fpW%4`Hon{u4cu)b;V(D1;DrBq@m($@?Q>) zfBp`@tIoV%>H5R>!l@c>X5}S%Wkp&rKS@?lyz2a;DsHbT8`UZiqag8YRk5im_RlJ* zY>C@ilS18i{E_| z0(tBesP6@lR0z~rHqr~BVDvqV5hi>jun|J(sZEV-P=J~i#A+-kJgCaZ$Sp!WG|^;(bYK&M0J*ZQ@-BqL9{c;0eQ&{R;mMWw)0rQ2x`M4|4zc%AM>U8QR+hC9f` z%P7D`{9OhlPQeQ$Tq~MgZQxZ8Mbv{x_1LNU+|&Ae@rFXJhGJ4B&(v>MhG~W3HFzUq zoDn7GLcJZm=0B$m5qnEzG1Vd2#t0-``Nc>yhP%m2 uAKX6G6#TQvR+7~CnHMs$(e%pAHE!yCYGd<)R?DJI%W_ByT3iqS(E2YekM9=% diff --git a/ledset/WpdPack_4_1_2/docs/html/ioctls_8h.html b/ledset/WpdPack_4_1_2/docs/html/ioctls_8h.html deleted file mode 100644 index 50bd03b..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/ioctls_8h.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - -WinPcap: ioctls.h File Reference - - - - - - -
-

ioctls.h File Reference

-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Defines

#define BIOCSETBUFFERSIZE   9592
 IOCTL code: set kernel buffer size.
#define BIOCSETF   9030
 IOCTL code: set packet filtering program.
#define BIOCGSTATS   9031
 IOCTL code: get the capture stats.
#define BIOCSRTIMEOUT   7416
 IOCTL code: set the read timeout.
#define BIOCSMODE   7412
 IOCTL code: set working mode.
#define BIOCSWRITEREP   7413
 IOCTL code: set number of physical repetions of every packet written by the app.
#define BIOCSMINTOCOPY   7414
 IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call.
#define BIOCSETOID   0x80000000
 IOCTL code: set an OID value.
#define BIOCQUERYOID   0x80000004
 IOCTL code: get an OID value.
#define BIOCSETDUMPFILENAME   9029
 IOCTL code: set the name of a the file used by kernel dump mode.
#define BIOCGEVNAME   7415
 IOCTL code: get the name of the event that the driver signals when some data is present in the buffer.
#define BIOCSENDPACKETSNOSYNC   9032
 IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps.
#define BIOCSENDPACKETSSYNC   9033
 IOCTL code: Send a buffer containing multiple packets to the network, considering the timestamps.
#define BIOCSETDUMPLIMITS   9034
 IOCTL code: Set the dump file limits.
#define BIOCISDUMPENDED   7411
 IOCTL code: Get the status of the kernel dump process.
#define BIOCISETLOBBEH   7410
 IOCTL code: set the loopback behavior.
#define BIOCSETEVENTHANDLE   7920
 This IOCTL passes the read event HANDLE allocated by the user (packet.dll) to kernel level.
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/ioctls_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/ioctls_8h_source.html deleted file mode 100644 index 68d2da6..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/ioctls_8h_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - -WinPcap: ioctls.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/jitter_8h.html b/ledset/WpdPack_4_1_2/docs/html/jitter_8h.html deleted file mode 100644 index 96912af..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/jitter_8h.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - -WinPcap: jitter.h File Reference - - - - - - -
-

jitter.h File Reference

-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  binary_stream
 A stream of X86 binary code. More...
struct  JIT_BPF_Filter
 Structure describing a x86 filtering program created by the jitter. More...

Defines

#define EAX   0
#define ECX   1
#define EDX   2
#define EBX   3
#define ESP   4
#define EBP   5
#define ESI   6
#define EDI   7
#define AX   0
#define CX   1
#define DX   2
#define BX   3
#define SP   4
#define BP   5
#define SI   6
#define DI   7
#define AL   0
#define CL   1
#define DL   2
#define BL   3
#define MOVid(r32, i32)   emitm(&stream, 11 << 4 | 1 << 3 | r32 & 0x7, 1); emitm(&stream, i32, 4);
 mov r32,i32
#define MOVrd(dr32, sr32)   emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
 mov dr32,sr32
#define MOVodd(dr32, sr32, off)
 mov dr32,sr32[off]
#define MOVobd(dr32, sr32, or32)
 mov dr32,sr32[or32]
#define MOVobw(dr32, sr32, or32)
 mov dr16,sr32[or32]
#define MOVobb(dr8, sr32, or32)
 mov dr8,sr32[or32]
#define MOVomd(dr32, or32, sr32)
 mov [dr32][or32],sr32
#define BSWAP(dr32)
 bswap dr32
#define SWAP_AX()
 xchg al,ah
#define PUSH(r32)   emitm(&stream, 5 << 4 | 0 << 3 | r32 & 0x7, 1);
 push r32
#define POP(r32)   emitm(&stream, 5 << 4 | 1 << 3 | r32 & 0x7, 1);
 pop r32
#define RET()   emitm(&stream, 12 << 4 | 0 << 3 | 3, 1);
 ret
#define ADDrd(dr32, sr32)
 add dr32,sr32
#define ADD_EAXi(i32)
 add eax,i32
#define ADDid(r32, i32)
 add r32,i32
#define ADDib(r32, i8)
 add r32,i8
#define SUBrd(dr32, sr32)
 sub dr32,sr32
#define SUB_EAXi(i32)
 sub eax,i32
#define MULrd(r32)
 mul r32
#define DIVrd(r32)
 div r32
#define ANDib(r8, i8)
 and r8,i8
#define ANDid(r32, i32)
 and r32,i32
#define ANDrd(dr32, sr32)
 and dr32,sr32
#define ORrd(dr32, sr32)
 or dr32,sr32
#define ORid(r32, i32)
 or r32,i32
#define SHLib(r32, i8)
 shl r32,i8
#define SHL_CLrb(dr32)
 shl dr32,cl
#define SHRib(r32, i8)
 shr r32,i8
#define SHR_CLrb(dr32)
 shr dr32,cl
#define NEGd(r32)
 neg r32
#define CMPodd(dr32, sr32, off)
 cmp dr32,sr32[off]
#define CMPrd(dr32, sr32)
 cmp dr32,sr32
#define CMPid(dr32, i32)
 cmp dr32,i32
#define JNEb(off8)
 jne off32
#define JE(off32)
 je off32
#define JLE(off32)
 jle off32
#define JLEb(off8)
 jle off8
#define JA(off32)
 ja off32
#define JAE(off32)
 jae off32
#define JG(off32)
 jg off32
#define JGE(off32)
 jge off32
#define JMP(off32)
 jmp off32

Typedefs

typedef UINT(__cdecl * BPF_filter_function )(PVOID *, ULONG, UINT)
 Prototype of a filtering function created by the jitter.
typedef void(* emit_func )(binary_stream *stream, ULONG value, UINT n)
 Prototype of the emit functions.

Functions

JIT_BPF_FilterBPF_jitter (struct bpf_insn *fp, INT nins)
 BPF jitter, builds an x86 function from a BPF program.
BPF_filter_function BPFtoX86 (struct bpf_insn *ins, UINT nins, INT *mem)
 Translates a set of BPF instructions in a set of x86 ones.
void BPF_Destroy_JIT_Filter (JIT_BPF_Filter *Filter)
 Deletes a filtering function that was previously created by BPF_jitter().
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/jitter_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/jitter_8h_source.html deleted file mode 100644 index 6a968ae..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/jitter_8h_source.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - -WinPcap: jitter.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/main.html b/ledset/WpdPack_4_1_2/docs/html/main.html deleted file mode 100644 index 78d64f4..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/main.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - -WinPcap: WinPcap Documentation - - - - - - -
-

WinPcap Documentation

4.1.2

-winpcap.gif -
- - -
-
Authors:
-
The WinPcap Team
-
Home page:
-
http://www.winpcap.org
-
-
- -

Modules

- - - - - - - - - - - - -
- -

Introduction

- - -

This Manual describes the -programming interface and the source code of WinPcap. It provides detailed -descriptions of the functions and structures exported to programmers, along -with complete documentation of the WinPcap internals. Several tutorials and -examples are provided as well.  - -

-

You can follow the links at the top of this page or use the tree control at -the left to reach sections of interest. - -

-

This documentation was created using the Doxygen documentation system, that can -be found at http://www.doxygen.org. - -

-

What is WinPcap

-

WinPcap is an open source library for packet capture and network analysis for -the Win32 platforms.

-

Most networking applications access the network through widely used operating -system primitives such as sockets.  It is easy to access data on the -network with this approach since the operating system copes with the low level -details (protocol handling, packet reassembly, etc.) and provides a familiar -interface that is similar to the one used to read and write files. - -

-

Sometimes, however, the 'easy way' is not up to the task, since some -applications require direct access to packets on the network.  That is, they -need access to the "raw" data on the network without the interposition of -protocol processing by the operating system.

-

The purpose of WinPcap is to give this kind of access to Win32 applications; -it provides facilities to:

-
    -
  • capture - raw packets, both the ones destined to the machine where it's running and - the ones exchanged by other hosts (on shared media)
  • -
  • filter - the packets according to user-specified rules before dispatching them to the - application
  • -
  • transmit raw packets to the network
  • -
  • gather statistical information on the network traffic
  • -
-

This set of capabilities is obtained by means of a device driver, that is -installed inside the networking portion of Win32 kernels, plus a couple of DLLs.

-

All these features are exported through a powerful programming interface, -easily exploitable by the applications and available on different OSes. The main -goal of this manual is to document this interface, with the help of several -examples.  If you are interested in starting your exploration right away -you can go directly to the WinPcap user's manual.

- -

What kind of programs use WinPcap

-

The WinPcap programming interface can be used by many types of network tools -for analysis, troubleshooting, security and -monitoring. In particular, classical tools that rely on WinPcap are:

- -
    -
  • network and protocol analyzers
  • -
  • network monitors
  • -
  • traffic loggers
  • -
  • traffic generators
  • -
  • user-level bridges and routers
  • -
  • network intrusion detection systems (NIDS)
  • -
  • network scanners
  • -
  • security tools
  • -
-

What WinPcap can't do

-

WinPcap receives and sends the packets independently from the host -protocols, like TCP-IP. This means that it isn't able to block, filter or -manipulate the traffic generated by other programs on the same machine: it -simply "sniffs" the packets that transit on the wire. Therefore, it does not -provide the appropriate support for applications like traffic shapers, QoS -schedulers and personal firewalls.

- -

Purpose of this manual

-

The purpose of this manual is to provide a comprehensive and easy way to -browse the documentation of the WinPcap architecture. You will find two main -sections: WinPcap user's manual and WinPcap Internals.

-

The first one can be used by a programmer who needs to exploit WinPcap from -an application: it contains all the information about functions and data -structures exported by the WinPcap API, a manual that explains how to write -packet filters and a page that explains how to include it in an application. A -tutorial with several code samples is provided as well; it can be used to learn -the basics of the WinPcap API using a step-by-step approach, but it also offers -code snippets that demonstrate advanced features.  

-

The second section is intended for WinPcap developers and maintainers, or for -people who are curious about how this system works: it provides a general -description of the WinPcap architecture and explains how it works. Additionally, -it documents the complete device driver structure, the source code, the packet.dll -interface and the low-level WinPcap API. -If you want to understand what happens inside WinPcap or if you need to extend -it, this is the section you will want to read.

-

Additional Documentation

-

For additional and up-to-date documentation, we suggest that you look at  http://www.winpcap.org/docs/ -

-

In particular, if you are interested in -the structure and the internals of WinPcap, we suggest reading the -following documents:

- - -

Terminology

-
    -
  • For consistency with the literature, we will use the term packet even - though frame is more accurate since the capture process is done at - the data-link layer and the data-link header is included in the captured - data.
  • -
  • The term Win9x will be used in this documentation to indicate the family of - Microsoft OSes made up of Windows 95 and its derivatives, i.e. Windows 98 and - Windows ME. The term WinNTx will indicate the OSes built upon the NT kernel, - starting from Windows NT 4 and including Windows 2000, Windows XP, - Windows Server 2003 and so on.
  • -
- -

Note

-

Our development and documentation efforts focus primarily on the -Windows NT/2000/XP/2003/Vista/2008/Win7/2008R2 version of WinPcap. This choice is based on the fact that the -majority of the WinPcap users work on NTx systems, but also because the 9x technology -has been abandoned by Microsoft. Moreover, we assume that a person who needs to -use a PC for an advanced task like network analysis will install an advanced OS -on the machine. For this reason, the documentation will refer to the WinNTx -drivers and APIs. Win9x versions are very similar in the concept but sometimes -differ in the implementation and, occasionally, the Win9x version of the API -lacks some of the more advanced functionality. This manual describes the -complete API and will indicate when a function is present only in Windows NTx.

- -

 

- - - - -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/main_8txt.html b/ledset/WpdPack_4_1_2/docs/html/main_8txt.html deleted file mode 100644 index 8309c12..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/main_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: main.txt File Reference - - - - - - -
-

main.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/modules.html b/ledset/WpdPack_4_1_2/docs/html/modules.html deleted file mode 100644 index 45eabfd..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/modules.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - -WinPcap: Module Index - - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/npf-dump.gif b/ledset/WpdPack_4_1_2/docs/html/npf-dump.gif deleted file mode 100644 index c24189c9a6b26ea52c99ec43c3de5dd91112f341..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4656 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 diff --git a/ledset/WpdPack_4_1_2/docs/html/npf-ndis.gif b/ledset/WpdPack_4_1_2/docs/html/npf-ndis.gif deleted file mode 100644 index 8c151bc4a2ce3f45077d46efb073b4c05ec42062..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3572 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 X`K&~ykWS|L$C;u`3(kN3t=|6t7iFk2 diff --git a/ledset/WpdPack_4_1_2/docs/html/npf-npf.gif b/ledset/WpdPack_4_1_2/docs/html/npf-npf.gif deleted file mode 100644 index 7f0e4bc90898b120e3a3d74225dc61d69c851c4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8463 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 - - - -WinPcap: Page Index - - - - - - -
-

Related Pages

Here is a list of all related documentation pages: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/pcap-remote_8h.html b/ledset/WpdPack_4_1_2/docs/html/pcap-remote_8h.html deleted file mode 100644 index 38a20d1..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/pcap-remote_8h.html +++ /dev/null @@ -1,626 +0,0 @@ - - - - -WinPcap: pcap-remote.h File Reference - - - - - - -
-

pcap-remote.h File Reference

#include "pcap.h"
-#include "sockutils.h"
- -

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  activehosts
 Keeps a list of all the opened connections in the active mode. More...
struct  rpcap_header
 Common header for all the RPCAP messages. More...
struct  rpcap_findalldevs_if
 Format of the message for the interface description (findalldevs command). More...
struct  rpcap_findalldevs_ifaddr
 Format of the message for the address listing (findalldevs command). More...
struct  rpcap_openreply
 Format of the message of the connection opening reply (open command). More...
struct  rpcap_startcapreq
 Format of the message that starts a remote capture (startcap command). More...
struct  rpcap_startcapreply
 Format of the reply message that devoted to start a remote capture (startcap reply command). More...
struct  rpcap_pkthdr
 Format of the header which encapsulates captured packets when transmitted on the network. More...
struct  rpcap_filter
 General header used for the pcap_setfilter() command; keeps just the number of BPF instructions. More...
struct  rpcap_filterbpf_insn
 Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header. More...
struct  rpcap_auth
 Structure that keeps the data required for the authentication on the remote host. More...
struct  rpcap_stats
 Structure that keeps the statistics about the number of packets captured, dropped, etc. More...
struct  rpcap_sampling
 Structure that is needed to set sampling parameters. More...

Defines

#define RPCAP_DEFAULT_NETPORT   "2002"
#define RPCAP_DEFAULT_NETPORT_ACTIVE   "2003"
#define RPCAP_DEFAULT_NETADDR   ""
#define RPCAP_VERSION   0
#define RPCAP_TIMEOUT_INIT   90
#define RPCAP_TIMEOUT_RUNTIME   180
#define RPCAP_ACTIVE_WAIT   30
#define RPCAP_SUSPEND_WRONGAUTH   1
#define RPCAP_NETBUF_SIZE   64000
 Buffer used by socket functions to send-receive packets. In case you plan to have messages larger than this value, you have to increase it.
#define RPCAP_HOSTLIST_SEP   " ,;\n\r"
 Separators used for the host list.
#define RPCAP_MSG_ERROR   1
#define RPCAP_MSG_FINDALLIF_REQ   2
#define RPCAP_MSG_OPEN_REQ   3
#define RPCAP_MSG_STARTCAP_REQ   4
#define RPCAP_MSG_UPDATEFILTER_REQ   5
#define RPCAP_MSG_CLOSE   6
#define RPCAP_MSG_PACKET   7
#define RPCAP_MSG_AUTH_REQ   8
#define RPCAP_MSG_STATS_REQ   9
#define RPCAP_MSG_ENDCAP_REQ   10
#define RPCAP_MSG_SETSAMPLING_REQ   11
#define RPCAP_MSG_FINDALLIF_REPLY   (128+RPCAP_MSG_FINDALLIF_REQ)
#define RPCAP_MSG_OPEN_REPLY   (128+RPCAP_MSG_OPEN_REQ)
#define RPCAP_MSG_STARTCAP_REPLY   (128+RPCAP_MSG_STARTCAP_REQ)
#define RPCAP_MSG_UPDATEFILTER_REPLY   (128+RPCAP_MSG_UPDATEFILTER_REQ)
#define RPCAP_MSG_AUTH_REPLY   (128+RPCAP_MSG_AUTH_REQ)
#define RPCAP_MSG_STATS_REPLY   (128+RPCAP_MSG_STATS_REQ)
#define RPCAP_MSG_ENDCAP_REPLY   (128+RPCAP_MSG_ENDCAP_REQ)
#define RPCAP_MSG_SETSAMPLING_REPLY   (128+RPCAP_MSG_SETSAMPLING_REQ)
#define RPCAP_STARTCAPREQ_FLAG_PROMISC   1
#define RPCAP_STARTCAPREQ_FLAG_DGRAM   2
#define RPCAP_STARTCAPREQ_FLAG_SERVEROPEN   4
#define RPCAP_STARTCAPREQ_FLAG_INBOUND   8
#define RPCAP_STARTCAPREQ_FLAG_OUTBOUND   16
#define RPCAP_UPDATEFILTER_BPF   1
#define PCAP_ERR_NETW   1
#define PCAP_ERR_INITTIMEOUT   2
#define PCAP_ERR_AUTH   3
#define PCAP_ERR_FINDALLIF   4
#define PCAP_ERR_NOREMOTEIF   5
#define PCAP_ERR_OPEN   6
#define PCAP_ERR_UPDATEFILTER   7
#define PCAP_ERR_GETSTATS   8
#define PCAP_ERR_READEX   9
#define PCAP_ERR_HOSTNOAUTH   10
#define PCAP_ERR_REMOTEACCEPT   11
#define PCAP_ERR_STARTCAPTURE   12
#define PCAP_ERR_ENDCAPTURE   13
#define PCAP_ERR_RUNTIMETIMEOUT   14
#define PCAP_ERR_SETSAMPLING   15
#define PCAP_ERR_WRONGMSG   16
#define PCAP_ERR_WRONGVER   17

Typedefs

typedef unsigned char uint8
 Provides an 8-bits unsigned integer.
typedef unsigned short uint16
 Provides a 16-bits unsigned integer.
typedef unsigned int uint32
 Provides a 32-bits unsigned integer.
typedef int int32
 Provides a 32-bits integer.

Functions

int pcap_opensource_remote (pcap_t *p, struct pcap_rmtauth *auth)
int pcap_startcapture_remote (pcap_t *fp)
int pcap_read_nocb_remote (pcap_t *p, struct pcap_pkthdr **pkt_header, u_char **pkt_data)
int pcap_read_remote (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
int pcap_updatefilter_remote (pcap_t *fp, struct bpf_program *prog)
int pcap_setfilter_remote (pcap_t *fp, struct bpf_program *prog)
int pcap_stats_remote (pcap_t *p, struct pcap_stat *ps)
int pcap_setsampling_remote (pcap_t *p)
struct pcap_statpcap_stats_ex_remote (pcap_t *p)
void pcap_cleanup_remote (pcap_t *p)
void rpcap_createhdr (struct rpcap_header *header, uint8 type, uint16 value, uint32 length)
int rpcap_deseraddr (struct sockaddr_storage *sockaddrin, struct sockaddr_storage **sockaddrout, char *errbuf)
int rpcap_checkmsg (char *errbuf, SOCKET sock, struct rpcap_header *header, uint8 first,...)
int rpcap_senderror (SOCKET sock, char *error, unsigned short errcode, char *errbuf)
int rpcap_sendauth (SOCKET sock, struct pcap_rmtauth *auth, char *errbuf)
int rpcap_remoteact_getsock (const char *host, char *errbuf)
-

Detailed Description

-

This file keeps all the new definitions and typedefs that are exported to the user and that are needed for the RPCAP protocol.

-
Warning:
All the RPCAP functions that are allowed to return a buffer containing the error description can return max PCAP_ERRBUF_SIZE characters. However there is no guarantees that the string will be zero-terminated. Best practice is to define the errbuf variable as a char of size 'PCAP_ERRBUF_SIZE+1' and to insert manually the termination char at the end of the buffer. This will guarantee that no buffer overflows occur even if we use the printf() to show the error on the screen.
-
-This file declares some typedefs that MUST be of a specific size. These definitions (i.e. typedefs) could need to be changed on other platforms than Intel IA32.
-
-This file defines some structures that are used to transfer data on the network. Be careful that you compiler MUST not insert padding into these structures for better alignment. These structures have been created in order to be correctly aligned to a 32 bits boundary, but be careful in any case.
- -

Definition in file pcap-remote.h.

-

Function Documentation

- -
-
- - - - - - - - - -
void pcap_cleanup_remote (pcap_t p ) 
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_opensource_remote (pcap_t p,
struct pcap_rmtauth auth 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_read_nocb_remote (pcap_t p,
struct pcap_pkthdr **  pkt_header,
u_char **  pkt_data 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_read_remote (pcap_t p,
int  cnt,
pcap_handler  callback,
u_char *  user 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setfilter_remote (pcap_t fp,
struct bpf_program *  prog 
)
-
-
- -
-
- -
-
- - - - - - - - - -
int pcap_setsampling_remote (pcap_t p ) 
-
-
- -
-
- -
-
- - - - - - - - - -
int pcap_startcapture_remote (pcap_t fp ) 
-
-
- -
-
- -
-
- - - - - - - - - -
struct pcap_stat* pcap_stats_ex_remote (pcap_t p )  [read]
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_stats_remote (pcap_t p,
struct pcap_stat ps 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_updatefilter_remote (pcap_t fp,
struct bpf_program *  prog 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int rpcap_checkmsg (char *  errbuf,
SOCKET  sock,
struct rpcap_header header,
uint8  first,
  ... 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void rpcap_createhdr (struct rpcap_header header,
uint8  type,
uint16  value,
uint32  length 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int rpcap_deseraddr (struct sockaddr_storage *  sockaddrin,
struct sockaddr_storage **  sockaddrout,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int rpcap_remoteact_getsock (const char *  host,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int rpcap_sendauth (SOCKET  sock,
struct pcap_rmtauth auth,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int rpcap_senderror (SOCKET  sock,
char *  error,
unsigned short  errcode,
char *  errbuf 
)
-
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/pcap-remote_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/pcap-remote_8h_source.html deleted file mode 100644 index c7b2293..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/pcap-remote_8h_source.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - -WinPcap: pcap-remote.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/remote-ext_8h.html b/ledset/WpdPack_4_1_2/docs/html/remote-ext_8h.html deleted file mode 100644 index 0d01c0f..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/remote-ext_8h.html +++ /dev/null @@ -1,444 +0,0 @@ - - - - -WinPcap: remote-ext.h File Reference - - - - - - -
-

remote-ext.h File Reference

-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  pcap_rmtauth
 This structure keeps the information needed to autheticate the user on a remote machine. More...
struct  pcap_samp
 This structure defines the information related to sampling. More...

Defines

#define PCAP_BUF_SIZE   1024
 Defines the maximum buffer size in which address, port, interface names are kept.
#define PCAP_SRC_FILE   2
 Internal representation of the type of source in use (file, remote/local interface).
#define PCAP_SRC_IFLOCAL   3
 Internal representation of the type of source in use (file, remote/local interface).
#define PCAP_SRC_IFREMOTE   4
 Internal representation of the type of source in use (file, remote/local interface).
#define PCAP_SRC_FILE_STRING   "file://"
 String that will be used to determine the type of source in use (file, remote/local interface).
#define PCAP_SRC_IF_STRING   "rpcap://"
 String that will be used to determine the type of source in use (file, remote/local interface).
#define PCAP_OPENFLAG_PROMISCUOUS   1
 Defines if the adapter has to go in promiscuous mode.
#define PCAP_OPENFLAG_DATATX_UDP   2
 Defines if the data trasfer (in case of a remote capture) has to be done with UDP protocol.
#define PCAP_OPENFLAG_NOCAPTURE_RPCAP   4
 Defines if the remote probe will capture its own generated traffic.
#define PCAP_OPENFLAG_NOCAPTURE_LOCAL   8
 Defines if the local adapter will capture its own generated traffic.
#define PCAP_OPENFLAG_MAX_RESPONSIVENESS   16
 This flag configures the adapter for maximum responsiveness.
#define PCAP_SAMP_NOSAMP   0
 No sampling has to be done on the current capture.
#define PCAP_SAMP_1_EVERY_N   1
 It defines that only 1 out of N packets must be returned to the user.
#define PCAP_SAMP_FIRST_AFTER_N_MS   2
 It defines that we have to return 1 packet every N milliseconds.
#define RPCAP_RMTAUTH_NULL   0
 It defines the NULL authentication.
#define RPCAP_RMTAUTH_PWD   1
 It defines the username/password authentication.
#define RPCAP_HOSTLIST_SIZE   1024
 Maximum lenght of an host name (needed for the RPCAP active mode).

Functions

New WinPcap functions

This section lists the new functions that are able to help considerably in writing WinPcap programs because of their easiness of use.

-

pcap_tpcap_open (const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
int pcap_createsrcstr (char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
int pcap_parsesrcstr (const char *source, int *type, char *host, char *port, char *name, char *errbuf)
int pcap_findalldevs_ex (char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
struct pcap_samppcap_setsampling (pcap_t *p)
Remote Capture functions

-

SOCKET pcap_remoteact_accept (const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
int pcap_remoteact_list (char *hostlist, char sep, int size, char *errbuf)
int pcap_remoteact_close (const char *host, char *errbuf)
void pcap_remoteact_cleanup ()
-

Detailed Description

-

The goal of this file it to include most of the new definitions that should be placed into the pcap.h file.

-

It includes all new definitions (structures and functions like pcap_open(). Some of the functions are not really a remote feature, but, right now, they are placed here.

- -

Definition in file remote-ext.h.

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_createsrcstr (char *  source,
int  type,
const char *  host,
const char *  port,
const char *  name,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_findalldevs_ex (char *  source,
struct pcap_rmtauth auth,
pcap_if_t **  alldevs,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pcap_t* pcap_open (const char *  source,
int  snaplen,
int  flags,
int  read_timeout,
struct pcap_rmtauth auth,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_parsesrcstr (const char *  source,
int *  type,
char *  host,
char *  port,
char *  name,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SOCKET pcap_remoteact_accept (const char *  address,
const char *  port,
const char *  hostlist,
char *  connectinghost,
struct pcap_rmtauth auth,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - -
void pcap_remoteact_cleanup ( ) 
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_remoteact_close (const char *  host,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_remoteact_list (char *  hostlist,
char  sep,
int  size,
char *  errbuf 
)
-
-
- -
-
- -
-
- - - - - - - - - -
struct pcap_samp* pcap_setsampling (pcap_t p )  [read]
-
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/remote-ext_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/remote-ext_8h_source.html deleted file mode 100644 index e0052f8..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/remote-ext_8h_source.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - -WinPcap: remote-ext.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/rpcapd_8h.html b/ledset/WpdPack_4_1_2/docs/html/rpcapd_8h.html deleted file mode 100644 index ba50c11..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/rpcapd_8h.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - -WinPcap: rpcapd.h File Reference - - - - - - -
-

rpcapd.h File Reference

-

Go to the source code of this file.

- - - - - - - - - - - - -

Data Structures

struct  active_pars

Defines

#define PROGRAM_NAME   "rpcapd"
#define MAX_LINE   2048
#define SOCKET_MAXCONN   10
#define MAX_HOST_LIST   64000
#define MAX_ACTIVE_LIST   10

Functions

void main_startup (void)
void main_cleanup (int sign)
-

Define Documentation

- -
-
- - - - -
#define MAX_ACTIVE_LIST   10
-
-
- -

Definition at line 41 of file rpcapd.h.

- -
-
- -
-
- - - - -
#define MAX_HOST_LIST   64000
-
-
- -

Definition at line 40 of file rpcapd.h.

- -
-
- -
-
- - - - -
#define MAX_LINE   2048
-
-
- -

Definition at line 38 of file rpcapd.h.

- -
-
- -
-
- - - - -
#define PROGRAM_NAME   "rpcapd"
-
-
- -

Definition at line 37 of file rpcapd.h.

- -
-
- -
-
- - - - -
#define SOCKET_MAXCONN   10
-
-
- -

Definition at line 39 of file rpcapd.h.

- -
-
-

Function Documentation

- -
-
- - - - - - - - - -
void main_cleanup (int  sign ) 
-
-
- -
-
- -
-
- - - - - - - - - -
void main_startup (void  ) 
-
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/rpcapd_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/rpcapd_8h_source.html deleted file mode 100644 index eaa95e6..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/rpcapd_8h_source.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - -WinPcap: rpcapd.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/stats.gif b/ledset/WpdPack_4_1_2/docs/html/stats.gif deleted file mode 100644 index 5c44ba356944837b2622bb2ebbd231ecb326c9d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5431 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 diff --git a/ledset/WpdPack_4_1_2/docs/html/stats_wpcap.gif b/ledset/WpdPack_4_1_2/docs/html/stats_wpcap.gif deleted file mode 100644 index f65263185cae5433b2e49e312c3515f6ab39ae4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5267 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 diff --git a/ledset/WpdPack_4_1_2/docs/html/structJIT__BPF__Filter.html b/ledset/WpdPack_4_1_2/docs/html/structJIT__BPF__Filter.html deleted file mode 100644 index d0736f6..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structJIT__BPF__Filter.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - -WinPcap: JIT_BPF_Filter Struct Reference - - - - - - -
-

JIT_BPF_Filter Struct Reference
- -[NPF Just-in-time compiler definitions] -

-

Structure describing a x86 filtering program created by the jitter. -More...

- -

#include <jitter.h>

- - - - - -

Data Fields

BPF_filter_function Function
 The x86 filtering binary, in the form of a BPF_filter_function.
PINT mem
-

Detailed Description

-

Structure describing a x86 filtering program created by the jitter.

- -

Definition at line 95 of file jitter.h.

-

Field Documentation

- -
- -
- -

The x86 filtering binary, in the form of a BPF_filter_function.

- -

Definition at line 96 of file jitter.h.

- -
-
- -
-
- - - - -
PINT mem
-
-
- -

Definition at line 97 of file jitter.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structPacketHeader.html b/ledset/WpdPack_4_1_2/docs/html/structPacketHeader.html deleted file mode 100644 index b89aef3..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structPacketHeader.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - -WinPcap: PacketHeader Struct Reference - - - - - - -
-

PacketHeader Struct Reference
- -[NPF structures and definitions] -

-

Structure prepended to each packet in the kernel buffer pool. -More...

- -

#include <Packet.h>

- - - - - - -

Data Fields

ULONG SN
 Sequence number of the packet.
struct bpf_hdr header
 bpf header, created by the tap, and copied unmodified to user level programs.
-

Detailed Description

-

Structure prepended to each packet in the kernel buffer pool.

-

Each packet in one of the kernel buffers is prepended by this header. It encapsulates the bpf_header, which will be passed to user level programs, as well as the sequence number of the packet, set by the producer (the tap function), and used by the consumer (the read function) to "reorder" the packets contained in the various kernel buffers.

- -

Definition at line 341 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
struct bpf_hdr header [read]
-
-
- -

bpf header, created by the tap, and copied unmodified to user level programs.

- -

Definition at line 344 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG SN
-
-
- -

Sequence number of the packet.

- -

Definition at line 343 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/struct__DEVICE__EXTENSION.html b/ledset/WpdPack_4_1_2/docs/html/struct__DEVICE__EXTENSION.html deleted file mode 100644 index 6896fb8..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/struct__DEVICE__EXTENSION.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -WinPcap: _DEVICE_EXTENSION Struct Reference - - - - - - -
-

_DEVICE_EXTENSION Struct Reference
- -[NPF structures and definitions] -

-

Port device extension. -More...

- -

#include <Packet.h>

- - - - - -

Data Fields

NDIS_STRING AdapterName
 Name of the adapter.
PWSTR ExportString
-

Detailed Description

-

Port device extension.

-

Structure containing some data relative to every adapter on which NPF is bound.

- -

Definition at line 196 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
NDIS_STRING AdapterName
-
-
- -

Name of the adapter.

- -

Definition at line 197 of file Packet.h.

- -
-
- -
-
- - - - -
PWSTR ExportString
-
-
-

Name of the exported device, i.e. name that the applications will use to open this adapter through WinPcap.

- -

Definition at line 198 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/struct__INTERNAL__REQUEST.html b/ledset/WpdPack_4_1_2/docs/html/struct__INTERNAL__REQUEST.html deleted file mode 100644 index dc12df9..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/struct__INTERNAL__REQUEST.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - -WinPcap: _INTERNAL_REQUEST Struct Reference - - - - - - -
-

_INTERNAL_REQUEST Struct Reference
- -[NPF structures and definitions] -

-

Stores an OID request. -More...

- -

#include <Packet.h>

- - - - - - - - -

Data Fields

LIST_ENTRY ListElement
 Used to handle lists of requests.
NDIS_EVENT InternalRequestCompletedEvent
NDIS_REQUEST Request
 The structure with the actual request, that will be passed to NdisRequest().
NDIS_STATUS RequestStatus
-

Detailed Description

-

Stores an OID request.

-

This structure is used by the driver to perform OID query or set operations on the underlying NIC driver. The OID operations be performed usually only by network drivers, but NPF exports this mechanism to user-level applications through an IOCTL interface. The driver uses this structure to wrap a NDIS_REQUEST structure. This allows to handle correctly the callback structure of NdisRequest(), handling multiple requests and maintaining information about the IRPs to complete.

- -

Definition at line 163 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
NDIS_EVENT InternalRequestCompletedEvent
-
-
- -

Definition at line 167 of file Packet.h.

- -
-
- -
-
- - - - -
LIST_ENTRY ListElement
-
-
- -

Used to handle lists of requests.

- -

Definition at line 164 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_REQUEST Request
-
-
- -

The structure with the actual request, that will be passed to NdisRequest().

- -

Definition at line 168 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_STATUS RequestStatus
-
-
- -

Definition at line 169 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/struct__OPEN__INSTANCE.html b/ledset/WpdPack_4_1_2/docs/html/struct__OPEN__INSTANCE.html deleted file mode 100644 index bdb2669..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/struct__OPEN__INSTANCE.html +++ /dev/null @@ -1,978 +0,0 @@ - - - - -WinPcap: _OPEN_INSTANCE Struct Reference - - - - - - -
-

_OPEN_INSTANCE Struct Reference
- -[NPF structures and definitions] -

-

Contains the state of a running instance of the NPF driver. -More...

- -

#include <Packet.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Fields

PDEVICE_EXTENSION DeviceExtension
NDIS_HANDLE AdapterHandle
 NDIS idetifier of the adapter used by this instance.
UINT Medium
NDIS_HANDLE PacketPool
 Pool of NDIS_PACKET structures used to transfer the packets from and to the NIC driver.
KSPIN_LOCK RequestSpinLock
 SpinLock used to synchronize the OID requests.
LIST_ENTRY RequestList
 List of pending OID requests.
LIST_ENTRY ResetIrpList
 List of pending adapter reset requests.
INTERNAL_REQUEST Requests [MAX_REQUESTS]
 Array of structures that wrap every single OID request.
PMDL BufferMdl
 Pointer to a Memory descriptor list (MDL) that maps the circular buffer's memory.
PKEVENT ReadEvent
 Pointer to the event on which the read calls on this instance must wait.
PUCHAR bpfprogram
UINT MinToCopy
LARGE_INTEGER TimeOut
int mode
 Working mode of the driver. See PacketSetMode() for details.
LARGE_INTEGER Nbytes
 Amount of bytes accepted by the filter when this instance is in statistical mode.
LARGE_INTEGER Npackets
 Number of packets accepted by the filter when this instance is in statistical mode.
NDIS_SPIN_LOCK CountersLock
 SpinLock that protects the statistical mode counters.
UINT Nwrites
ULONG Multiple_Write_Counter
 Counts the number of times a single write has already physically repeated.
NDIS_EVENT WriteEvent
 Event used to synchronize the multiple write process.
BOOLEAN WriteInProgress
NDIS_SPIN_LOCK WriteLock
 SpinLock that protects the WriteInProgress variable.
NDIS_EVENT NdisRequestEvent
 Event used to synchronize I/O requests with the callback structure of NDIS.
BOOLEAN SkipSentPackets
 True if this instance should not capture back the packets that it transmits.
NDIS_STATUS IOStatus
 Maintains the status of and OID request call, that will be passed to the application.
HANDLE DumpFileHandle
 Handle of the file used in dump mode.
PFILE_OBJECT DumpFileObject
 Pointer to the object of the file used in dump mode.
PKTHREAD DumpThreadObject
 Pointer to the object of the thread used in dump mode.
HANDLE DumpThreadHandle
 Handle of the thread created by dump mode to asynchronously move the buffer to disk.
NDIS_EVENT DumpEvent
 Event used to synchronize the dump thread with the tap when the instance is in dump mode.
LARGE_INTEGER DumpOffset
 Current offset in the dump file.
UNICODE_STRING DumpFileName
 String containing the name of the dump file.
UINT MaxDumpBytes
UINT MaxDumpPacks
BOOLEAN DumpLimitReached
NDIS_SPIN_LOCK MachineLock
 SpinLock that protects the BPF filter and the TME engine, if in use.
UINT MaxFrameSize
CpuPrivateData CpuData [sizeof(KAFFINITY)*8]
 Pool of kernel buffer structures, one for each CPU.
ULONG ReaderSN
 Sequence number of the next packet to be read from the pool of kernel buffers.
ULONG WriterSN
ULONG Size
 Size of each kernel buffer contained in the CpuData field.
ULONG AdapterHandleUsageCounter
NDIS_SPIN_LOCK AdapterHandleLock
ULONG AdapterBindingStatus
 Specifies if NPF is still bound to the adapter used by this instance, it's unbinding or it's not bound.
NDIS_EVENT NdisOpenCloseCompleteEvent
NDIS_EVENT NdisWriteCompleteEvent
 Event that is signalled when all the packets have been successfully sent by NdisSend (and corresponfing sendComplete has been called).
NTSTATUS OpenCloseStatus
ULONG TransmitPendingPackets
 Specifies the number of packets that are pending to be transmitted, i.e. have been submitted to NdisSendXXX but the SendComplete has not been called yet.
ULONG NumPendingIrps
BOOLEAN ClosePending
NDIS_SPIN_LOCK OpenInUseLock
-

Detailed Description

-

Contains the state of a running instance of the NPF driver.

-

This is the most important structure of NPF: it is used by almost all the functions of the driver. An _OPEN_INSTANCE structure is associated with every user-level session, allowing concurrent access to the driver.

- -

Definition at line 240 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
ULONG AdapterBindingStatus
-
-
- -

Specifies if NPF is still bound to the adapter used by this instance, it's unbinding or it's not bound.

- -

Definition at line 315 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_HANDLE AdapterHandle
-
-
- -

NDIS idetifier of the adapter used by this instance.

- -

Definition at line 244 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK AdapterHandleLock
-
-
- -

Definition at line 314 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG AdapterHandleUsageCounter
-
-
- -

Definition at line 313 of file Packet.h.

- -
-
- -
-
- - - - -
PUCHAR bpfprogram
-
-
-

Pointer to the filtering pseudo-code associated with current instance of the driver. This code is used only in particular situations (for example when the packet received from the NIC driver is stored in two non-consecutive buffers. In normal situations the filtering routine created by the JIT compiler and pointed by the next field is used. See NPF driver internals manual for details on the filtering process.

- -

Definition at line 254 of file Packet.h.

- -
-
- -
-
- - - - -
PMDL BufferMdl
-
-
- -

Pointer to a Memory descriptor list (MDL) that maps the circular buffer's memory.

- -

Definition at line 252 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN ClosePending
-
-
- -

Definition at line 322 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK CountersLock
-
-
- -

SpinLock that protects the statistical mode counters.

- -

Definition at line 271 of file Packet.h.

- -
-
- -
-
- - - - -
CpuPrivateData CpuData[sizeof(KAFFINITY)*8]
-
-
- -

Pool of kernel buffer structures, one for each CPU.

- -

Definition at line 308 of file Packet.h.

- -
-
- -
- -
-

Pointer to the _DEVICE_EXTENSION structure of the device on which the instance is bound.

- -

Definition at line 242 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT DumpEvent
-
-
- -

Event used to synchronize the dump thread with the tap when the instance is in dump mode.

- -

Definition at line 286 of file Packet.h.

- -
-
- -
-
- - - - -
HANDLE DumpFileHandle
-
-
- -

Handle of the file used in dump mode.

- -

Definition at line 282 of file Packet.h.

- -
-
- -
-
- - - - -
UNICODE_STRING DumpFileName
-
-
- -

String containing the name of the dump file.

- -

Definition at line 288 of file Packet.h.

- -
-
- -
-
- - - - -
PFILE_OBJECT DumpFileObject
-
-
- -

Pointer to the object of the file used in dump mode.

- -

Definition at line 283 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN DumpLimitReached
-
-
-

TRUE if the maximum dimension of the dump file (MaxDumpBytes or MaxDumpPacks) is reached.

- -

Definition at line 294 of file Packet.h.

- -
-
- -
-
- - - - -
LARGE_INTEGER DumpOffset
-
-
- -

Current offset in the dump file.

- -

Definition at line 287 of file Packet.h.

- -
-
- -
-
- - - - -
HANDLE DumpThreadHandle
-
-
- -

Handle of the thread created by dump mode to asynchronously move the buffer to disk.

- -

Definition at line 285 of file Packet.h.

- -
-
- -
-
- - - - -
PKTHREAD DumpThreadObject
-
-
- -

Pointer to the object of the thread used in dump mode.

- -

Definition at line 284 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_STATUS IOStatus
-
-
- -

Maintains the status of and OID request call, that will be passed to the application.

- -

Definition at line 281 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK MachineLock
-
-
- -

SpinLock that protects the BPF filter and the TME engine, if in use.

- -

Definition at line 301 of file Packet.h.

- -
-
- -
-
- - - - -
UINT MaxDumpBytes
-
-
-

Maximum dimension in bytes of the dump file. If the dump file reaches this size it will be closed. A value of 0 means unlimited size.

- -

Definition at line 289 of file Packet.h.

- -
-
- -
-
- - - - -
UINT MaxDumpPacks
-
-
-

Maximum number of packets that will be saved in the dump file. If this number of packets is reached the dump will be closed. A value of 0 means unlimited number of packets.

- -

Definition at line 291 of file Packet.h.

- -
-
- -
-
- - - - -
UINT MaxFrameSize
-
-
-

Maximum frame size that the underlying MAC acceptes. Used to perform a check on the size of the frames sent with NPF_Write() or NPF_BufferedWrite().

- -

Definition at line 302 of file Packet.h.

- -
-
- -
-
- - - - -
UINT Medium
-
-
-

Type of physical medium the underlying NDIS driver uses. See the documentation of NdisOpenAdapter in the MS DDK for details.

- -

Definition at line 245 of file Packet.h.

- -
-
- -
-
- - - - -
UINT MinToCopy
-
-
-

Minimum amount of data in the circular buffer that unlocks a read. Set with the BIOCSMINTOCOPY IOCTL.

- -

Definition at line 263 of file Packet.h.

- -
-
- -
-
- - - - -
int mode
-
-
- -

Working mode of the driver. See PacketSetMode() for details.

- -

Definition at line 268 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Multiple_Write_Counter
-
-
- -

Counts the number of times a single write has already physically repeated.

- -

Definition at line 274 of file Packet.h.

- -
-
- -
-
- - - - -
LARGE_INTEGER Nbytes
-
-
- -

Amount of bytes accepted by the filter when this instance is in statistical mode.

- -

Definition at line 269 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT NdisOpenCloseCompleteEvent
-
-
- -

Definition at line 317 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT NdisRequestEvent
-
-
- -

Event used to synchronize I/O requests with the callback structure of NDIS.

- -

Definition at line 279 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT NdisWriteCompleteEvent
-
-
- -

Event that is signalled when all the packets have been successfully sent by NdisSend (and corresponfing sendComplete has been called).

- -

Definition at line 318 of file Packet.h.

- -
-
- -
-
- - - - -
LARGE_INTEGER Npackets
-
-
- -

Number of packets accepted by the filter when this instance is in statistical mode.

- -

Definition at line 270 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG NumPendingIrps
-
-
- -

Definition at line 321 of file Packet.h.

- -
-
- -
-
- - - - -
UINT Nwrites
-
-
-

Number of times a single write must be physically repeated. See NPF driver internals manual for an explanation

- -

Definition at line 272 of file Packet.h.

- -
-
- -
-
- - - - -
NTSTATUS OpenCloseStatus
-
-
- -

Definition at line 319 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK OpenInUseLock
-
-
- -

Definition at line 323 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_HANDLE PacketPool
-
-
- -

Pool of NDIS_PACKET structures used to transfer the packets from and to the NIC driver.

- -

Definition at line 247 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG ReaderSN
-
-
- -

Sequence number of the next packet to be read from the pool of kernel buffers.

- -

Definition at line 309 of file Packet.h.

- -
-
- -
-
- - - - -
PKEVENT ReadEvent
-
-
- -

Pointer to the event on which the read calls on this instance must wait.

- -

Definition at line 253 of file Packet.h.

- -
-
- -
-
- - - - -
LIST_ENTRY RequestList
-
-
- -

List of pending OID requests.

- -

Definition at line 249 of file Packet.h.

- -
-
- -
-
- - - - -
INTERNAL_REQUEST Requests[MAX_REQUESTS]
-
-
- -

Array of structures that wrap every single OID request.

- -

Definition at line 251 of file Packet.h.

- -
-
- -
-
- - - - -
KSPIN_LOCK RequestSpinLock
-
-
- -

SpinLock used to synchronize the OID requests.

- -

Definition at line 248 of file Packet.h.

- -
-
- -
-
- - - - -
LIST_ENTRY ResetIrpList
-
-
- -

List of pending adapter reset requests.

- -

Definition at line 250 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Size
-
-
- -

Size of each kernel buffer contained in the CpuData field.

- -

Definition at line 312 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN SkipSentPackets
-
-
- -

True if this instance should not capture back the packets that it transmits.

- -

Definition at line 280 of file Packet.h.

- -
-
- -
-
- - - - -
LARGE_INTEGER TimeOut
-
-
-

Timeout after which a read is released, also if the amount of data in the buffer is less than MinToCopy. Set with the BIOCSRTIMEOUT IOCTL.

- -

Definition at line 265 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG TransmitPendingPackets
-
-
- -

Specifies the number of packets that are pending to be transmitted, i.e. have been submitted to NdisSendXXX but the SendComplete has not been called yet.

- -

Definition at line 320 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT WriteEvent
-
-
- -

Event used to synchronize the multiple write process.

- -

Definition at line 275 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN WriteInProgress
-
-
-

True if a write is currently in progress. NPF currently allows a single wite on the same open instance.

- -

Definition at line 276 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK WriteLock
-
-
- -

SpinLock that protects the WriteInProgress variable.

- -

Definition at line 278 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG WriterSN
-
-
-

Sequence number of the next packet to be written in the pool of kernel buffers. These two sequence numbers are unique for each capture instance.

- -

Definition at line 310 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/struct__PACKET__OID__DATA.html b/ledset/WpdPack_4_1_2/docs/html/struct__PACKET__OID__DATA.html deleted file mode 100644 index 75c2a30..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/struct__PACKET__OID__DATA.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - -WinPcap: _PACKET_OID_DATA Struct Reference - - - - - - -
-

_PACKET_OID_DATA Struct Reference
- -[NPF structures and definitions] -

-

Structure containing an OID request. -More...

- -

#include <Packet.h>

- - - - - - -

Data Fields

ULONG Oid
ULONG Length
 Length of the data field.
UCHAR Data [1]
-

Detailed Description

-

Structure containing an OID request.

-

It is used by the PacketRequest() function to send an OID to the interface card driver. It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, the list of the multicast groups defined on it, and so on.

- -

Definition at line 143 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
UCHAR Data[1]
-
-
-

variable-lenght field that contains the information passed to or received from the adapter.

- -

Definition at line 147 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Length
-
-
- -

Length of the data field.

- -

Definition at line 146 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Oid
-
-
-

OID code. See the Microsoft DDK documentation or the file ntddndis.h for a complete list of valid codes.

- -

Definition at line 144 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/struct__PACKET__RESERVED.html b/ledset/WpdPack_4_1_2/docs/html/struct__PACKET__RESERVED.html deleted file mode 100644 index 6fe0825..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/struct__PACKET__RESERVED.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - -WinPcap: _PACKET_RESERVED Struct Reference - - - - - - -
-

_PACKET_RESERVED Struct Reference
- -[NPF structures and definitions] -

-

Contains a NDIS packet. -More...

- -

#include <Packet.h>

- - - - - - - - - - - -

Data Fields

LIST_ENTRY ListElement
 Used to handle lists of packets.
PIRP Irp
 Irp that performed the request.
PMDL pMdl
 MDL mapping the buffer of the packet.
BOOLEAN FreeBufAfterWrite
ULONG Cpu
 The CPU on which the packet was pulled out of the linked list of free packets.
-

Detailed Description

-

Contains a NDIS packet.

-

The driver uses this structure to wrap a NDIS_PACKET structure. This allows to handle correctly the callback structure of NdisTransferData(), handling multiple requests and maintaining information about the IRPs to complete.

- -

Definition at line 180 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
ULONG Cpu
-
-
- -

The CPU on which the packet was pulled out of the linked list of free packets.

- -

Definition at line 186 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN FreeBufAfterWrite
-
-
-

True if the memory buffer associated with the packet must be freed after a call to NdisSend().

- -

Definition at line 184 of file Packet.h.

- -
-
- -
-
- - - - -
PIRP Irp
-
-
- -

Irp that performed the request.

- -

Definition at line 182 of file Packet.h.

- -
-
- -
-
- - - - -
LIST_ENTRY ListElement
-
-
- -

Used to handle lists of packets.

- -

Definition at line 181 of file Packet.h.

- -
-
- -
-
- - - - -
PMDL pMdl
-
-
- -

MDL mapping the buffer of the packet.

- -

Definition at line 183 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/struct____CPU__Private__Data.html b/ledset/WpdPack_4_1_2/docs/html/struct____CPU__Private__Data.html deleted file mode 100644 index 75b690b..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/struct____CPU__Private__Data.html +++ /dev/null @@ -1,257 +0,0 @@ - - - - -WinPcap: __CPU_Private_Data Struct Reference - - - - - - -
-

__CPU_Private_Data Struct Reference
- -[NPF structures and definitions] -

-

Kernel buffer of each CPU. -More...

- -

#include <Packet.h>

- - - - - - - - - - - - - - - - - - - - - -

Data Fields

ULONG P
 Zero-based index of the producer in the buffer. It indicates the first free byte to be written.
ULONG C
 Zero-based index of the consumer in the buffer. It indicates the first free byte to be read.
ULONG Free
 Number of the free bytes in the buffer.
PUCHAR Buffer
 Pointer to the kernel buffer used to capture packets.
ULONG Accepted
ULONG Received
ULONG Dropped
NDIS_SPIN_LOCK BufferLock
 It protects the buffer associated with this CPU.
PMDL TransferMdl1
 MDL used to map the portion of the buffer that will contain an incoming packet.
PMDL TransferMdl2
 Second MDL used to map the portion of the buffer that will contain an incoming packet.
ULONG NewP
 Used by NdisTransferData() (when we call NdisTransferData, p index must be updated only in the TransferDataComplete.
-

Detailed Description

-

Kernel buffer of each CPU.

-

Structure containing the kernel buffer (and other CPU related fields) used to capture packets.

- -

Definition at line 207 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
ULONG Accepted
-
-
-

Number of packet that current capture instance acepted, from its opening. A packet is accepted if it passes the filter and fits in the buffer. Accepted packets are the ones that reach the application. This number is related to the particular CPU this structure is referring to.

- -

Definition at line 213 of file Packet.h.

- -
-
- -
-
- - - - -
PUCHAR Buffer
-
-
- -

Pointer to the kernel buffer used to capture packets.

- -

Definition at line 212 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK BufferLock
-
-
- -

It protects the buffer associated with this CPU.

- -

Definition at line 225 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG C
-
-
- -

Zero-based index of the consumer in the buffer. It indicates the first free byte to be read.

- -

Definition at line 210 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Dropped
-
-
-

Number of packet that current instance had to drop, from its opening. A packet is dropped if there is no more space to store it in the circular buffer that the driver associates to current instance. This number is related to the particular CPU this structure is referring to.

- -

Definition at line 221 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Free
-
-
- -

Number of the free bytes in the buffer.

- -

Definition at line 211 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG NewP
-
-
- -

Used by NdisTransferData() (when we call NdisTransferData, p index must be updated only in the TransferDataComplete.

- -

Definition at line 228 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG P
-
-
- -

Zero-based index of the producer in the buffer. It indicates the first free byte to be written.

- -

Definition at line 209 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Received
-
-
-

Number of packets received by current instance from its opening, i.e. number of packet received by the network adapter since the beginning of the capture/monitoring/dump session. This number is related to the particular CPU this structure is referring to.

- -

Definition at line 217 of file Packet.h.

- -
-
- -
-
- - - - -
PMDL TransferMdl1
-
-
- -

MDL used to map the portion of the buffer that will contain an incoming packet.

- -

Definition at line 226 of file Packet.h.

- -
-
- -
-
- - - - -
PMDL TransferMdl2
-
-
- -

Second MDL used to map the portion of the buffer that will contain an incoming packet.

- -

Definition at line 227 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structactive__pars.html b/ledset/WpdPack_4_1_2/docs/html/structactive__pars.html deleted file mode 100644 index 800860c..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structactive__pars.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -WinPcap: active_pars Struct Reference - - - - - - -
-

active_pars Struct Reference

-

#include <rpcapd.h>

- - - - - -

Data Fields

char address [MAX_LINE+1]
char port [MAX_LINE+1]
int ai_family
-

Detailed Description

- -

Definition at line 44 of file rpcapd.h.

-

Field Documentation

- -
-
- - - - -
char address[MAX_LINE+1]
-
-
- -

Definition at line 46 of file rpcapd.h.

- -
-
- -
-
- - - - -
int ai_family
-
-
- -

Definition at line 48 of file rpcapd.h.

- -
-
- -
-
- - - - -
char port[MAX_LINE+1]
-
-
- -

Definition at line 47 of file rpcapd.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structactivehosts.html b/ledset/WpdPack_4_1_2/docs/html/structactivehosts.html deleted file mode 100644 index 382c20f..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structactivehosts.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - -WinPcap: activehosts Struct Reference - - - - - - -
-

activehosts Struct Reference
- -[Internal Structures and Definitions] -

-

Keeps a list of all the opened connections in the active mode. -More...

- -

#include <pcap-remote.h>

- - - - - -

Data Fields

struct sockaddr_storage host
SOCKET sockctrl
struct activehostsnext
-

Detailed Description

-

Keeps a list of all the opened connections in the active mode.

-

This structure defines a linked list of items that are needed to keep the info required to manage the active mode. In other words, when a new connection in active mode starts, this structure is updated so that it reflects the list of active mode connections currently opened. This structure is required by findalldevs() and open_remote() to see if they have to open a new control connection toward the host, or they already have a control connection in place.

- -

Definition at line 133 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
struct sockaddr_storage host [read]
-
-
- -

Definition at line 135 of file pcap-remote.h.

- -
-
- -
-
- - - - -
struct activehosts* next [read]
-
-
- -

Definition at line 137 of file pcap-remote.h.

- -
-
- -
-
- - - - -
SOCKET sockctrl
-
-
- -

Definition at line 136 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structbinary__stream.html b/ledset/WpdPack_4_1_2/docs/html/structbinary__stream.html deleted file mode 100644 index 918b059..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structbinary__stream.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -WinPcap: binary_stream Struct Reference - - - - - - -
-

binary_stream Struct Reference
- -[NPF Just-in-time compiler definitions] -

-

A stream of X86 binary code. -More...

- -

#include <jitter.h>

- - - - - - - - - - -

Data Fields

INT cur_ip
 Current X86 instruction pointer.
INT bpf_pc
 Current BPF instruction pointer, i.e. position in the BPF program reached by the jitter.
PCHAR ibuf
 Instruction buffer, contains the X86 generated code.
PUINT refs
 Jumps reference table.
-

Detailed Description

-

A stream of X86 binary code.

- -

Definition at line 69 of file jitter.h.

-

Field Documentation

- -
-
- - - - -
INT bpf_pc
-
-
- -

Current BPF instruction pointer, i.e. position in the BPF program reached by the jitter.

- -

Definition at line 71 of file jitter.h.

- -
-
- -
-
- - - - -
INT cur_ip
-
-
- -

Current X86 instruction pointer.

- -

Definition at line 70 of file jitter.h.

- -
-
- -
-
- - - - -
PCHAR ibuf
-
-
- -

Instruction buffer, contains the X86 generated code.

- -

Definition at line 72 of file jitter.h.

- -
-
- -
-
- - - - -
PUINT refs
-
-
- -

Jumps reference table.

- -

Definition at line 73 of file jitter.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structdaemon__slpars.html b/ledset/WpdPack_4_1_2/docs/html/structdaemon__slpars.html deleted file mode 100644 index 82caf02..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structdaemon__slpars.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - -WinPcap: daemon_slpars Struct Reference - - - - - - -
-

daemon_slpars Struct Reference

-

Structure that keeps the parameters needed by the daemon_serviceloop() function. -More...

- -

#include <daemon.h>

- - - - - - - - - - -

Data Fields

SOCKET sockctrl
 SOCKET ID of the control connection.
int isactive
 Not null if the daemon has to run in active mode.
int nullAuthAllowed
 '1' if we permit NULL authentication, '0' otherwise
int activeclose
 '1' if the client closed the control connection explicitely; used in active mode only
-

Detailed Description

-

Structure that keeps the parameters needed by the daemon_serviceloop() function.

- -

Definition at line 37 of file daemon.h.

-

Field Documentation

- -
-
- - - - -
int activeclose
-
-
- -

'1' if the client closed the control connection explicitely; used in active mode only

- -

Definition at line 42 of file daemon.h.

- -
-
- -
-
- - - - -
int isactive
-
-
- -

Not null if the daemon has to run in active mode.

- -

Definition at line 40 of file daemon.h.

- -
-
- -
-
- - - - -
int nullAuthAllowed
-
-
- -

'1' if we permit NULL authentication, '0' otherwise

- -

Definition at line 41 of file daemon.h.

- -
-
- -
-
- - - - -
SOCKET sockctrl
-
-
- -

SOCKET ID of the control connection.

- -

Definition at line 39 of file daemon.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structpacket__file__header.html b/ledset/WpdPack_4_1_2/docs/html/structpacket__file__header.html deleted file mode 100644 index f2b0b69..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structpacket__file__header.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - -WinPcap: packet_file_header Struct Reference - - - - - - -
-

packet_file_header Struct Reference
- -[NPF structures and definitions] -

-

Header of a libpcap dump file. -More...

- -

#include <Packet.h>

- - - - - - - - - - - - - - - - -

Data Fields

UINT magic
 Libpcap magic number.
USHORT version_major
 Libpcap major version.
USHORT version_minor
 Libpcap minor version.
UINT thiszone
 Gmt to local correction.
UINT sigfigs
 Accuracy of timestamps.
UINT snaplen
 Length of the max saved portion of each packet.
UINT linktype
 Data link type (DLT_*). See win_bpf.h for details.
-

Detailed Description

-

Header of a libpcap dump file.

-

Used when a driver instance is set in dump mode to create a libpcap-compatible file.

- -

Definition at line 106 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
UINT linktype
-
-
- -

Data link type (DLT_*). See win_bpf.h for details.

- -

Definition at line 114 of file Packet.h.

- -
-
- -
-
- - - - -
UINT magic
-
-
- -

Libpcap magic number.

- -

Definition at line 108 of file Packet.h.

- -
-
- -
-
- - - - -
UINT sigfigs
-
-
- -

Accuracy of timestamps.

- -

Definition at line 112 of file Packet.h.

- -
-
- -
-
- - - - -
UINT snaplen
-
-
- -

Length of the max saved portion of each packet.

- -

Definition at line 113 of file Packet.h.

- -
-
- -
-
- - - - -
UINT thiszone
-
-
- -

Gmt to local correction.

- -

Definition at line 111 of file Packet.h.

- -
-
- -
-
- - - - -
USHORT version_major
-
-
- -

Libpcap major version.

- -

Definition at line 109 of file Packet.h.

- -
-
- -
-
- - - - -
USHORT version_minor
-
-
- -

Libpcap minor version.

- -

Definition at line 110 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structpcap__addr.html b/ledset/WpdPack_4_1_2/docs/html/structpcap__addr.html deleted file mode 100644 index d374db5..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structpcap__addr.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - -WinPcap: pcap_addr Struct Reference - - - - - - -
-

pcap_addr Struct Reference
- -[Definitions] -

-

Representation of an interface address, used by pcap_findalldevs(). -More...

- -

#include <pcap.h>

- - - - - - - - - - - - -

Data Fields

struct pcap_addrnext
 if not NULL, a pointer to the next element in the list; NULL for the last element of the list
struct sockaddr * addr
 a pointer to a struct sockaddr containing an address
struct sockaddr * netmask
 if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding to the address pointed to by addr.
struct sockaddr * broadaddr
 if not NULL, a pointer to a struct sockaddr that contains the broadcast address corre sponding to the address pointed to by addr; may be null if the interface doesn't support broadcasts
struct sockaddr * dstaddr
 if not NULL, a pointer to a struct sockaddr that contains the destination address corre sponding to the address pointed to by addr; may be null if the interface isn't a point- to-point interface
-

Detailed Description

-

Representation of an interface address, used by pcap_findalldevs().

- -

Definition at line 161 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
struct sockaddr* addr [read]
-
-
- -

a pointer to a struct sockaddr containing an address

- -

Definition at line 163 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct sockaddr* broadaddr [read]
-
-
- -

if not NULL, a pointer to a struct sockaddr that contains the broadcast address corre sponding to the address pointed to by addr; may be null if the interface doesn't support broadcasts

- -

Definition at line 165 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct sockaddr* dstaddr [read]
-
-
- -

if not NULL, a pointer to a struct sockaddr that contains the destination address corre sponding to the address pointed to by addr; may be null if the interface isn't a point- to-point interface

- -

Definition at line 166 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct sockaddr* netmask [read]
-
-
- -

if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding to the address pointed to by addr.

- -

Definition at line 164 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct pcap_addr* next [read]
-
-
- -

if not NULL, a pointer to the next element in the list; NULL for the last element of the list

- -

Definition at line 162 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structpcap__file__header.html b/ledset/WpdPack_4_1_2/docs/html/structpcap__file__header.html deleted file mode 100644 index cbdb480..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structpcap__file__header.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - -WinPcap: pcap_file_header Struct Reference - - - - - - -
-

pcap_file_header Struct Reference
- -[Definitions] -

-

Header of a libpcap dump file. -More...

- -

#include <pcap.h>

- - - - - - - - - - - - - - - -

Data Fields

bpf_u_int32 magic
u_short version_major
 Libpcap major version.
u_short version_minor
 Libpcap minor version.
bpf_int32 thiszone
 gmt to local correction
bpf_u_int32 sigfigs
 accuracy of timestamps
bpf_u_int32 snaplen
 max length saved portion of each pkt
bpf_u_int32 linktype
 data link type (LINKTYPE_*)
-

Detailed Description

-

Header of a libpcap dump file.

-

The first record in the file contains saved values for some of the flags used in the printout phases of tcpdump. Many fields here are 32 bit ints so compilers won't insert unwanted padding; these files need to be interchangeable across architectures.

-

Do not change the layout of this structure, in any way (this includes changes that only affect the length of fields in this structure).

-

Also, do not change the interpretation of any of the members of this structure, in any way (this includes using values other than LINKTYPE_ values, as defined in "savefile.c", in the "linktype" field).

-

Instead:

-

introduce a new structure for the new format, if the layout of the structure changed;

-

send mail to "tcpdump-workers@tcpdump.org", requesting a new magic number for your new capture file format, and, when you get the new magic number, put it in "savefile.c";

-

use that magic number for save files with the changed file header;

-

make the code in "savefile.c" capable of reading files with the old file header as well as files with the new file header (using the magic number to determine the header format).

-

Then supply the changes to "patches@tcpdump.org", so that future versions of libpcap and programs that use it (such as tcpdump) will be able to read your new capture file format.

- -

Definition at line 110 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
bpf_u_int32 linktype
-
-
- -

data link type (LINKTYPE_*)

- -

Definition at line 117 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_u_int32 magic
-
-
- -

Definition at line 111 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_u_int32 sigfigs
-
-
- -

accuracy of timestamps

- -

Definition at line 115 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_u_int32 snaplen
-
-
- -

max length saved portion of each pkt

- -

Definition at line 116 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_int32 thiszone
-
-
- -

gmt to local correction

- -

Definition at line 114 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_short version_major
-
-
- -

Libpcap major version.

- -

Definition at line 112 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_short version_minor
-
-
- -

Libpcap minor version.

- -

Definition at line 113 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structpcap__if.html b/ledset/WpdPack_4_1_2/docs/html/structpcap__if.html deleted file mode 100644 index 3f455a8..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structpcap__if.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - -WinPcap: pcap_if Struct Reference - - - - - - -
-

pcap_if Struct Reference
- -[Definitions] -

-

Item in a list of interfaces, used by pcap_findalldevs(). -More...

- -

#include <pcap.h>

- - - - - - - - - - - - -

Data Fields

struct pcap_ifnext
 if not NULL, a pointer to the next element in the list; NULL for the last element of the list
char * name
 a pointer to a string giving a name for the device to pass to pcap_open_live()
char * description
 if not NULL, a pointer to a string giving a human-readable description of the device
struct pcap_addraddresses
 a pointer to the first element of a list of addresses for the interface
u_int flags
 PCAP_IF_ interface flags. Currently the only possible flag is PCAP_IF_LOOPBACK, that is set if the interface is a loopback interface.
-

Detailed Description

-

Item in a list of interfaces, used by pcap_findalldevs().

- -

Definition at line 148 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
struct pcap_addr* addresses [read]
-
-
- -

a pointer to the first element of a list of addresses for the interface

- -

Definition at line 152 of file incs/pcap.h.

- -
-
- -
-
- - - - -
char* description
-
-
- -

if not NULL, a pointer to a string giving a human-readable description of the device

- -

Definition at line 151 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_int flags
-
-
- -

PCAP_IF_ interface flags. Currently the only possible flag is PCAP_IF_LOOPBACK, that is set if the interface is a loopback interface.

- -

Definition at line 153 of file incs/pcap.h.

- -
-
- -
-
- - - - -
char* name
-
-
- -

a pointer to a string giving a name for the device to pass to pcap_open_live()

- -

Definition at line 150 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct pcap_if* next [read]
-
-
- -

if not NULL, a pointer to the next element in the list; NULL for the last element of the list

- -

Definition at line 149 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structpcap__pkthdr.html b/ledset/WpdPack_4_1_2/docs/html/structpcap__pkthdr.html deleted file mode 100644 index 9a721e0..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structpcap__pkthdr.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - -WinPcap: pcap_pkthdr Struct Reference - - - - - - -
-

pcap_pkthdr Struct Reference
- -[Definitions] -

-

Header of a packet in the dump file. -More...

- -

#include <pcap.h>

- - - - - - - - -

Data Fields

struct timeval ts
 time stamp
bpf_u_int32 caplen
 length of portion present
bpf_u_int32 len
 length this packet (off wire)
-

Detailed Description

-

Header of a packet in the dump file.

-

Each packet in the dump file is prepended with this generic header. This gets around the problem of different headers for different packet interfaces.

- -

Definition at line 126 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
bpf_u_int32 caplen
-
-
- -

length of portion present

- -

Definition at line 128 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_u_int32 len
-
-
- -

length this packet (off wire)

- -

Definition at line 129 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct timeval ts [read]
-
-
- -

time stamp

- -

Definition at line 127 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structpcap__rmtauth.html b/ledset/WpdPack_4_1_2/docs/html/structpcap__rmtauth.html deleted file mode 100644 index f846c46..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structpcap__rmtauth.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - -WinPcap: pcap_rmtauth Struct Reference - - - - - - -
-

pcap_rmtauth Struct Reference
- -[Exported Structures and Definitions] -

-

This structure keeps the information needed to autheticate the user on a remote machine. -More...

- -

#include <remote-ext.h>

- - - - - - - - -

Data Fields

int type
 Type of the authentication required.
char * username
 Zero-terminated string containing the username that has to be used on the remote machine for authentication.
char * password
 Zero-terminated string containing the password that has to be used on the remote machine for authentication.
-

Detailed Description

-

This structure keeps the information needed to autheticate the user on a remote machine.

-

The remote machine can either grant or refuse the access according to the information provided. In case the NULL authentication is required, both 'username' and 'password' can be NULL pointers.

-

This structure is meaningless if the source is not a remote interface; in that case, the functions which requires such a structure can accept a NULL pointer as well.

- -

Definition at line 338 of file remote-ext.h.

-

Field Documentation

- -
-
- - - - -
char* password
-
-
- -

Zero-terminated string containing the password that has to be used on the remote machine for authentication.

-

This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication and it can be NULL.

- -

Definition at line 365 of file remote-ext.h.

- -
-
- -
-
- - - - -
int type
-
-
- -

Type of the authentication required.

-

In order to provide maximum flexibility, we can support different types of authentication based on the value of this 'type' variable. The currently supported authentication methods are defined into the Remote Authentication Methods Section.

- -

Definition at line 349 of file remote-ext.h.

- -
-
- -
-
- - - - -
char* username
-
-
- -

Zero-terminated string containing the username that has to be used on the remote machine for authentication.

-

This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication and it can be NULL.

- -

Definition at line 357 of file remote-ext.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structpcap__samp.html b/ledset/WpdPack_4_1_2/docs/html/structpcap__samp.html deleted file mode 100644 index 6aaeb84..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structpcap__samp.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - -WinPcap: pcap_samp Struct Reference - - - - - - -
-

pcap_samp Struct Reference
- -[Exported Structures and Definitions] -

-

This structure defines the information related to sampling. -More...

- -

#include <remote-ext.h>

- - - - -

Data Fields

int method
int value
-

Detailed Description

-

This structure defines the information related to sampling.

-

In case the sampling is requested, the capturing device should read only a subset of the packets coming from the source. The returned packets depend on the sampling parameters.

-
Warning:
The sampling process is applied after the filtering process. In other words, packets are filtered first, then the sampling process selects a subset of the 'filtered' packets and it returns them to the caller.
- -

Definition at line 380 of file remote-ext.h.

-

Field Documentation

- -
-
- - - - -
int method
-
-
-

Method used for sampling. Currently, the supported methods are listed in the Sampling Methods Section.

- -

Definition at line 386 of file remote-ext.h.

- -
-
- -
-
- - - - -
int value
-
-
-

This value depends on the sampling method defined. For its meaning, please check at the Sampling Methods Section.

- -

Definition at line 392 of file remote-ext.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structpcap__send__queue.html b/ledset/WpdPack_4_1_2/docs/html/structpcap__send__queue.html deleted file mode 100644 index f8a8510..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structpcap__send__queue.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - -WinPcap: pcap_send_queue Struct Reference - - - - - - -
-

pcap_send_queue Struct Reference

-

A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). -More...

- -

#include <Win32-Extensions.h>

- - - - - - - - -

Data Fields

u_int maxlen
 Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
u_int len
 Current size of the queue, in bytes.
char * buffer
 Buffer containing the packets to be sent.
-

Detailed Description

-

A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().

- -

Definition at line 46 of file Win32-Extensions.h.

-

Field Documentation

- -
-
- - - - -
char* buffer
-
-
- -

Buffer containing the packets to be sent.

- -

Definition at line 50 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
u_int len
-
-
- -

Current size of the queue, in bytes.

- -

Definition at line 49 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
u_int maxlen
-
-
- -

Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.

- -

Definition at line 48 of file Win32-Extensions.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structpcap__stat.html b/ledset/WpdPack_4_1_2/docs/html/structpcap__stat.html deleted file mode 100644 index efa5825..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structpcap__stat.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - -WinPcap: pcap_stat Struct Reference - - - - - - -
-

pcap_stat Struct Reference
- -[Definitions] -

-

Structure that keeps statistical values on an interface. -More...

- -

#include <pcap.h>

- - - - - - - - - - -

Data Fields

u_int ps_recv
 number of packets transited on the network
u_int ps_drop
 number of packets dropped by the driver
u_int ps_ifdrop
 drops by interface, not yet supported
u_int bs_capt
 Win32 specific. number of packets captured, i.e number of packets that are accepted by the filter, that find place in the kernel buffer and therefore that actually reach the application. For backward compatibility, pcap_stats() does not fill this member, so use pcap_stats_ex() to get it.
-

Detailed Description

-

Structure that keeps statistical values on an interface.

-

As returned by the pcap_stats()

- -

Definition at line 136 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
u_int bs_capt
-
-
- -

Win32 specific. number of packets captured, i.e number of packets that are accepted by the filter, that find place in the kernel buffer and therefore that actually reach the application. For backward compatibility, pcap_stats() does not fill this member, so use pcap_stats_ex() to get it.

- -

Definition at line 141 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_int ps_drop
-
-
- -

number of packets dropped by the driver

- -

Definition at line 138 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_int ps_ifdrop
-
-
- -

drops by interface, not yet supported

- -

Definition at line 139 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_int ps_recv
-
-
- -

number of packets transited on the network

- -

Definition at line 137 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__auth.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__auth.html deleted file mode 100644 index 5d68086..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__auth.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -WinPcap: rpcap_auth Struct Reference - - - - - - -
-

rpcap_auth Struct Reference
- -[Internal Structures and Definitions] -

-

Structure that keeps the data required for the authentication on the remote host. -More...

- -

#include <pcap-remote.h>

- - - - - - - - - - -

Data Fields

uint16 type
 Authentication type.
uint16 dummy
 Must be zero.
uint16 slen1
 Length of the first authentication item (e.g. username).
uint16 slen2
 Length of the second authentication item (e.g. password).
-

Detailed Description

-

Structure that keeps the data required for the authentication on the remote host.

- -

Definition at line 249 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 dummy
-
-
- -

Must be zero.

- -

Definition at line 252 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 slen1
-
-
- -

Length of the first authentication item (e.g. username).

- -

Definition at line 253 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 slen2
-
-
- -

Length of the second authentication item (e.g. password).

- -

Definition at line 254 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 type
-
-
- -

Authentication type.

- -

Definition at line 251 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__filter.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__filter.html deleted file mode 100644 index 2c6e543..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__filter.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - -WinPcap: rpcap_filter Struct Reference - - - - - - -
-

rpcap_filter Struct Reference
- -[Internal Structures and Definitions] -

-

General header used for the pcap_setfilter() command; keeps just the number of BPF instructions. -More...

- -

#include <pcap-remote.h>

- - - - - - - - -

Data Fields

uint16 filtertype
 type of the filter transferred (BPF instructions, ...)
uint16 dummy
 Must be zero.
uint32 nitems
 Number of items contained into the filter (e.g. BPF instructions for BPF filters).
-

Detailed Description

-

General header used for the pcap_setfilter() command; keeps just the number of BPF instructions.

- -

Definition at line 230 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 dummy
-
-
- -

Must be zero.

- -

Definition at line 233 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 filtertype
-
-
- -

type of the filter transferred (BPF instructions, ...)

- -

Definition at line 232 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 nitems
-
-
- -

Number of items contained into the filter (e.g. BPF instructions for BPF filters).

- -

Definition at line 234 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__filterbpf__insn.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__filterbpf__insn.html deleted file mode 100644 index 12f7bdd..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__filterbpf__insn.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -WinPcap: rpcap_filterbpf_insn Struct Reference - - - - - - -
-

rpcap_filterbpf_insn Struct Reference
- -[Internal Structures and Definitions] -

-

Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header. -More...

- -

#include <pcap-remote.h>

- - - - - - - - - - -

Data Fields

uint16 code
 opcode of the instuction
uint8 jt
 relative offset to jump to in case of 'true'
uint8 jf
 relative offset to jump to in case of 'false'
int32 k
 instruction-dependent value
-

Detailed Description

-

Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header.

- -

Definition at line 239 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 code
-
-
- -

opcode of the instuction

- -

Definition at line 241 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 jf
-
-
- -

relative offset to jump to in case of 'false'

- -

Definition at line 243 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 jt
-
-
- -

relative offset to jump to in case of 'true'

- -

Definition at line 242 of file pcap-remote.h.

- -
-
- -
-
- - - - -
int32 k
-
-
- -

instruction-dependent value

- -

Definition at line 244 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__findalldevs__if.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__findalldevs__if.html deleted file mode 100644 index 6b5fa8d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__findalldevs__if.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - -WinPcap: rpcap_findalldevs_if Struct Reference - - - - - - -
-

rpcap_findalldevs_if Struct Reference
- -[Internal Structures and Definitions] -

-

Format of the message for the interface description (findalldevs command). -More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - -

Data Fields

uint16 namelen
 Length of the interface name.
uint16 desclen
 Length of the interface description.
uint32 flags
 Interface flags.
uint16 naddr
 Number of addresses.
uint16 dummy
 Must be zero.
-

Detailed Description

-

Format of the message for the interface description (findalldevs command).

- -

Definition at line 160 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 desclen
-
-
- -

Length of the interface description.

- -

Definition at line 163 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 dummy
-
-
- -

Must be zero.

- -

Definition at line 166 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 flags
-
-
- -

Interface flags.

- -

Definition at line 164 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 naddr
-
-
- -

Number of addresses.

- -

Definition at line 165 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 namelen
-
-
- -

Length of the interface name.

- -

Definition at line 162 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__findalldevs__ifaddr.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__findalldevs__ifaddr.html deleted file mode 100644 index e3cc4f2..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__findalldevs__ifaddr.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -WinPcap: rpcap_findalldevs_ifaddr Struct Reference - - - - - - -
-

rpcap_findalldevs_ifaddr Struct Reference
- -[Internal Structures and Definitions] -

-

Format of the message for the address listing (findalldevs command). -More...

- -

#include <pcap-remote.h>

- - - - - - - - - - -

Data Fields

struct sockaddr_storage addr
 Network address.
struct sockaddr_storage netmask
 Netmask for that address.
struct sockaddr_storage broadaddr
 Broadcast address for that address.
struct sockaddr_storage dstaddr
 P2P destination address for that address.
-

Detailed Description

-

Format of the message for the address listing (findalldevs command).

- -

Definition at line 171 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
struct sockaddr_storage addr [read]
-
-
- -

Network address.

- -

Definition at line 173 of file pcap-remote.h.

- -
-
- -
-
- - - - -
struct sockaddr_storage broadaddr [read]
-
-
- -

Broadcast address for that address.

- -

Definition at line 175 of file pcap-remote.h.

- -
-
- -
-
- - - - -
struct sockaddr_storage dstaddr [read]
-
-
- -

P2P destination address for that address.

- -

Definition at line 176 of file pcap-remote.h.

- -
-
- -
-
- - - - -
struct sockaddr_storage netmask [read]
-
-
- -

Netmask for that address.

- -

Definition at line 174 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__header.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__header.html deleted file mode 100644 index 296717d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__header.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -WinPcap: rpcap_header Struct Reference - - - - - - -
-

rpcap_header Struct Reference
- -[Internal Structures and Definitions] -

-

Common header for all the RPCAP messages. -More...

- -

#include <pcap-remote.h>

- - - - - - - - - - -

Data Fields

uint8 ver
 RPCAP version number.
uint8 type
 RPCAP message type (error, findalldevs, ...).
uint16 value
 Message-dependent value (not always used).
uint32 plen
 Length of the payload of this RPCAP message.
-

Detailed Description

-

Common header for all the RPCAP messages.

- -

Definition at line 150 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint32 plen
-
-
- -

Length of the payload of this RPCAP message.

- -

Definition at line 155 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 type
-
-
- -

RPCAP message type (error, findalldevs, ...).

- -

Definition at line 153 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 value
-
-
- -

Message-dependent value (not always used).

- -

Definition at line 154 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 ver
-
-
- -

RPCAP version number.

- -

Definition at line 152 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__openreply.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__openreply.html deleted file mode 100644 index bc686e2..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__openreply.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - -WinPcap: rpcap_openreply Struct Reference - - - - - - -
-

rpcap_openreply Struct Reference
- -[Internal Structures and Definitions] -

-

Format of the message of the connection opening reply (open command). -More...

- -

#include <pcap-remote.h>

- - - - - - -

Data Fields

int32 linktype
 Link type.
int32 tzoff
 Timezone offset.
-

Detailed Description

-

Format of the message of the connection opening reply (open command).

-

This structure transfers over the network some of the values useful on the client side.

- -

Definition at line 186 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
int32 linktype
-
-
- -

Link type.

- -

Definition at line 188 of file pcap-remote.h.

- -
-
- -
-
- - - - -
int32 tzoff
-
-
- -

Timezone offset.

- -

Definition at line 189 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__pkthdr.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__pkthdr.html deleted file mode 100644 index 34837d4..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__pkthdr.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - -WinPcap: rpcap_pkthdr Struct Reference - - - - - - -
-

rpcap_pkthdr Struct Reference
- -[Internal Structures and Definitions] -

-

Format of the header which encapsulates captured packets when transmitted on the network. -More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - -

Data Fields

uint32 timestamp_sec
 'struct timeval' compatible, it represents the 'tv_sec' field
uint32 timestamp_usec
 'struct timeval' compatible, it represents the 'tv_usec' field
uint32 caplen
 Length of portion present in the capture.
uint32 len
 Real length this packet (off wire).
uint32 npkt
 Ordinal number of the packet (i.e. the first one captured has '1', the second one '2', etc).
-

Detailed Description

-

Format of the header which encapsulates captured packets when transmitted on the network.

-

This message requries the general header as well, since we want to be albe to exchange more information across the network in the future (for example statistics, and kind like that).

- -

Definition at line 219 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint32 caplen
-
-
- -

Length of portion present in the capture.

- -

Definition at line 223 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 len
-
-
- -

Real length this packet (off wire).

- -

Definition at line 224 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 npkt
-
-
- -

Ordinal number of the packet (i.e. the first one captured has '1', the second one '2', etc).

- -

Definition at line 225 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 timestamp_sec
-
-
- -

'struct timeval' compatible, it represents the 'tv_sec' field

- -

Definition at line 221 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 timestamp_usec
-
-
- -

'struct timeval' compatible, it represents the 'tv_usec' field

- -

Definition at line 222 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__sampling.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__sampling.html deleted file mode 100644 index 47fcf32..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__sampling.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -WinPcap: rpcap_sampling Struct Reference - - - - - - -
-

rpcap_sampling Struct Reference
- -[Internal Structures and Definitions] -

-

Structure that is needed to set sampling parameters. -More...

- -

#include <pcap-remote.h>

- - - - - - - - - - -

Data Fields

uint8 method
 Sampling method.
uint8 dummy1
 Must be zero.
uint16 dummy2
 Must be zero.
uint32 value
 Parameter related to the sampling method.
-

Detailed Description

-

Structure that is needed to set sampling parameters.

- -

Definition at line 269 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint8 dummy1
-
-
- -

Must be zero.

- -

Definition at line 272 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 dummy2
-
-
- -

Must be zero.

- -

Definition at line 273 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 method
-
-
- -

Sampling method.

- -

Definition at line 271 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 value
-
-
- -

Parameter related to the sampling method.

- -

Definition at line 274 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__startcapreply.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__startcapreply.html deleted file mode 100644 index 600c78a..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__startcapreply.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - -WinPcap: rpcap_startcapreply Struct Reference - - - - - - -
-

rpcap_startcapreply Struct Reference
- -[Internal Structures and Definitions] -

-

Format of the reply message that devoted to start a remote capture (startcap reply command). -More...

- -

#include <pcap-remote.h>

- - - - - - - - -

Data Fields

int32 bufsize
 Size of the user buffer allocated by WinPcap; it can be different from the one we chose.
uint16 portdata
 Network port on which the server is waiting at (passive mode only).
uint16 dummy
 Must be zero.
-

Detailed Description

-

Format of the reply message that devoted to start a remote capture (startcap reply command).

- -

Definition at line 205 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
int32 bufsize
-
-
- -

Size of the user buffer allocated by WinPcap; it can be different from the one we chose.

- -

Definition at line 207 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 dummy
-
-
- -

Must be zero.

- -

Definition at line 209 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 portdata
-
-
- -

Network port on which the server is waiting at (passive mode only).

- -

Definition at line 208 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__startcapreq.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__startcapreq.html deleted file mode 100644 index 569d619..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__startcapreq.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -WinPcap: rpcap_startcapreq Struct Reference - - - - - - -
-

rpcap_startcapreq Struct Reference
- -[Internal Structures and Definitions] -

-

Format of the message that starts a remote capture (startcap command). -More...

- -

#include <pcap-remote.h>

- - - - - - - - - - -

Data Fields

uint32 snaplen
 Length of the snapshot (number of bytes to capture for each packet).
uint32 read_timeout
 Read timeout in milliseconds.
uint16 flags
 Flags (see RPCAP_STARTCAPREQ_FLAG_xxx).
uint16 portdata
 Network port on which the client is waiting at (if 'serveropen').
-

Detailed Description

-

Format of the message that starts a remote capture (startcap command).

- -

Definition at line 195 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 flags
-
-
- -

Flags (see RPCAP_STARTCAPREQ_FLAG_xxx).

- -

Definition at line 199 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 portdata
-
-
- -

Network port on which the client is waiting at (if 'serveropen').

- -

Definition at line 200 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 read_timeout
-
-
- -

Read timeout in milliseconds.

- -

Definition at line 198 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 snaplen
-
-
- -

Length of the snapshot (number of bytes to capture for each packet).

- -

Definition at line 197 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structrpcap__stats.html b/ledset/WpdPack_4_1_2/docs/html/structrpcap__stats.html deleted file mode 100644 index d270a9c..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structrpcap__stats.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - -WinPcap: rpcap_stats Struct Reference - - - - - - -
-

rpcap_stats Struct Reference
- -[Internal Structures and Definitions] -

-

Structure that keeps the statistics about the number of packets captured, dropped, etc. -More...

- -

#include <pcap-remote.h>

- - - - - - - - - - -

Data Fields

uint32 ifrecv
 Packets received by the kernel filter (i.e. pcap_stats.ps_recv).
uint32 ifdrop
 Packets dropped by the network interface (e.g. not enough buffers) (i.e. pcap_stats.ps_ifdrop).
uint32 krnldrop
 Packets dropped by the kernel filter (i.e. pcap_stats.ps_drop).
uint32 svrcapt
 Packets captured by the RPCAP daemon and sent on the network.
-

Detailed Description

-

Structure that keeps the statistics about the number of packets captured, dropped, etc.

- -

Definition at line 259 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint32 ifdrop
-
-
- -

Packets dropped by the network interface (e.g. not enough buffers) (i.e. pcap_stats.ps_ifdrop).

- -

Definition at line 262 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 ifrecv
-
-
- -

Packets received by the kernel filter (i.e. pcap_stats.ps_recv).

- -

Definition at line 261 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 krnldrop
-
-
- -

Packets dropped by the kernel filter (i.e. pcap_stats.ps_drop).

- -

Definition at line 263 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 svrcapt
-
-
- -

Packets captured by the RPCAP daemon and sent on the network.

- -

Definition at line 264 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/structsf__pkthdr.html b/ledset/WpdPack_4_1_2/docs/html/structsf__pkthdr.html deleted file mode 100644 index 5ab32a5..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/structsf__pkthdr.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - -WinPcap: sf_pkthdr Struct Reference - - - - - - -
-

sf_pkthdr Struct Reference
- -[NPF structures and definitions] -

-

Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler. -More...

- -

#include <Packet.h>

- - - - - - - -

Data Fields

struct timeval ts
 time stamp
UINT caplen
UINT len
 Length of the original packet (off wire).
-

Detailed Description

-

Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler.

- -

Definition at line 121 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
UINT caplen
-
-
-

Length of captured portion. The captured portion can be different from the original packet, because it is possible (with a proper filter) to instruct the driver to capture only a portion of the packets.

- -

Definition at line 123 of file Packet.h.

- -
-
- -
-
- - - - -
UINT len
-
-
- -

Length of the original packet (off wire).

- -

Definition at line 126 of file Packet.h.

- -
-
- -
-
- - - - -
struct timeval ts [read]
-
-
- -

time stamp

- -

Definition at line 122 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/style.css b/ledset/WpdPack_4_1_2/docs/html/style.css deleted file mode 100644 index b9205ee..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/style.css +++ /dev/null @@ -1,360 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Verdana,Arial,Helvetica; -} -BODY,TD { - font-size: 80%; -} -CODE,PRE { - font-size: 120%; -} -H1 { - text-align: center; - font-size: 190%; -} -H2 { - font-size: 150%; -} -H3 { - font-size: 120%; -} -CAPTION { font-weight: bold } -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.nav { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} -A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} -A.codeRef:link { font-weight: normal; color: #0000FF} -A.codeRef:visited { font-weight: normal; color: #0000FF} -A:hover { text-decoration: none; background-color: #f2f2ff } -DL.el { margin-left: -1cm } -.fragment { - font-family: monospace, fixed; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { text-align: center; } -IMG.formulaDsp { } -IMG.formulaInl { vertical-align: middle; } -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { background: #e8eef2; - font-weight: bold; -} -HR { height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -.directory { font-size: 9pt; font-weight: bold; } -.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } -.directory > h3 { margin-top: 0; } -.directory p { margin: 0px; white-space: nowrap; } -.directory div { display: none; margin: 0px; } -.directory img { vertical-align: -30%; } diff --git a/ledset/WpdPack_4_1_2/docs/html/tab_b.gif b/ledset/WpdPack_4_1_2/docs/html/tab_b.gif deleted file mode 100644 index 0d623483ffdf5f9f96900108042a7ab0643fe2a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 ncmZ?wbhEHbWMp7uXkcJy*>IeJfk6j|fqX^=1|}vKMh0sDa2W*H diff --git a/ledset/WpdPack_4_1_2/docs/html/tab_l.gif b/ledset/WpdPack_4_1_2/docs/html/tab_l.gif deleted file mode 100644 index 9b1e6337c9299a700401a2a78a2c6ffced475216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmZ?wbhEHbZT`}F1e&(Gg}Y(8=I;HA5#Z$3JI=gGB)FQ#odI(O&E^@q;x zK6mr*m3xOS-#u~t!I@i+u0DKm^U160k6t`|^WpV}&n+8{U%dD9&a>B#U%!9-@yol< zU%&tQ{rk_K|NsC0`}dE5ET99@1@a36+kb~?0UJ*yc&I3X_m z!ND^5$O7$#8OFRuDhG}!?8z?cdZK&!`PWjdR;Aj^wZ` zeK{IEYHBJ)6K8VIp1`BVt++swf6j+=L{p1*nO(VhE`pFexG@5$|>uaCcd z`0m=9m+yak{QmXN#Sc$^{$X9h9&q2jiKAI|&T)a;PPx2K9p`YIdw8HtR5k2Q$2-O2 z*;3y{MQ-RnJTgJfI&R5|O)AHxDf_00XbPvDZPy4t=hHd)nfLPvms&O`Ok(sD()5v$ z5U@&h;a=#xbxVbo2~X&Xj0Ie(f{v>vERH+qC+nTG=B8Nca=wU-O$?1&vUgV~9=!H; zx>3p9Yn%*<>t~sk+&0xfyS8RsPfYBd<~wWK%j-LmpU>O7yX^h#UCp1x-p#i7@bE;py8XI6 zmY<)m>~)W~yIWcMVoiPg{duuf<*)9qZ9l$m*Ph&W&$jlv*Vpa+{pH@n=IQ$L?0$ax ec60Ul|8o2P|NVbd{6P)#weSbE3}s?04AuZvx_~SI diff --git a/ledset/WpdPack_4_1_2/docs/html/tab_r.gif b/ledset/WpdPack_4_1_2/docs/html/tab_r.gif deleted file mode 100644 index ce9dd9f533cb5486d6941844f442b59d4a9e9175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2585 zcmbV}`9Bkk1ILFF--w5zJc=ZZT(zjE=;2|_S)Qm~rCWz1Pc)KPl;jv%A#&v2*x}yc zmf2~Jm~&=xjJY?PqwIN}f8qQ2{r$uH{c*nJbmr{cR5??*egHrs-B=MzCF`3%e{FAW z{oL5xTHn~5TM{jaB;@|_Ue5F&Zb@p(kMyG{*;gWDg zyeL|eZf7Qd8=#bXzSiR{yzRgLSj-fJS8>lBjVHN z^o-0eS=nE6a`W;LChBs=`+QAJP~{b93>H^eRb5kCSC1zUNezun%`L5M?RDzv#%jk7 zYVRX=vATPD`+oEfum^{RM@GjuP?-r=yh0!p;Vx^T9G7~`7%5ydH%70=jyJ;;`d;hv92x3R=z{xp+Lg2!*@OK*K15-t&okoPtSED)h&$RLxdbA zseWm^C3d%-yRNi-ryk^!ek+C`n&~cd$#ZWct_cUL{l~i+Nzx^5d!n94(>bW-iL~Rl z&8r)?q|1DIo=0=judQ{FaGcfLERz8gfn3-Qt<2lksh{mzpT}DXxUuR^z=^key&q4! z+wWI45vL0k$R^(F#{qfqhUsN@WA+w-V?LPH33!Q?WFSB3)WBojE@hK41Nb?KfS+Qo zXgrzfsP$wr4Qzy*{OD>uJBjdgGM@VMml5)2f~_}lD*YyOb}Hjeobhz#4c`w(l^>KK zr?Ud;W~Z}*w;%hZ|2^p^+f06gJDJQD zeIhGADbDmm&6arh(q>EZ<7mjzg7l|z$hRL8=1>)Nv=S7CY$B}iYJ&*T_-T_OG*L1q ztZ3Lana33?y3AKnyq^YCF|4x%Rb5WU&2qcl{TFKey%QJeMxn^SdT!hZ5+0i1zeusiYVp-phBl7b5+Px-X&LhByq z0F&<;K0l2+v>qiHlXb#$jXMv$uK-dEGE9L~qtdU(XeRXmvu*K2Q&6!fD**JxYP4b4BR7FdJ$Qx9G9`J%-_X!a#LGpp3g9)VWytGCa;7`S1_e8F~!R+aSJ zOF17p2`H?2kPs8Q`_;U}+D%3p zs2-0BTqFwpUoBk`?P;iPQ(IbEA|JmMx!P&YYG|R@S=5Mnw;-?A6rEEVyV%d7{iU4a zNk`i!%F(Ykpm`}#oH;BjY->@b8vQedv;pza2FL&*6ufjd+*3Ute&>kes~TU?^KkojsTh(o~(3tk1Y6>4(yn( z#U*ID9@eg-beKo1B;HXe+}{Z%n@7m0+yxivuqk9~;!1LGQlah)xYK4>wgL}l6dsaN zIxlRlq`*`j9PG4*0hD6YV_b_2w5b#)o7J?`q#{GjvvKlD`T*dWcZx<-s(ZvLB44E# z=!|sw!?)@%y$oRNL#25WS3lzdii}TuQ3?CLnvQ1_n};2sT_;Y;#d3=+-(O% zMN$>O!3;ke(UuLR%h_&)N zs^!-@A>QR}4yB1bPp`9S19ikTbZ~O{&FF-yHK{En;mmShDUIEw03`j(DBIsM}Rjki2J#SQa3gFZTKBPDeIiLt9Z z%bL3(B@Qw%(B`wSMS~dPh$=R`(}lBoFXKy(s|*{#ru$wjsBc_O#zxNk9w+UUHmx(U zmJ8+M+ndtnZ<7|VU9Mbt61zpo9T&3%Wx&XII=#QJxjR`CZf22ac3d51Z?GD%LEe_&*t46Qf;4`bZ7p2K(Ab5>GfT^}4! zBT&HZD`^PEgWoI&{~o-ID0F?O`75sm(87x%A{(}Ch1)QlzdJ)1B-eqe5a(weg0`4lQIf1evjvbBY50DVbzO7CLf|vP z2#0(U-|jZ`H{y5N^o7%iK6H>_HEGN->U6^!)1{XpJV!!4(Ig7wzZQ*9WYF4X1rG0x z=1uA@i`rIAciubDC{;~b(|&|A@xkjRP5aRcvRU9tvIm}jDB6J eQ0-6-y)mpwdT=ayS0tBxKDA*~;EWmo diff --git a/ledset/WpdPack_4_1_2/docs/html/tabs.css b/ledset/WpdPack_4_1_2/docs/html/tabs.css deleted file mode 100644 index a444163..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/tabs.css +++ /dev/null @@ -1,105 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : 80%; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs #MSearchBox -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : 80%; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; - text-align : center; - margin : 2px; - padding : 2px; -} diff --git a/ledset/WpdPack_4_1_2/docs/html/tree.html b/ledset/WpdPack_4_1_2/docs/html/tree.html deleted file mode 100644 index 2f3ebe4..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/tree.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - TreeView - - - - -
-

WinPcap

-
-

o*WinPcap Documentation

-

o*Deprecated List

-

o+Modules

- -

o+Data Structures

- -

o*Data Fields

-

o+File List

- -

\*Globals

-
-
- - - diff --git a/ledset/WpdPack_4_1_2/docs/html/utils_8h.html b/ledset/WpdPack_4_1_2/docs/html/utils_8h.html deleted file mode 100644 index 2e2cb08..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/utils_8h.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - -WinPcap: utils.h File Reference - - - - - - -
-

utils.h File Reference

-

Go to the source code of this file.

- - - -

Functions

int getopt (int nargc, char *const *nargv, const char *ostr)
-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int getopt (int  nargc,
char *const *  nargv,
const char *  ostr 
)
-
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/utils_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/utils_8h_source.html deleted file mode 100644 index 0642e89..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/utils_8h_source.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -WinPcap: utils.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/win32-svc_8h.html b/ledset/WpdPack_4_1_2/docs/html/win32-svc_8h.html deleted file mode 100644 index b9d8d60..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/win32-svc_8h.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -WinPcap: win32-svc.h File Reference - - - - - - -
-

win32-svc.h File Reference

-

Go to the source code of this file.

- - - -

Functions

int svc_start (void)
-

Function Documentation

- -
-
- - - - - - - - - -
int svc_start (void  ) 
-
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/win32-svc_8h_source.html b/ledset/WpdPack_4_1_2/docs/html/win32-svc_8h_source.html deleted file mode 100644 index 36005b5..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/win32-svc_8h_source.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - -WinPcap: win32-svc.h Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/winpcap.gif b/ledset/WpdPack_4_1_2/docs/html/winpcap.gif deleted file mode 100644 index c6b3484f0e6e13c8a691f682dbb21058114c0a64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10723 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 E4;?nL{r~^~ diff --git a/ledset/WpdPack_4_1_2/docs/html/winpcap_small.gif b/ledset/WpdPack_4_1_2/docs/html/winpcap_small.gif deleted file mode 100644 index 42b3adb6584302f3ba39bd8b002b04b72408a076..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2160 zcmeIx|5sD@9mnyTFOY-T|sNHI}TM;`p0K{&`h7++Ph#f`1 za3cVUAWj5vqlgm)^`L+gMcpXsaiUHq>UM(RcLHvw)8lmd-A=dL>2ZS*a04E<+wXP< zJZ_K2?e~B&=K=g4Pr&1u^LzY$Pr#22AmI07V_ecTJ>l2fy|!Ll^hk!p;MvM*gU@)|k>WrXqeX4WDJOU#<*!GI_a;MBiJW zSRcrJ|H2`5>DYOu?0ya-TNtrHPAq?`+xBKzR8!=U5NgNPVPf5mOGzo^u8fI{)$I4x z48t?l({q*qL1FtmZ1;V9G5p2!c|I}Xhdy10tEivltnHw`u@P-v9~EAS?Ho%@#D_JQ z&aZ9xw8vPYjF*3wTBIYrnkI zfB%=2qca!EzNbuGB3pG2gXn+BefnW2Jt=*Lv$^vh--vHSM^EqOZp9aIzU{5`GbrAE zCVfv78dG2j)k@#}_ffO*_r05NhgAKA@}c>2(bWlJ<{Bxsz!6o)YDp?fN)&gFUuicD zDhFX1{d!Xwr^=d&JM>n(=eP=8k;b2N@!9!@J8ZLTW_mh_Xb{8Zz&|4lfynk%Ozr3UPNYv${&5C zpoJ1u^i-Q0kr$;j+qNB3S|4qc*Pj#f-lsYWnW>%e{h1(;iHNkQ$KIgEoT~-K|i)(%>*d zM$(rj7b_%ZiueszXc=B8PQ-uk!$>g0MIJPtbKmBi9`AAviDsp_uz}xvHZ-%ucp|cZ z)kP%4!pt1npROmp6K<U>XCC5}{}t zzh|lQCLt^9jCAC{A)|>(q#8(r-4en2uF~CoIi3ai4)I*<(e?B~7WbiHocGR?$#BKs zDa!-W&6Ekkal@!225l)8;bZr&SO{&J2gAMd+g%%>KSqyI5*dOPioCX=b(UV~s+?t) zoN>TIfSi&}-daLBD<^IkMMq{SB>>M`4jUIZPvS3P)?w;e+`Q=|Ayp;jLt4 zTw@CXZAidTrn6rvm5@THkb(Ad`#oDi(#~p2D|Kc;I4%q-5%~n$)%82`k%_Tumdioc z5~n#&@9jZq6z!a8qc=Dh=S}a!IS=-agn37C)J2@wdN*Onb(VM@3b&aj=(`%*Qldgq zi*-VL4sB32-KUl<`NC|ckVHNc$72{f$trVP0Yqq0LWE;AWWIJ0|2C3v%iBkZN`vt2 zokBt!A6|?nMkxAvWPBW{qPH&6W($jpyGF@=eVEy87C-)Agq*R63vY;w<51g385_-M zk^e$pF2Sq3l12KAM%-^uH!@fv ZI*%rqzr~}TTY;}8-|h@!F(K&Se*w~9UAX`N diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__remote_8htm.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__remote_8htm.html deleted file mode 100644 index 5a6a851..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__remote_8htm.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - -WinPcap: wpcap_remote.htm File Reference - - - - - - -
-

wpcap_remote.htm File Reference

-

Go to the source code of this file.

- - - - - - - - -

Functions

< html >< head >< metahttp-equiv="Content-Type"content="text/html;charset=windows-1252">
-< metaname="GENERATOR"content="MicrosoftFrontPage4.0">
-< metaname="ProgId"content="FrontPage.Editor.Document">
-< title > Using WinPcap Remote
-Capture</title ></head >< body >
-< hr >< ul >< li >< ahref="#RunningModes">
- Remote Capture Running Modes
-</a ></li >< li >< ahref="#Config">
- Configuring the Remote 
Daemon (rpcapd)</a ></li >< li >< a href

Variables

 then
the client sends the
-appropriate commands to the
-daemon and it starts the
-capture This name is due to
-the fact thet the daemon
-becomes< i > active</i >
- instead of< i > waiting</i >
- for new connections</li ></ul >
-< p > The Active Mode is
-useful in case the remote
-daemon is behind a firewall
-and it cannot receive
-connections from the external
-world In this 
case
the client sends the
-appropriate commands to the
-daemon and it starts the
-capture This name is due to
-the fact thet the daemon
-becomes< i > active</i >
- instead of< i > waiting</i >
- for new connections</li ></ul >
-< p > The Active Mode is
-useful in case the remote
-daemon is behind a firewall
-and it cannot receive
-connections from the external
-world In this the daemon can
-be configured to establish the
-connection to a given 
host
the client sends the
-appropriate commands to the
-daemon and it starts the
-capture This name is due to
-the fact thet the daemon
-becomes< i > active</i >
- instead of< i > waiting</i >
- for new connections</li ></ul >
-< p > The Active Mode is
-useful in case the remote
-daemon is behind a firewall
-and it cannot receive
-connections from the external
-world In this the daemon can
-be configured to establish the
-connection to a given which
-will have been configured in
-order to< i > wait</i > for
-that connection After
-establishing the 
connection
-

Function Documentation

- -
-
- - - - - - - - - -
<html><head><metahttp-equiv="Content-Type"content="text/html;charset=windows-1252"><metaname="GENERATOR"content="MicrosoftFrontPage4.0"><metaname="ProgId"content="FrontPage.Editor.Document"><title> Using WinPcap Remote Capture</title></head><body><hr><ul><li><ahref="#RunningModes"> Remote Capture Running Modes</a></li><li><ahref="#Config"> Configuring the Remote Daemon (rpcapd  ) 
-
-
- -
-
-

Variable Documentation

- -
-
- - - - -
the client sends the appropriate commands to the daemon and it starts the capture This name is due to the fact thet the daemon becomes<i> active</i> instead of<i> waiting</i> for new connections</li></ul><p> The Active Mode is useful in case the remote daemon is behind a firewall and it cannot receive connections from the external world In this case
-
-
- -

Definition at line 38 of file wpcap_remote.htm.

- -
-
- -
-
- - - - -
the client sends the appropriate commands to the daemon and it starts the capture This name is due to the fact thet the daemon becomes<i> active</i> instead of<i> waiting</i> for new connections</li></ul><p> The Active Mode is useful in case the remote daemon is behind a firewall and it cannot receive connections from the external world In this the daemon can be configured to establish the connection to a given which will have been configured in order to<i> wait</i> for that connection After establishing the connection
-
-
- -

Definition at line 38 of file wpcap_remote.htm.

- -
-
- -
-
- - - - -
the client sends the appropriate commands to the daemon and it starts the capture This name is due to the fact thet the daemon becomes<i> active</i> instead of<i> waiting</i> for new connections</li></ul><p> The Active Mode is useful in case the remote daemon is behind a firewall and it cannot receive connections from the external world In this the daemon can be configured to establish the connection to a given host
-
-
- -

Definition at line 38 of file wpcap_remote.htm.

- -
-
- -
-
- - - - -
then
-
-
- -

Definition at line 38 of file wpcap_remote.htm.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__remote_8htm_source.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__remote_8htm_source.html deleted file mode 100644 index 967f3ec..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__remote_8htm_source.html +++ /dev/null @@ -1,382 +0,0 @@ - - - - -WinPcap: wpcap_remote.htm Source File - - - - - - - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut1_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut1_8txt.html deleted file mode 100644 index eec681d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut1_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut1.txt File Reference - - - - - - -
-

wpcap_tut1.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut2_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut2_8txt.html deleted file mode 100644 index 24c0847..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut2_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut2.txt File Reference - - - - - - -
-

wpcap_tut2.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut3_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut3_8txt.html deleted file mode 100644 index bb5b360..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut3_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut3.txt File Reference - - - - - - -
-

wpcap_tut3.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut4_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut4_8txt.html deleted file mode 100644 index 7b903a2..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut4_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut4.txt File Reference - - - - - - -
-

wpcap_tut4.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut5_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut5_8txt.html deleted file mode 100644 index 64737d4..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut5_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut5.txt File Reference - - - - - - -
-

wpcap_tut5.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut6_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut6_8txt.html deleted file mode 100644 index 0e97065..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut6_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut6.txt File Reference - - - - - - -
-

wpcap_tut6.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut7_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut7_8txt.html deleted file mode 100644 index 24c5a8c..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut7_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut7.txt File Reference - - - - - - -
-

wpcap_tut7.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut8_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut8_8txt.html deleted file mode 100644 index 3bfa5e4..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut8_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut8.txt File Reference - - - - - - -
-

wpcap_tut8.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut9_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut9_8txt.html deleted file mode 100644 index 5ec7a67..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut9_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut9.txt File Reference - - - - - - -
-

wpcap_tut9.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut_8txt.html b/ledset/WpdPack_4_1_2/docs/html/wpcap__tut_8txt.html deleted file mode 100644 index e76e54d..0000000 --- a/ledset/WpdPack_4_1_2/docs/html/wpcap__tut_8txt.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -WinPcap: wpcap_tut.txt File Reference - - - - - - -
-

wpcap_tut.txt File Reference

-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 -CACE Technologies. All rights reserved.

diff --git a/ledset/expertsmartpointsetwin.cpp b/ledset/expertsmartpointsetwin.cpp index 362aac6..598ec61 100644 --- a/ledset/expertsmartpointsetwin.cpp +++ b/ledset/expertsmartpointsetwin.cpp @@ -1,6 +1,8 @@ #include "expertsmartpointsetwin.h" #include "gutil/qgui.h" #include "globalfunc.h" +#include "crc.h" +#include "waitingdlg.h" #include #include #include @@ -22,7 +24,7 @@ struct ModUnitMap { byte w{ipp(2)}; byte h{ipp(2)}; byte ex1{ipp(4)}; - byte ChipType{ipp(2)}; + byte chipType{ipp(2)}; byte decodeMode{ipp(2)}; byte ex3{ipp(4)}; byte smartset{ipp(4)}; @@ -50,8 +52,8 @@ struct ModMap { byte 芯片通道数{ipp(3)}; byte 模组类型数目{ipp()}; byte Unit{ipp(modUnitMap.end)}; - byte 保留2{ie(4)}; - byte check{ie(4)}; + byte 保留2{ipp(4)}; + byte check{ipp(4)}; byte end{fi}; } modMap; @@ -79,7 +81,7 @@ ExpertSmartPointSetWin::ExpertSmartPointSetWin(ExpertWin *expertWin) : BaseWin{e vv->setContentsMargins(50, 50, 6, 6); auto lb = new QLabel(tr("基本参数")); - gFontSize(lb, 16); + gFont(lb, 16); auto bkBlue = lb->palette(); bkBlue.setColor(QPalette::WindowText, QColor(0x5599ff)); lb->setPalette(bkBlue); @@ -117,6 +119,286 @@ ExpertSmartPointSetWin::ExpertSmartPointSetWin(ExpertWin *expertWin) : BaseWin{e grid->addWidget(fdGroupNum, 2, 2); + { + dlgChipType = new QDialog(this); + dlgChipType->setWindowFlag(Qt::WindowMaximizeButtonHint); + dlgChipType->setWindowTitle("选择芯片类型"); + dlgChipType->resize(800, 600); + + auto vBox = new VBox(dlgChipType); + vBox->setContentsMargins(0,0,0,0); + + tableChipType = new Table(24, 10); + tableChipType->setColFit(); + tableChipType->setRowFit(); + tableChipType->setEditTriggers(QAbstractItemView::NoEditTriggers); + tableChipType->setAlternatingRowColors(true); + tableChipType->setSelectionMode(QAbstractItemView::SingleSelection); + int rr = 0, cc = 0; + tableChipType->setHeaderText(cc, "ICN系列"); + tableChipType->setText(rr++, cc, "ICN2026"); + tableChipType->setText(rr++, cc, "ICN2027"); + tableChipType->setText(rr++, cc, "ICN2028"); + tableChipType->setText(rr++, cc, "ICN2037"); + tableChipType->setText(rr++, cc, "ICN2038"); + tableChipType->setText(rr++, cc, "ICN2038S"); + tableChipType->setText(rr++, cc, "ICN2053"); + tableChipType->setText(rr++, cc, "ICN2058"); + tableChipType->setText(rr++, cc, "ICN2088"); + tableChipType->setText(rr++, cc, "ICND2045"); + tableChipType->setText(rr++, cc, "ICND2046"); + tableChipType->setText(rr++, cc, "ICND2047"); + tableChipType->setText(rr++, cc, "ICND2049"); + tableChipType->setText(rr++, cc, "ICND2055"); + tableChipType->setText(rr++, cc, "ICND2059"); + tableChipType->setText(rr++, cc, "ICND2065"); + tableChipType->setText(rr++, cc, "ICND2069"); + tableChipType->setText(rr++, cc, "ICND2076"); + tableChipType->setText(rr++, cc, "ICND2110"); + tableChipType->setText(rr++, cc, "ICND2112"); + tableChipType->setText(rr++, cc, "ICND2153"); + tableChipType->setText(rr++, cc, "ICND2153_three"); + tableChipType->setText(rr++, cc, "ICND2163"); + tableChipType->setText(rr++, cc, "ICND2200"); + rr = 0; cc++; + tableChipType->setHeaderText(cc, "SM系列"); + tableChipType->setText(rr++, cc, "SM16017_NEW"); + tableChipType->setText(rr++, cc, "SM16017S"); + tableChipType->setText(rr++, cc, "SM16159S"); + tableChipType->setText(rr++, cc, "SM16169S"); + tableChipType->setText(rr++, cc, "SM16207S"); + tableChipType->setText(rr++, cc, "SM16218"); + tableChipType->setText(rr++, cc, "SM16227S"); + tableChipType->setText(rr++, cc, "SM16237DS"); + tableChipType->setText(rr++, cc, "SM16237S"); + tableChipType->setText(rr++, cc, "SM16259S"); + tableChipType->setText(rr++, cc, "SM16259S"); + tableChipType->setText(rr++, cc, "SM16369"); + tableChipType->setText(rr++, cc, "SM16380"); + tableChipType->setText(rr++, cc, "SM16388"); + tableChipType->setText(rr++, cc, "SM16389"); + tableChipType->setText(rr++, cc, "SM16509/16399"); + rr = 0; cc++; + tableChipType->setHeaderText(cc, "LS系列"); + tableChipType->setText(rr++, cc, "LS9918S"); + tableChipType->setText(rr++, cc, "LS9919S"); + tableChipType->setText(rr++, cc, "LS9926S"); + tableChipType->setText(rr++, cc, "LS9929C"); + tableChipType->setText(rr++, cc, "LS9929S"); + tableChipType->setText(rr++, cc, "LS9930S"); + tableChipType->setText(rr++, cc, "LS9931S"); + tableChipType->setText(rr++, cc, "LS9935B"); + tableChipType->setText(rr++, cc, "LS9935S"); + tableChipType->setText(rr++, cc, "LS9936S"); + tableChipType->setText(rr++, cc, "LS9961S"); + rr = 0; cc++; + tableChipType->setHeaderText(cc, "MBI系列"); + tableChipType->setText(rr++, cc, "MBI5041/5042"); + tableChipType->setText(rr++, cc, "MBI5051"); + tableChipType->setText(rr++, cc, "MBI5124"); + tableChipType->setText(rr++, cc, "MBI5151"); + tableChipType->setText(rr++, cc, "MBI5153"); + tableChipType->setText(rr++, cc, "MBI5155"); + tableChipType->setText(rr++, cc, "MBI5158"); + tableChipType->setText(rr++, cc, "MBI5252"); + tableChipType->setText(rr++, cc, "MBI5253"); + tableChipType->setText(rr++, cc, "MBI5253B"); + tableChipType->setText(rr++, cc, "MBI5254"); + tableChipType->setText(rr++, cc, "MBI5264"); + tableChipType->setText(rr++, cc, "MBI5268"); + tableChipType->setText(rr++, cc, "MBI5353"); + tableChipType->setText(rr++, cc, "MBI5353B"); + tableChipType->setText(rr++, cc, "MBI6322"); + tableChipType->setText(rr++, cc, "MBI6328"); + tableChipType->setText(rr++, cc, "MBI6334"); + rr = 0; cc++; + tableChipType->setHeaderText(cc, "SUM系列"); + tableChipType->setText(rr++, cc, "SUM2017"); + tableChipType->setText(rr++, cc, "SUM2017T"); + tableChipType->setText(rr++, cc, "SUM2017TD"); + tableChipType->setText(rr++, cc, "SUM2028"); + tableChipType->setText(rr++, cc, "SUM2030"); + tableChipType->setText(rr++, cc, "SUM2030T"); + tableChipType->setText(rr++, cc, "SUM2032"); + tableChipType->setText(rr++, cc, "SUM2033"); + tableChipType->setText(rr++, cc, "SUM2035"); + tableChipType->setText(rr++, cc, "SUM2036"); + tableChipType->setText(rr++, cc, "SUM2037"); + tableChipType->setText(rr++, cc, "SUM2117"); + tableChipType->setText(rr++, cc, "SUM2130"); + tableChipType->setText(rr++, cc, "SUM2131"); + tableChipType->setText(rr++, cc, "SUM2135"); + tableChipType->setText(rr++, cc, "SUM6086"); + rr = 0; cc++; + tableChipType->setHeaderText(cc, "FM系列"); + tableChipType->setText(rr++, cc, "FM6128"); + tableChipType->setText(rr++, cc, "FM6129"); + tableChipType->setText(rr++, cc, "FM6153"); + tableChipType->setText(rr++, cc, "FM6182"); + tableChipType->setText(rr++, cc, "FM6253"); + tableChipType->setText(rr++, cc, "FM6353"); + tableChipType->setText(rr++, cc, "FM6356"); + tableChipType->setText(rr++, cc, "FM6363"); + tableChipType->setText(rr++, cc, "FM6555"); + tableChipType->setText(rr++, cc, "FM6565/6569"); + tableChipType->setText(rr++, cc, "FM6565CE"); + rr = 0; cc++; + tableChipType->setHeaderText(cc, "DP系列"); + tableChipType->setText(rr++, cc, "DP5135"); + tableChipType->setText(rr++, cc, "DP5220X"); + tableChipType->setText(rr++, cc, "DP5525"); + rr = 0; cc++; + tableChipType->setHeaderText(cc, "MY系列"); + tableChipType->setText(rr++, cc, "MY9758"); + tableChipType->setText(rr++, cc, "MY9862"); + tableChipType->setText(rr++, cc, "MY9866"); + rr = 0; cc++; + tableChipType->setHeaderText(cc, "LYD系列"); + tableChipType->setText(rr++, cc, "LYD6168B"); + tableChipType->setText(rr++, cc, "LYD6168C"); + tableChipType->setText(rr++, cc, "LYD6168D"); + tableChipType->setText(rr++, cc, "LYD6168E"); + tableChipType->setText(rr++, cc, "LYD6188"); + tableChipType->setText(rr++, cc, "LYD6188PC"); + rr = 0; cc++; + tableChipType->setHeaderText(cc, "其他系列"); + tableChipType->setText(rr++, cc, "通用"); + tableChipType->setText(rr++, cc, "A5065"); + tableChipType->setText(rr++, cc, "AXS6018"); + tableChipType->setText(rr++, cc, "CFD135A"); + tableChipType->setText(rr++, cc, "CFD455A"); + tableChipType->setText(rr++, cc, "CNS7153"); + tableChipType->setText(rr++, cc, "CNS7253"); + tableChipType->setText(rr++, cc, "CNS7263"); + tableChipType->setText(rr++, cc, "CS2017"); + tableChipType->setText(rr++, cc, "CS2033"); + tableChipType->setText(rr++, cc, "D26188"); + tableChipType->setText(rr++, cc, "HX8055"); + tableChipType->setText(rr++, cc, "HX8864"); + tableChipType->setText(rr++, cc, "HX8896"); + tableChipType->setText(rr++, cc, "RT5965"); + tableChipType->setText(rr++, cc, "RT5967"); + tableChipType->setText(rr++, cc, "SCL8081A"); + tableChipType->setText(rr++, cc, "XM11202G"); + connect(tableChipType, &Table::cellDoubleClicked, dlgChipType, [=](int row, int column) { + auto text = tableChipType->text(row, column); + if(text.isEmpty()) return; + fdChipType->setText(text); + ChipTypeCode = (column<<8) | row; + dlgChipType->accept(); + }); + vBox->addWidget(tableChipType); + + auto btnBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Close); + connect(btnBox, &QDialogButtonBox::rejected, dlgChipType, &QDialog::reject); + connect(btnBox, &QDialogButtonBox::accepted, dlgChipType, [=] { + auto items = tableChipType->selectedItems(); + if(items.isEmpty()) { + QMessageBox::warning(dlgChipType, "Warning", "请选择芯片类型"); + return; + } + fdChipType->setText(items[0]->text()); + auto ranges = tableChipType->selectedRanges(); + ChipTypeCode = (ranges[0].leftColumn()<<8) | ranges[0].topRow(); + dlgChipType->accept(); + }); + vBox->addWidget(btnBox); + } + { + dlgDecodeMode = new QDialog(this); + dlgDecodeMode->setWindowFlag(Qt::WindowMaximizeButtonHint); + dlgDecodeMode->setWindowTitle("选择译码方式"); + dlgDecodeMode->resize(600, 400); + + auto vBox = new VBox(dlgDecodeMode); + vBox->setContentsMargins(0,0,0,0); + + tableDecodeMode = new Table(9, 7); + tableDecodeMode->setColFit(); + tableDecodeMode->setRowFit(); + tableDecodeMode->setEditTriggers(QAbstractItemView::NoEditTriggers); + tableDecodeMode->setAlternatingRowColors(true); + tableDecodeMode->setSelectionMode(QAbstractItemView::SingleSelection); + int rr = 0, cc = 0; + tableDecodeMode->setHeaderText(cc, "系列"+QString::number(cc+1)); + tableDecodeMode->setText(rr++, cc, "138译码"); + tableDecodeMode->setText(rr++, cc, "ICN2012"); + tableDecodeMode->setText(rr++, cc, "MW4958"); + tableDecodeMode->setText(rr++, cc, "SM5166P"); + tableDecodeMode->setText(rr++, cc, "TC7260"); + tableDecodeMode->setText(rr++, cc, "TC7258E"); + tableDecodeMode->setText(rr++, cc, "TC7258EN"); + tableDecodeMode->setText(rr++, cc, "HX6012"); + tableDecodeMode->setText(rr++, cc, "ICN2016"); + rr = 0; cc++; + tableDecodeMode->setHeaderText(cc, "系列"+QString::number(cc+1)); + tableDecodeMode->setText(rr++, cc, "595译码"); + rr = 0; cc++; + tableDecodeMode->setHeaderText(cc, "系列"+QString::number(cc+1)); + tableDecodeMode->setText(rr++, cc, "5958译码"); + tableDecodeMode->setText(rr++, cc, "5960译码"); + tableDecodeMode->setText(rr++, cc, "TC7558"); + tableDecodeMode->setText(rr++, cc, "RT5957"); + tableDecodeMode->setText(rr++, cc, "HX6058"); + tableDecodeMode->setText(rr++, cc, "HX6158H"); + tableDecodeMode->setText(rr++, cc, "MBI5988"); + rr = 0; cc++; + tableDecodeMode->setHeaderText(cc, "系列"+QString::number(cc+1)); + tableDecodeMode->setText(rr++, cc, "直接输出 (低)"); + tableDecodeMode->setText(rr++, cc, "直接输出 (高)"); + tableDecodeMode->setText(rr++, cc, "静态无译码"); + rr = 0; cc++; + tableDecodeMode->setHeaderText(cc, "系列"+QString::number(cc+1)); + tableDecodeMode->setText(rr++, cc, "ICND2018"); + tableDecodeMode->setText(rr++, cc, "ICND3018"); + tableDecodeMode->setText(rr++, cc, "ICND2019"); + tableDecodeMode->setText(rr++, cc, "TC7559"); + tableDecodeMode->setText(rr++, cc, "TC7519"); + tableDecodeMode->setText(rr++, cc, "SM5366"); + tableDecodeMode->setText(rr++, cc, "DP32020"); + tableDecodeMode->setText(rr++, cc, "DP7298A"); + tableDecodeMode->setText(rr++, cc, "SM5368"); + rr = 0; cc++; + tableDecodeMode->setHeaderText(cc, "系列"+QString::number(cc+1)); + tableDecodeMode->setText(rr++, cc, "ICND2013"); + tableDecodeMode->setText(rr++, cc, "TC7262"); + tableDecodeMode->setText(rr++, cc, "ICND2017"); + tableDecodeMode->setText(rr++, cc, "DP7268E"); + tableDecodeMode->setText(rr++, cc, "DP32019"); + tableDecodeMode->setText(rr++, cc, "HX6013"); + rr = 0; cc++; + tableDecodeMode->setHeaderText(cc, "系列"+QString::number(cc+1)); + tableDecodeMode->setText(rr++, cc, "SM5266P"); + tableDecodeMode->setText(rr++, cc, "FM7239"); + tableDecodeMode->setText(rr++, cc, "LS9736"); + tableDecodeMode->setText(rr++, cc, "D7266"); + tableDecodeMode->setText(rr++, cc, "CFD21338SPC"); + tableDecodeMode->setText(rr++, cc, "LS9737_1"); + connect(tableDecodeMode, &Table::cellDoubleClicked, dlgDecodeMode, [=](int row, int column) { + auto text = tableDecodeMode->text(row, column); + if(text.isEmpty()) return; + fdDecodeMode->setText(text); + DecodeModeCode = (column<<8) | row; + dlgDecodeMode->accept(); + }); + vBox->addWidget(tableDecodeMode); + + auto btnBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Close); + connect(btnBox, &QDialogButtonBox::rejected, dlgDecodeMode, &QDialog::reject); + connect(btnBox, &QDialogButtonBox::accepted, dlgDecodeMode, [=] { + auto items = tableDecodeMode->selectedItems(); + if(items.isEmpty()) { + QMessageBox::warning(dlgDecodeMode, "Warning", "请选择译码方式"); + return; + } + fdDecodeMode->setText(items[0]->text()); + auto ranges = tableDecodeMode->selectedRanges(); + DecodeModeCode = (ranges[0].leftColumn()<<8) | ranges[0].topRow(); + dlgDecodeMode->accept(); + }); + vBox->addWidget(btnBox); + } + lb = new QLabel(tr("驱动芯片: ")); grid->addWidget(lb, 0, 4); @@ -125,201 +407,16 @@ ExpertSmartPointSetWin::ExpertSmartPointSetWin(ExpertWin *expertWin) : BaseWin{e fdChipType = new QLineEdit("ICND2153"); fdChipType->setMinimumWidth(150); + fdChipType->setReadOnly(true); hhhh->addWidget(fdChipType); + auto def = fdChipType->text(); + QTableWidgetItem *item; + if(! def.isEmpty()) for(int r=0; rrowCount(); r++) for(int c=0; ccolumnCount(); c++) if((item = tableChipType->item(r, c)) && item->text()==def) item->setSelected(true); + auto btn = new QPushButton("..."); btn->setMaximumWidth(30); - connect(btn, &QPushButton::clicked, this, [=] { - QDialog dlg(this); - dlg.setWindowFlag(Qt::WindowMaximizeButtonHint); - dlg.setWindowTitle("选择芯片类型"); - dlg.resize(800, 600); - - auto vBox = new VBox(&dlg); - vBox->setContentsMargins(0,0,0,0); - - auto table = new Table(24, 10); - table->setColFit(); - table->setRowFit(); - table->setEditTriggers(QAbstractItemView::NoEditTriggers); - table->setAlternatingRowColors(true); - table->setSelectionMode(QAbstractItemView::SingleSelection); - int rr = 0, cc = 0; - table->setHeaderText(cc, "ICN系列"); - table->setText(rr++, cc, "ICN2026"); - table->setText(rr++, cc, "ICN2027"); - table->setText(rr++, cc, "ICN2028"); - table->setText(rr++, cc, "ICN2037"); - table->setText(rr++, cc, "ICN2038"); - table->setText(rr++, cc, "ICN2038S"); - table->setText(rr++, cc, "ICN2053"); - table->setText(rr++, cc, "ICN2058"); - table->setText(rr++, cc, "ICN2088"); - table->setText(rr++, cc, "ICND2045"); - table->setText(rr++, cc, "ICND2046"); - table->setText(rr++, cc, "ICND2047"); - table->setText(rr++, cc, "ICND2049"); - table->setText(rr++, cc, "ICND2055"); - table->setText(rr++, cc, "ICND2059"); - table->setText(rr++, cc, "ICND2065"); - table->setText(rr++, cc, "ICND2069"); - table->setText(rr++, cc, "ICND2076"); - table->setText(rr++, cc, "ICND2110"); - table->setText(rr++, cc, "ICND2112"); - table->setText(rr++, cc, "ICND2153"); - table->setText(rr++, cc, "ICND2153_three"); - table->setText(rr++, cc, "ICND2163"); - table->setText(rr++, cc, "ICND2200"); - rr = 0; cc++; - table->setHeaderText(cc, "SM系列"); - table->setText(rr++, cc, "SM16017_NEW"); - table->setText(rr++, cc, "SM16017S"); - table->setText(rr++, cc, "SM16159S"); - table->setText(rr++, cc, "SM16169S"); - table->setText(rr++, cc, "SM16207S"); - table->setText(rr++, cc, "SM16218"); - table->setText(rr++, cc, "SM16227S"); - table->setText(rr++, cc, "SM16237DS"); - table->setText(rr++, cc, "SM16237S"); - table->setText(rr++, cc, "SM16259S"); - table->setText(rr++, cc, "SM16259S"); - table->setText(rr++, cc, "SM16369"); - table->setText(rr++, cc, "SM16380"); - table->setText(rr++, cc, "SM16388"); - table->setText(rr++, cc, "SM16389"); - table->setText(rr++, cc, "SM16509/16399"); - rr = 0; cc++; - table->setHeaderText(cc, "LS系列"); - table->setText(rr++, cc, "LS9918S"); - table->setText(rr++, cc, "LS9919S"); - table->setText(rr++, cc, "LS9926S"); - table->setText(rr++, cc, "LS9929C"); - table->setText(rr++, cc, "LS9929S"); - table->setText(rr++, cc, "LS9930S"); - table->setText(rr++, cc, "LS9931S"); - table->setText(rr++, cc, "LS9935B"); - table->setText(rr++, cc, "LS9935S"); - table->setText(rr++, cc, "LS9936S"); - table->setText(rr++, cc, "LS9961S"); - rr = 0; cc++; - table->setHeaderText(cc, "MBI系列"); - table->setText(rr++, cc, "MBI5041/5042"); - table->setText(rr++, cc, "MBI5051"); - table->setText(rr++, cc, "MBI5124"); - table->setText(rr++, cc, "MBI5151"); - table->setText(rr++, cc, "MBI5153"); - table->setText(rr++, cc, "MBI5155"); - table->setText(rr++, cc, "MBI5158"); - table->setText(rr++, cc, "MBI5252"); - table->setText(rr++, cc, "MBI5253"); - table->setText(rr++, cc, "MBI5253B"); - table->setText(rr++, cc, "MBI5254"); - table->setText(rr++, cc, "MBI5264"); - table->setText(rr++, cc, "MBI5268"); - table->setText(rr++, cc, "MBI5353"); - table->setText(rr++, cc, "MBI5353B"); - table->setText(rr++, cc, "MBI6322"); - table->setText(rr++, cc, "MBI6328"); - table->setText(rr++, cc, "MBI6334"); - rr = 0; cc++; - table->setHeaderText(cc, "SUM系列"); - table->setText(rr++, cc, "SUM2017"); - table->setText(rr++, cc, "SUM2017T"); - table->setText(rr++, cc, "SUM2017TD"); - table->setText(rr++, cc, "SUM2028"); - table->setText(rr++, cc, "SUM2030"); - table->setText(rr++, cc, "SUM2030T"); - table->setText(rr++, cc, "SUM2032"); - table->setText(rr++, cc, "SUM2033"); - table->setText(rr++, cc, "SUM2035"); - table->setText(rr++, cc, "SUM2036"); - table->setText(rr++, cc, "SUM2037"); - table->setText(rr++, cc, "SUM2117"); - table->setText(rr++, cc, "SUM2130"); - table->setText(rr++, cc, "SUM2131"); - table->setText(rr++, cc, "SUM2135"); - table->setText(rr++, cc, "SUM6086"); - rr = 0; cc++; - table->setHeaderText(cc, "FM系列"); - table->setText(rr++, cc, "FM6128"); - table->setText(rr++, cc, "FM6129"); - table->setText(rr++, cc, "FM6153"); - table->setText(rr++, cc, "FM6182"); - table->setText(rr++, cc, "FM6253"); - table->setText(rr++, cc, "FM6353"); - table->setText(rr++, cc, "FM6356"); - table->setText(rr++, cc, "FM6363"); - table->setText(rr++, cc, "FM6555"); - table->setText(rr++, cc, "FM6565/6569"); - table->setText(rr++, cc, "FM6565CE"); - rr = 0; cc++; - table->setHeaderText(cc, "DP系列"); - table->setText(rr++, cc, "DP5135"); - table->setText(rr++, cc, "DP5220X"); - table->setText(rr++, cc, "DP5525"); - rr = 0; cc++; - table->setHeaderText(cc, "MY系列"); - table->setText(rr++, cc, "MY9758"); - table->setText(rr++, cc, "MY9862"); - table->setText(rr++, cc, "MY9866"); - rr = 0; cc++; - table->setHeaderText(cc, "LYD系列"); - table->setText(rr++, cc, "LYD6168B"); - table->setText(rr++, cc, "LYD6168C"); - table->setText(rr++, cc, "LYD6168D"); - table->setText(rr++, cc, "LYD6168E"); - table->setText(rr++, cc, "LYD6188"); - table->setText(rr++, cc, "LYD6188PC"); - rr = 0; cc++; - table->setHeaderText(cc, "其他系列"); - table->setText(rr++, cc, "通用"); - table->setText(rr++, cc, "A5065"); - table->setText(rr++, cc, "AXS6018"); - table->setText(rr++, cc, "CFD135A"); - table->setText(rr++, cc, "CFD455A"); - table->setText(rr++, cc, "CNS7153"); - table->setText(rr++, cc, "CNS7253"); - table->setText(rr++, cc, "CNS7263"); - table->setText(rr++, cc, "CS2017"); - table->setText(rr++, cc, "CS2033"); - table->setText(rr++, cc, "D26188"); - table->setText(rr++, cc, "HX8055"); - table->setText(rr++, cc, "HX8864"); - table->setText(rr++, cc, "HX8896"); - table->setText(rr++, cc, "RT5965"); - table->setText(rr++, cc, "RT5967"); - table->setText(rr++, cc, "SCL8081A"); - table->setText(rr++, cc, "XM11202G"); - - auto def = fdChipType->text(); - QTableWidgetItem *item; - if(! def.isEmpty()) for(int r=0; rrowCount(); r++) for(int c=0; ccolumnCount(); c++) if((item = table->item(r, c)) && item->text()==def) item->setSelected(true); - connect(table, &Table::cellDoubleClicked, &dlg, [=, &dlg](int row, int column) { - auto text = table->text(row, column); - if(text.isEmpty()) return; - fdChipType->setText(text); - chipType = (column<<8) | row; - dlg.accept(); - }); - vBox->addWidget(table); - - auto btnBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Close); - connect(btnBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject); - connect(btnBox, &QDialogButtonBox::accepted, &dlg, [&, table] { - auto items = table->selectedItems(); - if(items.isEmpty()) { - QMessageBox::warning(&dlg, "Warning", "请选择芯片类型"); - return; - } - fdChipType->setText(items[0]->text()); - auto ranges = table->selectedRanges(); - chipType = (ranges[0].leftColumn()<<8) | ranges[0].topRow(); - dlg.accept(); - }); - vBox->addWidget(btnBox); - - dlg.exec(); - }); + connect(btn, &QPushButton::clicked, dlgChipType, &QDialog::exec); hhhh->addWidget(btn); grid->addLayout(hhhh, 0, 5); @@ -330,110 +427,15 @@ ExpertSmartPointSetWin::ExpertSmartPointSetWin(ExpertWin *expertWin) : BaseWin{e hhhh->setSpacing(0); fdDecodeMode = new QLineEdit(tr("138译码")); + fdDecodeMode->setReadOnly(true); hhhh->addWidget(fdDecodeMode); + def = fdDecodeMode->text(); + if(! def.isEmpty()) for(int r=0; rrowCount(); r++) for(int c=0; ccolumnCount(); c++) if((item = tableDecodeMode->item(r, c)) && item->text()==def) item->setSelected(true); + btn = new QPushButton("..."); btn->setMaximumWidth(30); - connect(btn, &QPushButton::clicked, this, [=] { - QDialog dlg(this); - dlg.setWindowFlag(Qt::WindowMaximizeButtonHint); - dlg.setWindowTitle("选择译码方式"); - dlg.resize(600, 400); - - auto vBox = new VBox(&dlg); - vBox->setContentsMargins(0,0,0,0); - - auto table = new Table(9, 7); - table->setColFit(); - table->setRowFit(); - table->setEditTriggers(QAbstractItemView::NoEditTriggers); - table->setAlternatingRowColors(true); - table->setSelectionMode(QAbstractItemView::SingleSelection); - int rr = 0, cc = 0; - table->setHeaderText(cc, "系列"+QString::number(cc+1)); - table->setText(rr++, cc, "138译码"); - table->setText(rr++, cc, "ICN2012"); - table->setText(rr++, cc, "MW4958"); - table->setText(rr++, cc, "SM5166P"); - table->setText(rr++, cc, "TC7260"); - table->setText(rr++, cc, "TC7258E"); - table->setText(rr++, cc, "TC7258EN"); - table->setText(rr++, cc, "HX6012"); - table->setText(rr++, cc, "ICN2016"); - rr = 0; cc++; - table->setHeaderText(cc, "系列"+QString::number(cc+1)); - table->setText(rr++, cc, "595译码"); - rr = 0; cc++; - table->setHeaderText(cc, "系列"+QString::number(cc+1)); - table->setText(rr++, cc, "5958译码"); - table->setText(rr++, cc, "5960译码"); - table->setText(rr++, cc, "TC7558"); - table->setText(rr++, cc, "RT5957"); - table->setText(rr++, cc, "HX6058"); - table->setText(rr++, cc, "HX6158H"); - table->setText(rr++, cc, "MBI5988"); - rr = 0; cc++; - table->setHeaderText(cc, "系列"+QString::number(cc+1)); - table->setText(rr++, cc, "直接输出 (低)"); - table->setText(rr++, cc, "直接输出 (高)"); - table->setText(rr++, cc, "静态无译码"); - rr = 0; cc++; - table->setHeaderText(cc, "系列"+QString::number(cc+1)); - table->setText(rr++, cc, "ICND2018"); - table->setText(rr++, cc, "ICND3018"); - table->setText(rr++, cc, "ICND2019"); - table->setText(rr++, cc, "TC7559"); - table->setText(rr++, cc, "TC7519"); - table->setText(rr++, cc, "SM5366"); - table->setText(rr++, cc, "DP32020"); - table->setText(rr++, cc, "DP7298A"); - table->setText(rr++, cc, "SM5368"); - rr = 0; cc++; - table->setHeaderText(cc, "系列"+QString::number(cc+1)); - table->setText(rr++, cc, "ICND2013"); - table->setText(rr++, cc, "TC7262"); - table->setText(rr++, cc, "ICND2017"); - table->setText(rr++, cc, "DP7268E"); - table->setText(rr++, cc, "DP32019"); - table->setText(rr++, cc, "HX6013"); - rr = 0; cc++; - table->setHeaderText(cc, "系列"+QString::number(cc+1)); - table->setText(rr++, cc, "SM5266P"); - table->setText(rr++, cc, "FM7239"); - table->setText(rr++, cc, "LS9736"); - table->setText(rr++, cc, "D7266"); - table->setText(rr++, cc, "CFD21338SPC"); - table->setText(rr++, cc, "LS9737_1"); - - auto def = fdDecodeMode->text(); - QTableWidgetItem *item; - if(! def.isEmpty()) for(int r=0; rrowCount(); r++) for(int c=0; ccolumnCount(); c++) if((item = table->item(r, c)) && item->text()==def) item->setSelected(true); - connect(table, &Table::cellDoubleClicked, &dlg, [=, &dlg](int row, int column) { - auto text = table->text(row, column); - if(text.isEmpty()) return; - fdDecodeMode->setText(text); - decodeMode = (column<<8) | row; - dlg.accept(); - }); - vBox->addWidget(table); - - auto btnBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Close); - connect(btnBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject); - connect(btnBox, &QDialogButtonBox::accepted, &dlg, [&, table] { - auto items = table->selectedItems(); - if(items.isEmpty()) { - QMessageBox::warning(&dlg, "Warning", "请选择译码方式"); - return; - } - fdDecodeMode->setText(items[0]->text()); - auto ranges = table->selectedRanges(); - decodeMode = (ranges[0].leftColumn()<<8) | ranges[0].topRow(); - dlg.accept(); - }); - vBox->addWidget(btnBox); - - dlg.exec(); - }); + connect(btn, &QPushButton::clicked, dlgDecodeMode, &QDialog::exec); hhhh->addWidget(btn); grid->addLayout(hhhh, 1, 5); @@ -454,7 +456,7 @@ ExpertSmartPointSetWin::ExpertSmartPointSetWin(ExpertWin *expertWin) : BaseWin{e vBox->setContentsMargins(50, 50, 6, 6); auto lb = new QLabel(tr("扫描行数")); - gFontSize(lb, 16); + gFont(lb, 16); lb->setPalette(bkBlue); vBox->addWidget(lb); vBox->addSpacing(50); @@ -524,7 +526,7 @@ ExpertSmartPointSetWin::ExpertSmartPointSetWin(ExpertWin *expertWin) : BaseWin{e vBox->setContentsMargins(50, 50, 6, 6); auto lb = new QLabel(tr("数据线颜色")); - gFontSize(lb, 16); + gFont(lb, 16); lb->setPalette(bkBlue); vBox->addWidget(lb); vBox->addSpacing(50); @@ -767,8 +769,10 @@ ExpertSmartPointSetWin::ExpertSmartPointSetWin(ExpertWin *expertWin) : BaseWin{e ChipType = fdChipType->text(); DecodeMode = fdDecodeMode->text(); GroupMode = fdGroupMode->currentText(); - // 开始标识 保留 长度 换行间/刻 OE宽 放电间 芯片通道数 模组类型数 - auto msg = QByteArray::fromHex("5555 01 AD 0062 FFFFFFFF 0000ABCD B1000000 0000 415F94A7 AD000000 005C AA55AA55 0000 0036 1770 0000 0280 0000 32 10 00 00 0A 00 00 00 001000 01 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 00000000 00000008 00400020 00001400 FF00FF00 3C000000 00000000 1B022020 00000040 55AA55AA 00000000 B4B5C0AE DEEBB684"); + // 开始标识 保留 长度 换行间/刻 OE宽 放电间 芯片通道数 模组类型数 + auto msg = QByteArray::fromHex("5555 01 AD 0062 FFFFFFFF 0000ABCD B1000000 0000 415F94A7 AD000000 005C AA55AA55 0000 0036 1770 0000 0280 0000 32 10 00 00 0A 01 00 00 001000 01 " + "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 00000000 00000008 00400020 00001400 FF00FF00 3C000000 00000000 1B022020 00000040 55AA55AA 00000000 39F424F6 351B0E53"); + // UUID type len w h ex1 chip/decode ex3 smartset smartset2 走点len endFlag auto unitptr = msg.data()+headMap.end+modMap.Unit; auto w = (quint16_be*)(unitptr+modUnitMap.w); qDebug()<<"w"<close(); + QMessageBox::critical(this, "Error", tr("请求超时")); + return; + } + waitingDlg->close(); + auto iii = idx+1; + stack->setCurrentIndex(iii); + btnPrev->setEnabled(iii > 0); + btnNext->setEnabled(iii < stack->count()-1); + }, waitingDlg); + if(res) QMessageBox::critical(this, "Error", QString(tr("发送失败: "))+QString::fromLocal8Bit(pcap_geterr(pcapSend))); } else if(idx==2) { table->setColumnCount(ModuleWidth); table->setRowCount(ModuleHeight); @@ -795,10 +820,10 @@ ExpertSmartPointSetWin::ExpertSmartPointSetWin(ExpertWin *expertWin) : BaseWin{e if((r&7)!=7) for(int c=7; citemValid(r, c)->setBackground(altColor); else for(int c=0; citemValid(r, c)->setBackground(altColor); } + stack->setCurrentIndex(++idx); + btnPrev->setEnabled(idx > 0); + btnNext->setEnabled(idx < stack->count()-1); } - stack->setCurrentIndex(++idx); - btnPrev->setEnabled(idx > 0); - btnNext->setEnabled(idx < stack->count()-1); }); auto btnCcl = new QPushButton("取消"); diff --git a/ledset/expertsmartpointsetwin.h b/ledset/expertsmartpointsetwin.h index 6c84cf9..6cb44d7 100644 --- a/ledset/expertsmartpointsetwin.h +++ b/ledset/expertsmartpointsetwin.h @@ -13,6 +13,7 @@ public: void save(); ExpertWin *expertWin; + QDialog *dlgChipType, *dlgDecodeMode; Table *table, *tableRow; int virtualCnt = 0; @@ -20,9 +21,10 @@ public: QSpinBox *fdModuleWidth, *fdModuleHeight, *fdGroupNum; QLineEdit *fdChipType, *fdDecodeMode; - int chipType, decodeMode; + Table *tableChipType, *tableDecodeMode; QComboBox *fdGroupMode; int ModuleWidth{16}, ModuleHeight{8}, GroupNum{2}, ScanNum{4}; + int ChipTypeCode, DecodeModeCode; QString ChipType, DecodeMode, GroupMode; }; diff --git a/ledset/globalfunc.cpp b/ledset/globalfunc.cpp index 550eadd..71fcb92 100644 --- a/ledset/globalfunc.cpp +++ b/ledset/globalfunc.cpp @@ -1,6 +1,5 @@ #include "globalfunc.h" #include "gutil/qgui.h" -#define HAVE_REMOTE #include "pcap.h" #include #include diff --git a/ledset/globalfunc.h b/ledset/globalfunc.h index 45f98e6..bf65825 100644 --- a/ledset/globalfunc.h +++ b/ledset/globalfunc.h @@ -1,7 +1,6 @@ #ifndef GLOBALFUNC_H #define GLOBALFUNC_H -#include #include #include "pcaprethread.h" @@ -45,21 +44,19 @@ struct HeadMap { byte bodylen{ipp(2)}; byte end{fi}; }; + extern HeadMap headMap; -extern pcap_t *pcapSend; +extern pcap *pcapSend; +class PcapReThread; extern PcapReThread *reThd; QByteArray getNetDev(QWidget *parent, QByteArray, bool); -inline int sendMsgNet(const byte *msg, int size, const Resp &resp) { - reThd->addResp(resp); - return pcap_sendpacket(pcapSend, msg, size); +inline int sendMsg(const byte *msg, int size, int id, qint64 timeout, std::function callback, WaitingDlg *waitingDlg = 0) { + return reThd->sendMsgNet(msg, size, id, timeout, callback, waitingDlg); } -inline int sendMsg(const byte *msg, int size, const Resp &resp) { - return sendMsgNet(msg, size, resp); -} -inline int sendMsg(QByteArray &msg, const Resp &resp) { - return sendMsg((byte*)msg.data(), msg.size(), resp); +inline int sendMsg(QByteArray &msg, int id, qint64 timeout, std::function callback, WaitingDlg *waitingDlg = 0) { + return sendMsg((byte*)msg.data(), msg.size(), id, timeout, callback, waitingDlg); } #endif // GLOBALFUNC_H diff --git a/ledset/gutil/qgui.cpp b/ledset/gutil/qgui.cpp index 7588ce4..06b6655 100644 --- a/ledset/gutil/qgui.cpp +++ b/ledset/gutil/qgui.cpp @@ -31,9 +31,9 @@ void Table::resizeSec() { int colCnt = columnCount(), remainWidth = header->width(), stretchWidth = 0, secWidth; QTableWidgetItem *item; for(int cc=0; ccdata(0x99).toInt()) > 0) stretchWidth += secWidth; - else remainWidth -= header->sectionSize(cc); - } + if((secWidth = item->data(0x99).toInt()) > 0) stretchWidth += secWidth; + else remainWidth -= header->sectionSize(cc); + } if(remainWidth<=0 || stretchWidth==0) return; for(int cc=0; ccdata(0x99).toInt()) > 0) header->resizeSection(cc, secWidth * remainWidth / stretchWidth); } diff --git a/ledset/gutil/qgui.h b/ledset/gutil/qgui.h index 0e88305..43bf780 100644 --- a/ledset/gutil/qgui.h +++ b/ledset/gutil/qgui.h @@ -7,6 +7,7 @@ #include #include #include +#include #define MainMust \ #if(QT_VERSION_MAJOR > 5) \ @@ -25,11 +26,34 @@ inline int setCurrentData(QComboBox *combo, const QVariant &data) { if(idx>-1) combo->setCurrentIndex(idx); return idx; } -inline void gFontSize(QWidget *wgt, int size) { +inline void gFont(QWidget *wgt, int size, bool bold = false, bool italic = false) { auto ft = wgt->font(); ft.setPixelSize(size); + if(bold) ft.setBold(true); + if(italic) ft.setItalic(true); wgt->setFont(ft); } +inline void gFont(QWidget *wgt, const QString &family, int size = 0, bool bold = false, bool italic = false) { + auto ft = wgt->font(); + ft.setFamily(family); + if(size) ft.setPixelSize(size); + if(bold) ft.setBold(true); + if(italic) ft.setItalic(true); + wgt->setFont(ft); +} +inline QFont qfont(const QString &family, int pixelSize, bool bold = false, bool italic = false) { + QFont ft(family); + ft.setPixelSize(pixelSize); + if(bold) ft.setBold(true); + if(italic) ft.setItalic(true); + return ft; +} +inline void gAppendText(QTextEdit *wgt, const QString &text, const QColor &color) { + auto c0 = wgt->textColor(); + wgt->setTextColor(color); + wgt->append(text); + wgt->setTextColor(c0); +} class VBox : public QBoxLayout { public: @@ -80,14 +104,6 @@ public: }; }; -inline QFont qfont(const QString &family, int pixelSize, bool bold = false, bool italic = false) { - QFont font(family); - font.setPixelSize(pixelSize); - if(bold) font.setBold(true); - if(italic) font.setItalic(true); - return font; -} - class ListWgt : public QListWidget { public: using QListWidget::QListWidget; diff --git a/ledset/ledset.pro b/ledset/ledset.pro index a3acff3..fad005b 100644 --- a/ledset/ledset.pro +++ b/ledset/ledset.pro @@ -9,20 +9,14 @@ CONFIG += embed_translations # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -INCLUDEPATH += $$PWD/WpdPack_4_1_2/Include -LIBS += -L$$PWD/WpdPack_4_1_2/Lib/\ - -lwpcap\ - -lpacket - -lWs2_32 - msvc { contains(QT_ARCH, i386) { QMAKE_LFLAGS += /LARGEADDRESSAWARE } - QMAKE_CXXFLAGS += -execution-charset:utf-8 - QMAKE_CXXFLAGS += -source-charset:utf-8 - + lessThan(QT_MAJOR_VERSION, 6) { + QMAKE_CXXFLAGS += -execution-charset:utf-8 + QMAKE_CXXFLAGS += -source-charset:utf-8 + } CONFIG += force_debug_info CONFIG += separate_debug_info } @@ -32,6 +26,12 @@ win32 { RC_ICONS = 128.ico } + +INCLUDEPATH += $$PWD/npcap-sdk-1.13/Include +LIBS += -L$$PWD/npcap-sdk-1.13/Lib/\ + -lwpcap\ + -lpacket + RESOURCES += res.qrc SOURCES += \ @@ -51,7 +51,8 @@ SOURCES += \ pcaprethread.cpp \ pcapwin.cpp \ screenunit.cpp \ - videowin.cpp + videowin.cpp \ + waitingdlg.cpp HEADERS += \ basewin.h \ @@ -69,7 +70,8 @@ HEADERS += \ pcaprethread.h \ pcapwin.h \ screenunit.h \ - videowin.h + videowin.h \ + waitingdlg.h TRANSLATIONS += \ translations/app_en.ts diff --git a/ledset/main.cpp b/ledset/main.cpp index c295418..73a8dba 100644 --- a/ledset/main.cpp +++ b/ledset/main.cpp @@ -12,9 +12,6 @@ #define _WINSOCKAPI_ #include #include -// #if _MSC_VER >= 1600 -// #pragma execution_character_set("utf-8") -// #endif LONG WINAPI handleException(_EXCEPTION_POINTERS *excep) { QString errCode = QString::number(excep->ExceptionRecord->ExceptionCode, 16); QString errAddr = QString::number((uint)excep->ExceptionRecord->ExceptionAddress, 16); @@ -91,8 +88,6 @@ QPushButton[ss="blue"] {background: #059;} if(qtTrans.load(QLocale::system(), "qt", "_", ":/i18n")) a.installTranslator(&qtTrans); MainWin w; - w.show(); - #ifdef _MSC_VER SetUnhandledExceptionFilter(handleException); #endif diff --git a/ledset/mainwin.cpp b/ledset/mainwin.cpp index ff6476c..6624487 100644 --- a/ledset/mainwin.cpp +++ b/ledset/mainwin.cpp @@ -132,11 +132,10 @@ MainWin::MainWin() { vBox->addWidget(table); auto hstatus = new QHBoxLayout; - hstatus->addWidget(new QLabel(tr("版本:221114"))); + hstatus->addWidget(new QLabel(tr("编译日期")+": "+__DATE__)); hstatus->addStretch(); auto btnNetSelect = new QPushButton("通讯选择"); - btnNetSelect->setMinimumWidth(80); connect(btnNetSelect, &QPushButton::clicked, this, [this] { auto name = getNetDev(this, net_name, false); if(name.isEmpty()) return; @@ -166,12 +165,13 @@ MainWin::MainWin() { hstatus->addWidget(btnNetSelect); auto btnRefresh = new QPushButton(tr("刷新")); - btnRefresh->setMinimumWidth(80); connect(btnRefresh, &QPushButton::clicked, this, &MainWin::getCard); hstatus->addWidget(btnRefresh); vBox->addLayout(hstatus); + show(); + QSettings config(QApplication::applicationDirPath()+"/ledset.config", QSettings::IniFormat); config.beginGroup("GLOBAL");//保存数据 auto name = config.value("net_name").toByteArray(); @@ -198,7 +198,7 @@ MainWin::MainWin() { void MainWin::getCard() { table->setRowCount(0); auto msg = QByteArray::fromHex("5555 01 0D 0008 FFFFFFFF 0000ABCD A0000000 0000 38CB847E 00000000 0000ABCD CD040446"); - auto res = sendMsg(msg, {0x1E0, 30000, [=](const QByteArray data) { + auto res = sendMsg(msg, 0x1E0, 10000, [=](int, const QByteArray data) { if(*(quint32_be*)(data.data()+headMap.ptr) != 0xA0000000) return; auto rr = 0; table->setRowCount(rr+1); @@ -209,11 +209,8 @@ void MainWin::getCard() { table->setText(rr, "vcsNum", QString::number(*(quint32_be*)(data.data()+headMap.body))); table->setText(rr, "netPorts", "P:"+QString::number(virtualVCM)); table->setText(rr, "info", "备注:可直接配屏,无需发送卡"); - }}); - if(res) { - QMessageBox::critical(this, "Error", QString(tr("发送失败: "))+pcap_geterr(pcapSend)); - return; - } + }); + if(res) QMessageBox::critical(this, "Error", QString(tr("发送失败: "))+QString::fromLocal8Bit(pcap_geterr(pcapSend))); } diff --git a/ledset/npcap-sdk-1.13/Include/Packet32.h b/ledset/npcap-sdk-1.13/Include/Packet32.h new file mode 100644 index 0000000..93a9de8 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/Packet32.h @@ -0,0 +1,448 @@ +/***********************IMPORTANT NPCAP LICENSE TERMS*********************** + * + * Npcap (https://npcap.com) is a Windows packet sniffing driver and library + * and is copyright (c) 2013-2022 by Nmap Software LLC ("The Nmap Project"). + * All rights reserved. + * + * Even though Npcap source code is publicly available for review, it + * is not open source software and may not be redistributed or used in + * other software without special permission from the Nmap + * Project. The standard (free) version is usually limited to + * installation on five systems. For more details, see the LICENSE + * file included with Npcap and also avaialble at + * https://github.com/nmap/npcap/blob/master/LICENSE. This header file + * summarizes a few important aspects of the Npcap license, but is not + * a substitute for that full Npcap license agreement. + * + * We fund the Npcap project by selling two types of commercial licenses to a + * special Npcap OEM edition: + * + * 1) The Npcap OEM Redistribution License allows companies distribute Npcap + * OEM within their products. Licensees generally use the Npcap OEM silent + * installer, ensuring a seamless experience for end users. Licensees may + * choose between a perpetual unlimited license or a quarterly term license, + * along with options for commercial support and updates. Prices and details: + * https://npcap.com/oem/redist.html + * + * 2) The Npcap OEM Internal-Use License is for organizations that wish to + * use Npcap OEM internally, without redistribution outside their + * organization. This allows them to bypass the 5-system usage cap of the + * Npcap free edition. It includes commercial support and update options, and + * provides the extra Npcap OEM features such as the silent installer for + * automated deployment. Prices and details: + * https://npcap.com/oem/internal.html + * + * Both of these licenses include updates and support as well as a + * warranty. Npcap OEM also includes a silent installer for unattended + * installation. Further details about Npcap OEM are available from + * https://npcap.com/oem/, and you are also welcome to contact us at + * sales@nmap.com to ask any questions or set up a license for your + * organization. + * + * Free and open source software producers are also welcome to contact us for + * redistribution requests. However, we normally recommend that such authors + * instead ask your users to download and install Npcap themselves. It will + * be free for them if they need 5 or fewer copies. + * + * If the Nmap Project (directly or through one of our commercial + * licensing customers) has granted you additional rights to Npcap or + * Npcap OEM, those additional rights take precedence where they + * conflict with the terms of the license agreement. + * + * Since the Npcap source code is available for download and review, users + * sometimes contribute code patches to fix bugs or add new features. By + * sending these changes to the Nmap Project (including through direct email + * or our mailing lists or submitting pull requests through our source code + * repository), it is understood unless you specify otherwise that you are + * offering the Nmap Project the unlimited, non-exclusive right to reuse, + * modify, and relicense your code contribution so that we may (but are not + * obligated to) incorporate it into Npcap. If you wish to specify special + * license conditions or restrictions on your contributions, just say so when + * you send them. + * + * This software is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. Warranty rights and commercial + * support are available for the OEM Edition described above. + * + * Other copyright notices and attribution may appear below this license + * header. We have kept those for attribution purposes, but any license terms + * granted by those notices apply only to their original work, and not to any + * changes made by the Nmap Project or to this entire file. + * + ***************************************************************************/ +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2007 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Politecnico di Torino, CACE Technologies + * nor the names of its contributors may be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/** @ingroup packetapi + * @{ + */ + +/** @defgroup packet32h Packet.dll definitions and data structures + * Packet32.h contains the data structures and the definitions used by packet.dll. + * The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included + * by the applications that use the functions of this library + * @{ + */ + +#ifndef __PACKET32 +#define __PACKET32 + +#include + +#ifdef HAVE_AIRPCAP_API +#include +#else +#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) +#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ +typedef struct _AirpcapHandle* PAirpcapHandle; +#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */ +#endif /* HAVE_AIRPCAP_API */ + +// Libpcap/wpcap recognizes this macro and knows Npcap Packet API is provided for compilation. +#define HAVE_NPCAP_PACKET_API + +// Working modes, a bitfield +// 0b00000000 +// | ||_ STAT or CAPT +// | |__ MON (TME extensions, not supported) +// | UNUSED +// | UNUSED +// |_____ DUMP (not supported) +#define PACKET_MODE_CAPT 0x0 ///< Capture mode +#define PACKET_MODE_STAT 0x1 ///< Statistical mode +#define PACKET_MODE_MON 0x2 ///< Monitoring mode +#define PACKET_MODE_DUMP 0x10 ///< Dump mode +#define PACKET_MODE_STAT_DUMP PACKET_MODE_DUMP | PACKET_MODE_STAT ///< Statistical dump Mode + + +/// Alignment macro. Defines the alignment size. +#define Packet_ALIGNMENT sizeof(int) +/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT. +#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1)) + +#define NdisMediumNull -1 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumCHDLC -2 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumPPPSerial -3 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumBare80211 -4 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumRadio80211 -5 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumPpi -6 ///< Custom linktype: NDIS doesn't provide an equivalent + +// Loopback behaviour definitions +#define NPF_DISABLE_LOOPBACK 1 ///< Drop the packets sent by the NPF driver +#define NPF_ENABLE_LOOPBACK 2 ///< Capture the packets sent by the NPF driver + +// Timestamp Modes +#define TIMESTAMPMODE_SINGLE_SYNCHRONIZATION 0 // KeQueryPerformanceCounter +#define TIMESTAMPMODE_QUERYSYSTEMTIME 2 // KeQuerySystemTime +#define TIMESTAMPMODE_QUERYSYSTEMTIME_PRECISE 4 // KeQuerySystemTimePrecise, Windows 8 and newer + +/*! + \brief Network type structure. + + This structure is used by the PacketGetNetType() function to return information on the current adapter's type. +*/ +typedef struct NetType +{ + UINT LinkType; ///< The MAC of the current network adapter (see function PacketGetNetType() for more information) + ULONGLONG LinkSpeed; /// UNUSED, set to 0 +}NetType; + + +//some definitions stolen from libpcap + +#ifndef BPF_MAJOR_VERSION + +/*! + \brief A BPF pseudo-assembly program. + + The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet. +*/ +struct bpf_program +{ + UINT bf_len; ///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow. + _Field_size_full_(bf_len) + struct bpf_insn* bf_insns; ///< A pointer to the first instruction of the program. +}; + +/*! + \brief A single BPF pseudo-instruction. + + bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver. +*/ +struct bpf_insn +{ + USHORT code; ///< Instruction type and addressing mode. + UCHAR jt; ///< Jump if true + UCHAR jf; ///< Jump if false + int k; ///< Generic field used for various purposes. +}; + +/*! + \brief Structure that contains a couple of statistics values on the current capture. + + It is used by packet.dll to return statistics about a capture session. +*/ +struct bpf_stat +{ + UINT bs_recv; ///< Number of packets that the driver received from the network adapter + ///< from the beginning of the current capture. This value includes the packets + ///< lost by the driver. + UINT bs_drop; ///< number of packets that the driver lost from the beginning of a capture. + ///< Basically, a packet is lost when the the buffer of the driver is full. + ///< In this situation the packet cannot be stored and the driver rejects it. + UINT ps_ifdrop; ///< drops by interface. XXX not yet supported + UINT bs_capt; ///< number of packets that pass the filter, find place in the kernel buffer and + ///< thus reach the application. +}; + +/*! + \brief Packet header. + + This structure defines the header associated with every packet delivered to the application. +*/ +struct bpf_hdr +{ + struct timeval bh_tstamp; ///< The timestamp associated with the captured packet. + ///< It is stored in a TimeVal structure. + UINT bh_caplen; ///< Length of captured portion. The captured portion can be different + ///< from the original packet, because it is possible (with a proper filter) + ///< to instruct the driver to capture only a portion of the packets. + UINT bh_datalen; ///< Original length of packet + USHORT bh_hdrlen; ///< Length of bpf header (this struct plus alignment padding). In some cases, + ///< a padding could be added between the end of this structure and the packet + ///< data for performance reasons. This filed can be used to retrieve the actual data + ///< of the packet. +}; + +/*! + \brief Dump packet header. + + This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets(). + It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a + packet in a dump file. This makes straightforward sending WinPcap dump files to the network. +*/ +struct dump_bpf_hdr +{ + struct timeval ts; ///< Time stamp of the packet + UINT caplen; ///< Length of captured portion. The captured portion can smaller than the + ///< the original packet, because it is possible (with a proper filter) to + ///< instruct the driver to capture only a portion of the packets. + UINT len; ///< Length of the original packet (off wire). +}; + + +#endif + +struct bpf_stat; + +#define DOSNAMEPREFIX TEXT("Packet_") ///< Prefix added to the adapters device names to create the WinPcap devices +#define MAX_LINK_NAME_LENGTH 64 //< Maximum length of the devices symbolic links +#define NMAX_PACKET 65535 + +/*! + \brief Addresses of a network adapter. + + This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with + an adapter. +*/ +typedef struct npf_if_addr +{ + struct sockaddr_storage IPAddress; ///< IP address. + struct sockaddr_storage SubnetMask; ///< Netmask for that address. + struct sockaddr_storage Broadcast; ///< Broadcast address. +}npf_if_addr; + + +#define ADAPTER_NAME_LENGTH 256 + 12 ///< Maximum length for the name of an adapter. The value is the same used by the IP Helper API. +#define ADAPTER_DESC_LENGTH 128 ///< Maximum length for the description of an adapter. The value is the same used by the IP Helper API. +#define MAX_MAC_ADDR_LENGTH 8 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. +#define MAX_NETWORK_ADDRESSES 16 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. + + +typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API +typedef WAN_ADAPTER* PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API + +#define INFO_FLAG_NDIS_ADAPTER 0 ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter +#define INFO_FLAG_NDISWAN_ADAPTER 1 ///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET +#define INFO_FLAG_DAG_CARD 2 ///< Flag for ADAPTER_INFO: this is a DAG card +#define INFO_FLAG_DAG_FILE 6 ///< Flag for ADAPTER_INFO: this is a DAG file +#define INFO_FLAG_DONT_EXPORT 8 ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones. +#define INFO_FLAG_AIRPCAP_CARD 16 ///< Flag for ADAPTER_INFO: this is an airpcap card +#define INFO_FLAG_NPFIM_DEVICE 32 /// NPFIM device, not supported +#define INFO_FLAG_MASK_NOT_NPF 0xff /// If any of these bits are set, it's not a NPF/Npcap-managed adapter. +#define INFO_FLAG_NPCAP_LOOPBACK 0x100 // Npcap loopback adapter +#define INFO_FLAG_NPCAP_DOT11 0x200 // Npcap dot11_support raw Wifi frame capture + +/*! + \brief Describes an opened network adapter. + + This structure is the most important for the functioning of packet.dll, but the great part of its fields + should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters +*/ +typedef struct _ADAPTER +{ + HANDLE hFile; ///< \internal Handle to an open instance of the NPF driver. + CHAR SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened. + int NumWrites; ///< \internal Number of times a packets written on this adapter will be repeated + ///< on the wire. + HANDLE ReadEvent; ///< A notification event associated with the read calls on the adapter. + ///< It can be passed to standard Win32 functions (like WaitForSingleObject + ///< or WaitForMultipleObjects) to wait until the driver's buffer contains some + ///< data. It is particularly useful in GUI applications that need to wait + ///< concurrently on several events. The PacketSetMinToCopy() + ///< function can be used to define the minimum amount of data in the kernel buffer + ///< that will cause the event to be signalled. + + UINT ReadTimeOut; ///< \internal The amount of time PacketReceivePacket will wait for the ReadEvent to be signalled before issuing a ReadFile. + CHAR Name[ADAPTER_NAME_LENGTH]; + PWAN_ADAPTER pWanAdapter; + UINT Flags; ///< Adapter's flags. Tell if this adapter must be treated in a different way. + +#ifdef HAVE_AIRPCAP_API + PAirpcapHandle AirpcapAd; +#endif // HAVE_AIRPCAP_API +} ADAPTER, * LPADAPTER; + +/*! + \brief Structure that contains a group of packets coming from the driver. + + This structure defines the header associated with every packet delivered to the application. +*/ +typedef struct _PACKET +{ + HANDLE hEvent; ///< \deprecated Still present for compatibility with old applications. + OVERLAPPED OverLapped; ///< \deprecated Still present for compatibility with old applications. + _Field_size_bytes_part_(Length, ulBytesReceived) + PVOID Buffer; ///< Buffer with containing the packets. See the PacketReceivePacket() for + ///< details about the organization of the data in this buffer + UINT Length; ///< Length of the buffer + DWORD ulBytesReceived; ///< Number of valid bytes present in the buffer, i.e. amount of data + ///< received by the last call to PacketReceivePacket() + BOOLEAN bIoComplete; ///< \deprecated Still present for compatibility with old applications. +} PACKET, * LPPACKET; + +/*! + \brief Structure containing an OID request. + + It is used by the PacketRequest() function to send an OID to the interface card driver. + It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, + the list of the multicast groups defined on it, and so on. +*/ +struct _PACKET_OID_DATA +{ + ULONG Oid; ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h + ///< for a complete list of valid codes. + ULONG Length; ///< Length of the data field + _Field_size_full_(Length) + UCHAR Data[1]; ///< variable-lenght field that contains the information passed to or received + ///< from the adapter. +}; +typedef struct _PACKET_OID_DATA PACKET_OID_DATA, * PPACKET_OID_DATA; + +#ifdef __cplusplus +extern "C" +{ +#endif + + /** + * @} + */ + + /* + BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName, + CHAR *Value, + UINT *pValueLen, + CHAR *DefaultVal); + BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName, + WCHAR *Value, + UINT *pValueLen, + WCHAR *DefaultVal); + */ + + //--------------------------------------------------------------------------- + // EXPORTED FUNCTIONS + //--------------------------------------------------------------------------- + + LPCSTR PacketGetVersion(); + LPCSTR PacketGetDriverVersion(); + LPCSTR PacketGetDriverName(); + _Success_(return) BOOLEAN PacketSetMinToCopy(_In_ LPADAPTER AdapterObject, _In_ int nbytes); + _Success_(return) BOOLEAN PacketSetNumWrites(_In_ LPADAPTER AdapterObject, _In_ int nwrites); + _Success_(return) BOOLEAN PacketSetMode(_In_ LPADAPTER AdapterObject, _In_ int mode); + _Success_(return) BOOLEAN PacketSetReadTimeout(_In_ LPADAPTER AdapterObject, _In_ int timeout); + _Success_(return) BOOLEAN PacketSetBpf(_In_ LPADAPTER AdapterObject, _In_ struct bpf_program* fp); + _Success_(return) BOOLEAN PacketSetLoopbackBehavior(_In_ LPADAPTER AdapterObject, _In_ UINT LoopbackBehavior); + _Success_(return) BOOLEAN PacketSetTimestampMode(_In_ LPADAPTER AdapterObject, _In_ ULONG mode); + _Success_(return) BOOLEAN PacketGetTimestampModes(_In_ LPADAPTER AdapterObject, _Inout_updates_to_(pModes[0], pModes[0]) PULONG pModes); + INT PacketSetSnapLen(_In_ LPADAPTER AdapterObject, _In_ int snaplen); + _Success_(return) BOOLEAN PacketGetStats(_In_ LPADAPTER AdapterObject, _Out_ struct bpf_stat* s); + _Success_(return) BOOLEAN PacketGetStatsEx(_In_ LPADAPTER AdapterObject, _Out_ struct bpf_stat* s); + _Success_(return) BOOLEAN PacketSetBuff(_In_ LPADAPTER AdapterObject, _In_ int dim); + _Success_(return) BOOLEAN PacketGetNetType(_In_ LPADAPTER AdapterObject, _Out_ NetType* type); + BOOLEAN PacketIsLoopbackAdapter(_In_ PCCH AdapterName); + int PacketIsMonitorModeSupported(_In_ PCCH AdapterName); + int PacketSetMonitorMode(_In_ PCCH AdapterName, _In_ int mode); + int PacketGetMonitorMode(_In_ PCCH AdapterName); + _Ret_maybenull_ LPADAPTER PacketOpenAdapter(_In_ PCCH AdapterName); + _Success_(return) BOOLEAN PacketSendPacket(_In_ LPADAPTER AdapterObject, _In_ LPPACKET pPacket, _In_ BOOLEAN Sync); + INT PacketSendPackets(_In_ LPADAPTER AdapterObject, _In_ PVOID PacketBuff, _In_ ULONG Size, _In_ BOOLEAN Sync); + LPPACKET PacketAllocatePacket(void); + VOID PacketInitPacket(_Out_ LPPACKET lpPacket, _In_reads_bytes_(Length) PVOID Buffer, _In_ UINT Length); + VOID PacketFreePacket(_In_ _Post_invalid_ LPPACKET lpPacket); + _Success_(return) BOOLEAN PacketReceivePacket(_In_ LPADAPTER AdapterObject, _Out_ LPPACKET lpPacket, _In_ BOOLEAN Sync); + _Success_(return) BOOLEAN PacketSetHwFilter(_In_ LPADAPTER AdapterObject, _In_ ULONG Filter); + _Success_(return) BOOLEAN PacketGetAdapterNames(_Out_writes_opt_(_Old_(*BufferSize)) PCHAR pStr, _Inout_ PULONG BufferSize); + _Success_(return) BOOLEAN PacketGetNetInfoEx(_In_ PCCH AdapterName, _Out_writes_to_(_Old_(*NEntries),*NEntries) npf_if_addr* buffer, _Inout_ PLONG NEntries); + _Success_(return) BOOLEAN PacketRequest(_In_ LPADAPTER AdapterObject, _In_ BOOLEAN Set, _Inout_ PPACKET_OID_DATA OidData); + HANDLE PacketGetReadEvent(_In_ LPADAPTER AdapterObject); + __declspec(deprecated("Kernel dump mode is not supported")) BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void* name, int len); + __declspec(deprecated("Kernel dump mode is not supported")) BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks); + __declspec(deprecated("Kernel dump mode is not supported")) BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync); + BOOL PacketStopDriver(); + BOOL PacketStopDriver60(); + VOID PacketCloseAdapter(_In_ _Post_invalid_ LPADAPTER lpAdapter); + __declspec(deprecated("Deprecated WinPcap Pro function")) BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength); + __declspec(deprecated("Deprecated WinPcap Pro function")) BOOLEAN PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags); + PAirpcapHandle PacketGetAirPcapHandle(_In_ LPADAPTER AdapterObject); + + // + // Used by PacketStartOemEx + // +#define PACKET_START_OEM_NO_NETMON 0x00000001 + +#ifdef __cplusplus +} +#endif + +#endif //__PACKET32 diff --git a/ledset/WpdPack_4_1_2/Include/pcap-bpf.h b/ledset/npcap-sdk-1.13/Include/pcap-bpf.h similarity index 95% rename from ledset/WpdPack_4_1_2/Include/pcap-bpf.h rename to ledset/npcap-sdk-1.13/Include/pcap-bpf.h index 5fe129d..ebb64c3 100644 --- a/ledset/WpdPack_4_1_2/Include/pcap-bpf.h +++ b/ledset/npcap-sdk-1.13/Include/pcap-bpf.h @@ -4,7 +4,7 @@ * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence + * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without @@ -34,8 +34,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.50 2007/04/01 21:43:55 guy Exp $ (LBL) */ /* diff --git a/ledset/WpdPack_4_1_2/Include/pcap-namedb.h b/ledset/npcap-sdk-1.13/Include/pcap-namedb.h similarity index 95% rename from ledset/WpdPack_4_1_2/Include/pcap-namedb.h rename to ledset/npcap-sdk-1.13/Include/pcap-namedb.h index 80a2f00..d5908c9 100644 --- a/ledset/WpdPack_4_1_2/Include/pcap-namedb.h +++ b/ledset/npcap-sdk-1.13/Include/pcap-namedb.h @@ -29,8 +29,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.13 2006/10/04 18:13:32 guy Exp $ (LBL) */ /* diff --git a/ledset/WpdPack_4_1_2/Include/pcap.h b/ledset/npcap-sdk-1.13/Include/pcap.h similarity index 95% rename from ledset/WpdPack_4_1_2/Include/pcap.h rename to ledset/npcap-sdk-1.13/Include/pcap.h index 935f949..174e32d 100644 --- a/ledset/WpdPack_4_1_2/Include/pcap.h +++ b/ledset/npcap-sdk-1.13/Include/pcap.h @@ -29,8 +29,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.59 2006/10/04 18:09:22 guy Exp $ (LBL) */ /* diff --git a/ledset/WpdPack_4_1_2/Include/pcap/bluetooth.h b/ledset/npcap-sdk-1.13/Include/pcap/bluetooth.h similarity index 78% rename from ledset/WpdPack_4_1_2/Include/pcap/bluetooth.h rename to ledset/npcap-sdk-1.13/Include/pcap/bluetooth.h index 7bf65df..15dc5a8 100644 --- a/ledset/WpdPack_4_1_2/Include/pcap/bluetooth.h +++ b/ledset/npcap-sdk-1.13/Include/pcap/bluetooth.h @@ -11,8 +11,8 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior written + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS @@ -29,20 +29,28 @@ * * bluetooth data struct * By Paolo Abeni - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007/09/22 02:10:17 guy Exp $ */ - -#ifndef _PCAP_BLUETOOTH_STRUCTS_H__ -#define _PCAP_BLUETOOTH_STRUCTS_H__ + +#ifndef lib_pcap_bluetooth_h +#define lib_pcap_bluetooth_h + +#include /* - * Header prepended libpcap to each bluetooth h:4 frame. + * Header prepended libpcap to each bluetooth h4 frame, * fields are in network byte order */ typedef struct _pcap_bluetooth_h4_header { - u_int32_t direction; /* if first bit is set direction is incoming */ + uint32_t direction; /* if first bit is set direction is incoming */ } pcap_bluetooth_h4_header; +/* + * Header prepended libpcap to each bluetooth linux monitor frame, + * fields are in network byte order + */ +typedef struct _pcap_bluetooth_linux_monitor_header { + uint16_t adapter_id; + uint16_t opcode; +} pcap_bluetooth_linux_monitor_header; #endif diff --git a/ledset/npcap-sdk-1.13/Include/pcap/bpf.h b/ledset/npcap-sdk-1.13/Include/pcap/bpf.h new file mode 100644 index 0000000..f813258 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/bpf.h @@ -0,0 +1,298 @@ +/*- + * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from the Stanford/CMU enet packet filter, + * (net/enet.c) distributed as part of 4.3BSD, and code contributed + * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence + * Berkeley Laboratory. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)bpf.h 7.1 (Berkeley) 5/7/91 + */ + +/* + * This is libpcap's cut-down version of bpf.h; it includes only + * the stuff needed for the code generator and the userland BPF + * interpreter, and the libpcap APIs for setting filters, etc.. + * + * "pcap-bpf.c" will include the native OS version, as it deals with + * the OS's BPF implementation. + * + * At least two programs found by Google Code Search explicitly includes + * (even though / includes it for you), + * so moving that stuff to would break the build for some + * programs. + */ + +/* + * If we've already included , don't re-define this stuff. + * We assume BSD-style multiple-include protection in , + * which is true of all but the oldest versions of FreeBSD and NetBSD, + * or Tru64 UNIX-style multiple-include protection (or, at least, + * Tru64 UNIX 5.x-style; I don't have earlier versions available to check), + * or AIX-style multiple-include protection (or, at least, AIX 5.x-style; + * I don't have earlier versions available to check), or QNX-style + * multiple-include protection (as per GitHub pull request #394). + * + * We trust that they will define structures and macros and types in + * a fashion that's source-compatible and binary-compatible with our + * definitions. + * + * We do not check for BPF_MAJOR_VERSION, as that's defined by + * , which is directly or indirectly included in some + * programs that also include pcap.h, and doesn't + * define stuff we need. We *do* protect against + * defining various macros for BPF code itself; says + * + * Try and keep these values and structures similar to BSD, especially + * the BPF code definitions which need to match so you can share filters + * + * so we trust that it will define them in a fashion that's source-compatible + * and binary-compatible with our definitions. + * + * This also provides our own multiple-include protection. + */ +#if !defined(_NET_BPF_H_) && !defined(_NET_BPF_H_INCLUDED) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h) +#define lib_pcap_bpf_h + +/* u_char, u_short and u_int */ +#if defined(_WIN32) + #include +#elif defined(HAVE_SYS_TYPES_H) + #include +#endif + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* BSD style release date */ +#define BPF_RELEASE 199606 + +#ifdef MSDOS /* must be 32-bit */ +typedef long bpf_int32; +typedef unsigned long bpf_u_int32; +#else +typedef int bpf_int32; +typedef u_int bpf_u_int32; +#endif + +/* + * Alignment macros. BPF_WORDALIGN rounds up to the next + * even multiple of BPF_ALIGNMENT. + * + * Tcpdump's print-pflog.c uses this, so we define it here. + */ +#ifndef __NetBSD__ +#define BPF_ALIGNMENT sizeof(bpf_int32) +#else +#define BPF_ALIGNMENT sizeof(long) +#endif +#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) + +/* + * Structure for "pcap_compile()", "pcap_setfilter()", etc.. + */ +struct bpf_program { + u_int bf_len; + struct bpf_insn *bf_insns; +}; + +/* + * The instruction encodings. + * + * Please inform tcpdump-workers@lists.tcpdump.org if you use any + * of the reserved values, so that we can note that they're used + * (and perhaps implement it in the reference BPF implementation + * and encourage its implementation elsewhere). + */ + +/* + * The upper 8 bits of the opcode aren't used. BSD/OS used 0x8000. + */ + +/* instruction classes */ +#define BPF_CLASS(code) ((code) & 0x07) +#define BPF_LD 0x00 +#define BPF_LDX 0x01 +#define BPF_ST 0x02 +#define BPF_STX 0x03 +#define BPF_ALU 0x04 +#define BPF_JMP 0x05 +#define BPF_RET 0x06 +#define BPF_MISC 0x07 + +/* ld/ldx fields */ +#define BPF_SIZE(code) ((code) & 0x18) +#define BPF_W 0x00 +#define BPF_H 0x08 +#define BPF_B 0x10 +/* 0x18 reserved; used by BSD/OS */ +#define BPF_MODE(code) ((code) & 0xe0) +#define BPF_IMM 0x00 +#define BPF_ABS 0x20 +#define BPF_IND 0x40 +#define BPF_MEM 0x60 +#define BPF_LEN 0x80 +#define BPF_MSH 0xa0 +/* 0xc0 reserved; used by BSD/OS */ +/* 0xe0 reserved; used by BSD/OS */ + +/* alu/jmp fields */ +#define BPF_OP(code) ((code) & 0xf0) +#define BPF_ADD 0x00 +#define BPF_SUB 0x10 +#define BPF_MUL 0x20 +#define BPF_DIV 0x30 +#define BPF_OR 0x40 +#define BPF_AND 0x50 +#define BPF_LSH 0x60 +#define BPF_RSH 0x70 +#define BPF_NEG 0x80 +#define BPF_MOD 0x90 +#define BPF_XOR 0xa0 +/* 0xb0 reserved */ +/* 0xc0 reserved */ +/* 0xd0 reserved */ +/* 0xe0 reserved */ +/* 0xf0 reserved */ + +#define BPF_JA 0x00 +#define BPF_JEQ 0x10 +#define BPF_JGT 0x20 +#define BPF_JGE 0x30 +#define BPF_JSET 0x40 +/* 0x50 reserved; used on BSD/OS */ +/* 0x60 reserved */ +/* 0x70 reserved */ +/* 0x80 reserved */ +/* 0x90 reserved */ +/* 0xa0 reserved */ +/* 0xb0 reserved */ +/* 0xc0 reserved */ +/* 0xd0 reserved */ +/* 0xe0 reserved */ +/* 0xf0 reserved */ +#define BPF_SRC(code) ((code) & 0x08) +#define BPF_K 0x00 +#define BPF_X 0x08 + +/* ret - BPF_K and BPF_X also apply */ +#define BPF_RVAL(code) ((code) & 0x18) +#define BPF_A 0x10 +/* 0x18 reserved */ + +/* misc */ +#define BPF_MISCOP(code) ((code) & 0xf8) +#define BPF_TAX 0x00 +/* 0x08 reserved */ +/* 0x10 reserved */ +/* 0x18 reserved */ +/* #define BPF_COP 0x20 NetBSD "coprocessor" extensions */ +/* 0x28 reserved */ +/* 0x30 reserved */ +/* 0x38 reserved */ +/* #define BPF_COPX 0x40 NetBSD "coprocessor" extensions */ +/* also used on BSD/OS */ +/* 0x48 reserved */ +/* 0x50 reserved */ +/* 0x58 reserved */ +/* 0x60 reserved */ +/* 0x68 reserved */ +/* 0x70 reserved */ +/* 0x78 reserved */ +#define BPF_TXA 0x80 +/* 0x88 reserved */ +/* 0x90 reserved */ +/* 0x98 reserved */ +/* 0xa0 reserved */ +/* 0xa8 reserved */ +/* 0xb0 reserved */ +/* 0xb8 reserved */ +/* 0xc0 reserved; used on BSD/OS */ +/* 0xc8 reserved */ +/* 0xd0 reserved */ +/* 0xd8 reserved */ +/* 0xe0 reserved */ +/* 0xe8 reserved */ +/* 0xf0 reserved */ +/* 0xf8 reserved */ + +/* + * The instruction data structure. + */ +struct bpf_insn { + u_short code; + u_char jt; + u_char jf; + bpf_u_int32 k; +}; + +/* + * Macros for insn array initializers. + * + * In case somebody's included , or something else that + * gives the kernel's definitions of BPF statements, get rid of its + * definitions, so we can supply ours instead. If some kernel's + * definitions aren't *binary-compatible* with what BPF has had + * since it first sprung from the brows of Van Jacobson and Steve + * McCanne, that kernel should be fixed. + */ +#ifdef BPF_STMT +#undef BPF_STMT +#endif +#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } +#ifdef BPF_JUMP +#undef BPF_JUMP +#endif +#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } + +PCAP_AVAILABLE_0_4 +PCAP_API u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); + +PCAP_AVAILABLE_0_6 +PCAP_API int bpf_validate(const struct bpf_insn *f, int len); + +PCAP_AVAILABLE_0_4 +PCAP_API char *bpf_image(const struct bpf_insn *, int); + +PCAP_AVAILABLE_0_6 +PCAP_API void bpf_dump(const struct bpf_program *, int); + +/* + * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). + */ +#define BPF_MEMWORDS 16 + +#ifdef __cplusplus +} +#endif + +#endif /* !defined(_NET_BPF_H_) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h) */ diff --git a/ledset/npcap-sdk-1.13/Include/pcap/can_socketcan.h b/ledset/npcap-sdk-1.13/Include/pcap/can_socketcan.h new file mode 100644 index 0000000..0cb3584 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/can_socketcan.h @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from the Stanford/CMU enet packet filter, + * (net/enet.c) distributed as part of 4.3BSD, and code contributed + * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence + * Berkeley Laboratory. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef lib_pcap_can_socketcan_h +#define lib_pcap_can_socketcan_h + +#include + +/* + * SocketCAN header, as per Documentation/networking/can.txt in the + * Linux source. + */ +typedef struct { + uint32_t can_id; + uint8_t payload_length; + uint8_t fd_flags; + uint8_t reserved1; + uint8_t reserved2; +} pcap_can_socketcan_hdr; + +/* Bits in the fd_flags field */ +#define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */ +#define CANFD_ESI 0x02 /* error state indicator of the transmitting node */ +#define CANFD_FDF 0x04 /* mark CAN FD for dual use of CAN format */ + +#endif diff --git a/ledset/npcap-sdk-1.13/Include/pcap/compiler-tests.h b/ledset/npcap-sdk-1.13/Include/pcap/compiler-tests.h new file mode 100644 index 0000000..2d98a70 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/compiler-tests.h @@ -0,0 +1,189 @@ +/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ +/* + * Copyright (c) 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the Computer Systems + * Engineering Group at Lawrence Berkeley Laboratory. + * 4. Neither the name of the University nor of the Laboratory may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef lib_pcap_compiler_tests_h +#define lib_pcap_compiler_tests_h + +/* + * This was introduced by Clang: + * + * https://clang.llvm.org/docs/LanguageExtensions.html#has-attribute + * + * in some version (which version?); it has been picked up by GCC 5.0. + */ +#ifndef __has_attribute + /* + * It's a macro, so you can check whether it's defined to check + * whether it's supported. + * + * If it's not, define it to always return 0, so that we move on to + * the fallback checks. + */ + #define __has_attribute(x) 0 +#endif + +/* + * Note that the C90 spec's "6.8.1 Conditional inclusion" and the + * C99 spec's and C11 spec's "6.10.1 Conditional inclusion" say: + * + * Prior to evaluation, macro invocations in the list of preprocessing + * tokens that will become the controlling constant expression are + * replaced (except for those macro names modified by the defined unary + * operator), just as in normal text. If the token "defined" is + * generated as a result of this replacement process or use of the + * "defined" unary operator does not match one of the two specified + * forms prior to macro replacement, the behavior is undefined. + * + * so you shouldn't use defined() in a #define that's used in #if or + * #elif. Some versions of Clang, for example, will warn about this. + * + * Instead, we check whether the pre-defined macros for particular + * compilers are defined and, if not, define the "is this version XXX + * or a later version of this compiler" macros as 0. + */ + +/* + * Check whether this is GCC major.minor or a later release, or some + * compiler that claims to be "just like GCC" of that version or a + * later release. + */ + +#if ! defined(__GNUC__) + /* Not GCC and not "just like GCC" */ + #define PCAP_IS_AT_LEAST_GNUC_VERSION(major, minor) 0 +#else + /* GCC or "just like GCC" */ + #define PCAP_IS_AT_LEAST_GNUC_VERSION(major, minor) \ + (__GNUC__ > (major) || \ + (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) +#endif + +/* + * Check whether this is Clang major.minor or a later release. + */ + +#if !defined(__clang__) + /* Not Clang */ + #define PCAP_IS_AT_LEAST_CLANG_VERSION(major, minor) 0 +#else + /* Clang */ + #define PCAP_IS_AT_LEAST_CLANG_VERSION(major, minor) \ + (__clang_major__ > (major) || \ + (__clang_major__ == (major) && __clang_minor__ >= (minor))) +#endif + +/* + * Check whether this is Sun C/SunPro C/Oracle Studio major.minor + * or a later release. + * + * The version number in __SUNPRO_C is encoded in hex BCD, with the + * uppermost hex digit being the major version number, the next + * one or two hex digits being the minor version number, and + * the last digit being the patch version. + * + * It represents the *compiler* version, not the product version; + * see + * + * https://sourceforge.net/p/predef/wiki/Compilers/ + * + * for a partial mapping, which we assume continues for later + * 12.x product releases. + */ + +#if ! defined(__SUNPRO_C) + /* Not Sun/Oracle C */ + #define PCAP_IS_AT_LEAST_SUNC_VERSION(major,minor) 0 +#else + /* Sun/Oracle C */ + #define PCAP_SUNPRO_VERSION_TO_BCD(major, minor) \ + (((minor) >= 10) ? \ + (((major) << 12) | (((minor)/10) << 8) | (((minor)%10) << 4)) : \ + (((major) << 8) | ((minor) << 4))) + #define PCAP_IS_AT_LEAST_SUNC_VERSION(major,minor) \ + (__SUNPRO_C >= PCAP_SUNPRO_VERSION_TO_BCD((major), (minor))) +#endif + +/* + * Check whether this is IBM XL C major.minor or a later release. + * + * The version number in __xlC__ has the major version in the + * upper 8 bits and the minor version in the lower 8 bits. + * On AIX __xlC__ is always defined, __ibmxl__ becomes defined in XL C 16.1. + * On Linux since XL C 13.1.6 __xlC__ is not defined by default anymore, but + * __ibmxl__ is defined since at least XL C 13.1.1. + */ + +#if ! defined(__xlC__) && ! defined(__ibmxl__) + /* Not XL C */ + #define PCAP_IS_AT_LEAST_XL_C_VERSION(major,minor) 0 +#else + /* XL C */ + #if defined(__ibmxl__) + /* + * Later Linux version of XL C; use __ibmxl_version__ to test + * the version. + */ + #define PCAP_IS_AT_LEAST_XL_C_VERSION(major, minor) \ + (__ibmxl_version__ > (major) || \ + (__ibmxl_version__ == (major) && __ibmxl_release__ >= (minor))) + #else /* __ibmxl__ */ + /* + * __ibmxl__ not defined; use __xlC__ to test the version. + */ + #define PCAP_IS_AT_LEAST_XL_C_VERSION(major, minor) \ + (__xlC__ >= (((major) << 8) | (minor))) + #endif /* __ibmxl__ */ +#endif + +/* + * Check whether this is HP aC++/HP C major.minor or a later release. + * + * The version number in __HP_aCC is encoded in zero-padded decimal BCD, + * with the "A." stripped off, the uppermost two decimal digits being + * the major version number, the next two decimal digits being the minor + * version number, and the last two decimal digits being the patch version. + * (Strip off the A., remove the . between the major and minor version + * number, and add two digits of patch.) + */ + +#if ! defined(__HP_aCC) + /* Not HP C */ + #define PCAP_IS_AT_LEAST_HP_C_VERSION(major,minor) 0 +#else + /* HP C */ + #define PCAP_IS_AT_LEAST_HP_C_VERSION(major,minor) \ + (__HP_aCC >= ((major)*10000 + (minor)*100)) +#endif + +#endif /* lib_pcap_compiler_tests_h */ diff --git a/ledset/npcap-sdk-1.13/Include/pcap/dlt.h b/ledset/npcap-sdk-1.13/Include/pcap/dlt.h new file mode 100644 index 0000000..40fd7db --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/dlt.h @@ -0,0 +1,1586 @@ +/*- + * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from the Stanford/CMU enet packet filter, + * (net/enet.c) distributed as part of 4.3BSD, and code contributed + * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence + * Berkeley Laboratory. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)bpf.h 7.1 (Berkeley) 5/7/91 + */ + +#ifndef lib_pcap_dlt_h +#define lib_pcap_dlt_h + +/* + * Link-layer header type codes. + * + * Do *NOT* add new values to this list without asking + * "tcpdump-workers@lists.tcpdump.org" for a value. Otherwise, you run + * the risk of using a value that's already being used for some other + * purpose, and of having tools that read libpcap-format captures not + * being able to handle captures with your new DLT_ value, with no hope + * that they will ever be changed to do so (as that would destroy their + * ability to read captures using that value for that other purpose). + * + * See + * + * https://www.tcpdump.org/linktypes.html + * + * for detailed descriptions of some of these link-layer header types. + */ + +/* + * These are the types that are the same on all platforms, and that + * have been defined by for ages. + */ +#define DLT_NULL 0 /* BSD loopback encapsulation */ +#define DLT_EN10MB 1 /* Ethernet (10Mb) */ +#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */ +#define DLT_AX25 3 /* Amateur Radio AX.25 */ +#define DLT_PRONET 4 /* Proteon ProNET Token Ring */ +#define DLT_CHAOS 5 /* Chaos */ +#define DLT_IEEE802 6 /* 802.5 Token Ring */ +#define DLT_ARCNET 7 /* ARCNET, with BSD-style header */ +#define DLT_SLIP 8 /* Serial Line IP */ +#define DLT_PPP 9 /* Point-to-point Protocol */ +#define DLT_FDDI 10 /* FDDI */ + +/* + * These are types that are different on some platforms, and that + * have been defined by for ages. We use #ifdefs to + * detect the BSDs that define them differently from the traditional + * libpcap + * + * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS, + * but I don't know what the right #define is for BSD/OS. + */ +#define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */ + +#ifdef __OpenBSD__ +#define DLT_RAW 14 /* raw IP */ +#else +#define DLT_RAW 12 /* raw IP */ +#endif + +/* + * Given that the only OS that currently generates BSD/OS SLIP or PPP + * is, well, BSD/OS, arguably everybody should have chosen its values + * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they + * didn't. So it goes. + */ +#if defined(__NetBSD__) || defined(__FreeBSD__) +#ifndef DLT_SLIP_BSDOS +#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */ +#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */ +#endif +#else +#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */ +#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */ +#endif + +/* + * NetBSD uses 15 for HIPPI. + * + * From a quick look at sys/net/if_hippi.h and sys/net/if_hippisubr.c + * in an older version of NetBSD , the header appears to be: + * + * a 1-byte ULP field (ULP-id)? + * + * a 1-byte flags field; + * + * a 2-byte "offsets" field; + * + * a 4-byte "D2 length" field (D2_Size?); + * + * a 4-byte "destination switch" field (or a 1-byte field + * containing the Forwarding Class, Double_Wide, and Message_Type + * sub fields, followed by a 3-byte Destination_Switch_Address + * field?, HIPPI-LE 3.4-style?); + * + * a 4-byte "source switch" field (or a 1-byte field containing the + * Destination_Address_type and Source_Address_Type fields, followed + * by a 3-byte Source_Switch_Address field, HIPPI-LE 3.4-style?); + * + * a 2-byte reserved field; + * + * a 6-byte destination address field; + * + * a 2-byte "local admin" field; + * + * a 6-byte source address field; + * + * followed by an 802.2 LLC header. + * + * This looks somewhat like something derived from the HIPPI-FP 4.4 + * Header_Area, followed an HIPPI-FP 4.4 D1_Area containing a D1 data set + * with the header in HIPPI-LE 3.4 (ANSI X3.218-1993), followed by an + * HIPPI-FP 4.4 D2_Area (with no Offset) containing the 802.2 LLC header + * and payload? Or does the "offsets" field contain the D2_Offset, + * with that many bytes of offset before the payload? + * + * See http://wotug.org/parallel/standards/hippi/ for an archive of + * HIPPI specifications. + * + * RFC 2067 imposes some additional restrictions. It says that the + * Offset is always zero + * + * HIPPI is long-gone, and the source files found in an older version + * of NetBSD don't appear to be in the main CVS branch, so we may never + * see a capture with this link-layer type. + */ +#if defined(__NetBSD__) +#define DLT_HIPPI 15 /* HIPPI */ +#endif + +/* + * NetBSD uses 16 for DLT_HDLC; see below. + * BSD/OS uses it for PPP; see above. + * As far as I know, no other OS uses it for anything; don't use it + * for anything else. + */ + +/* + * 17 was used for DLT_PFLOG in OpenBSD; it no longer is. + * + * It was DLT_LANE8023 in SuSE 6.3, so we defined LINKTYPE_PFLOG + * as 117 so that pflog captures would use a link-layer header type + * value that didn't collide with any other values. On all + * platforms other than OpenBSD, we defined DLT_PFLOG as 117, + * and we mapped between LINKTYPE_PFLOG and DLT_PFLOG. + * + * OpenBSD eventually switched to using 117 for DLT_PFLOG as well. + * + * Don't use 17 for anything else. + */ + +/* + * 18 is used for DLT_PFSYNC in OpenBSD, NetBSD, DragonFly BSD and + * macOS; don't use it for anything else. (FreeBSD uses 121, which + * collides with DLT_HHDLC, even though it doesn't use 18 for + * anything and doesn't appear to have ever used it for anything.) + * + * We define it as 18 on those platforms; it is, unfortunately, used + * for DLT_CIP in Suse 6.3, so we don't define it as DLT_PFSYNC + * in general. As the packet format for it, like that for + * DLT_PFLOG, is not only OS-dependent but OS-version-dependent, + * we don't support printing it in tcpdump except on OSes that + * have the relevant header files, so it's not that useful on + * other platforms. + */ +#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__) +#define DLT_PFSYNC 18 +#endif + +#define DLT_ATM_CLIP 19 /* Linux Classical IP over ATM */ + +/* + * Apparently Redback uses this for its SmartEdge 400/800. I hope + * nobody else decided to use it, too. + */ +#define DLT_REDBACK_SMARTEDGE 32 + +/* + * These values are defined by NetBSD; other platforms should refrain from + * using them for other purposes, so that NetBSD savefiles with link + * types of 50 or 51 can be read as this type on all platforms. + */ +#define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */ +#define DLT_PPP_ETHER 51 /* PPP over Ethernet */ + +/* + * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses + * a link-layer type of 99 for the tcpdump it supplies. The link-layer + * header has 6 bytes of unknown data, something that appears to be an + * Ethernet type, and 36 bytes that appear to be 0 in at least one capture + * I've seen. + */ +#define DLT_SYMANTEC_FIREWALL 99 + +/* + * Values between 100 and 103 are used in capture file headers as + * link-layer header type LINKTYPE_ values corresponding to DLT_ types + * that differ between platforms; don't use those values for new DLT_ + * new types. + */ + +/* + * Values starting with 104 are used for newly-assigned link-layer + * header type values; for those link-layer header types, the DLT_ + * value returned by pcap_datalink() and passed to pcap_open_dead(), + * and the LINKTYPE_ value that appears in capture files, are the + * same. + * + * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is + * the highest such value. + */ +#define DLT_MATCHING_MIN 104 + +/* + * This value was defined by libpcap 0.5; platforms that have defined + * it with a different value should define it here with that value - + * a link type of 104 in a save file will be mapped to DLT_C_HDLC, + * whatever value that happens to be, so programs will correctly + * handle files with that link type regardless of the value of + * DLT_C_HDLC. + * + * The name DLT_C_HDLC was used by BSD/OS; we use that name for source + * compatibility with programs written for BSD/OS. + * + * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well, + * for source compatibility with programs written for libpcap 0.5. + */ +#define DLT_C_HDLC 104 /* Cisco HDLC */ +#define DLT_CHDLC DLT_C_HDLC + +#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */ + +/* + * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW, + * except when it isn't. (I.e., sometimes it's just raw IP, and + * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL, + * so that we don't have to worry about the link-layer header.) + */ + +/* + * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides + * with other values. + * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header + * (DLCI, etc.). + */ +#define DLT_FRELAY 107 + +/* + * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except + * that the AF_ type in the link-layer header is in network byte order. + * + * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so + * we don't use 12 for it in OSes other than OpenBSD; instead, we + * use the same value as LINKTYPE_LOOP. + */ +#ifdef __OpenBSD__ +#define DLT_LOOP 12 +#else +#define DLT_LOOP 108 +#endif + +/* + * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's + * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other + * than OpenBSD; instead, we use the same value as LINKTYPE_ENC. + */ +#ifdef __OpenBSD__ +#define DLT_ENC 13 +#else +#define DLT_ENC 109 +#endif + +/* + * Values 110 and 111 are reserved for use in capture file headers + * as link-layer types corresponding to DLT_ types that might differ + * between platforms; don't use those values for new DLT_ types + * other than the corresponding DLT_ types. + */ + +/* + * NetBSD uses 16 for (Cisco) "HDLC framing". For other platforms, + * we define it to have the same value as LINKTYPE_NETBSD_HDLC. + */ +#if defined(__NetBSD__) +#define DLT_HDLC 16 /* Cisco HDLC */ +#else +#define DLT_HDLC 112 +#endif + +/* + * Linux cooked sockets. + */ +#define DLT_LINUX_SLL 113 + +/* + * Apple LocalTalk hardware. + */ +#define DLT_LTALK 114 + +/* + * Acorn Econet. + */ +#define DLT_ECONET 115 + +/* + * Reserved for use with OpenBSD ipfilter. + */ +#define DLT_IPFILTER 116 + +/* + * OpenBSD DLT_PFLOG. + */ +#define DLT_PFLOG 117 + +/* + * Registered for Cisco-internal use. + */ +#define DLT_CISCO_IOS 118 + +/* + * For 802.11 cards using the Prism II chips, with a link-layer + * header including Prism monitor mode information plus an 802.11 + * header. + */ +#define DLT_PRISM_HEADER 119 + +/* + * Reserved for Aironet 802.11 cards, with an Aironet link-layer header + * (see Doug Ambrisko's FreeBSD patches). + */ +#define DLT_AIRONET_HEADER 120 + +/* + * Sigh. + * + * 121 was reserved for Siemens HiPath HDLC on 2002-01-25, as + * requested by Tomas Kukosa. + * + * On 2004-02-25, a FreeBSD checkin to sys/net/bpf.h was made that + * assigned 121 as DLT_PFSYNC. In current versions, its libpcap + * does DLT_ <-> LINKTYPE_ mapping, mapping DLT_PFSYNC to a + * LINKTYPE_PFSYNC value of 246, so it should write out DLT_PFSYNC + * dump files with 246 as the link-layer header type. (Earlier + * versions might not have done mapping, in which case they would + * have written them out with a link-layer header type of 121.) + * + * OpenBSD, from which pf came, however, uses 18 for DLT_PFSYNC; + * its libpcap does no DLT_ <-> LINKTYPE_ mapping, so it would + * write out DLT_PFSYNC dump files with use 18 as the link-layer + * header type. + * + * NetBSD, DragonFly BSD, and Darwin also use 18 for DLT_PFSYNC; in + * current versions, their libpcaps do DLT_ <-> LINKTYPE_ mapping, + * mapping DLT_PFSYNC to a LINKTYPE_PFSYNC value of 246, so they + * should write out DLT_PFSYNC dump files with 246 as the link-layer + * header type. (Earlier versions might not have done mapping, + * in which case they'd work the same way OpenBSD does, writing + * them out with a link-layer header type of 18.) + * + * We'll define DLT_PFSYNC as: + * + * 18 on NetBSD, OpenBSD, DragonFly BSD, and Darwin; + * + * 121 on FreeBSD; + * + * 246 everywhere else. + * + * We'll define DLT_HHDLC as 121 on everything except for FreeBSD; + * anybody who wants to compile, on FreeBSD, code that uses DLT_HHDLC + * is out of luck. + * + * We'll define LINKTYPE_PFSYNC as 246 on *all* platforms, so that + * savefiles written using *this* code won't use 18 or 121 for PFSYNC, + * they'll all use 246. + * + * Code that uses pcap_datalink() to determine the link-layer header + * type of a savefile won't, when built and run on FreeBSD, be able + * to distinguish between LINKTYPE_PFSYNC and LINKTYPE_HHDLC capture + * files, as pcap_datalink() will give 121 for both of them. Code + * that doesn't, such as the code in Wireshark, will be able to + * distinguish between them. + * + * FreeBSD's libpcap won't map a link-layer header type of 18 - i.e., + * DLT_PFSYNC files from OpenBSD and possibly older versions of NetBSD, + * DragonFly BSD, and macOS - to DLT_PFSYNC, so code built with FreeBSD's + * libpcap won't treat those files as DLT_PFSYNC files. + * + * Other libpcaps won't map a link-layer header type of 121 to DLT_PFSYNC; + * this means they can read DLT_HHDLC files, if any exist, but won't + * treat pcap files written by any older versions of FreeBSD libpcap that + * didn't map to 246 as DLT_PFSYNC files. + */ +#ifdef __FreeBSD__ +#define DLT_PFSYNC 121 +#else +#define DLT_HHDLC 121 +#endif + +/* + * This is for RFC 2625 IP-over-Fibre Channel. + * + * This is not for use with raw Fibre Channel, where the link-layer + * header starts with a Fibre Channel frame header; it's for IP-over-FC, + * where the link-layer header starts with an RFC 2625 Network_Header + * field. + */ +#define DLT_IP_OVER_FC 122 + +/* + * This is for Full Frontal ATM on Solaris with SunATM, with a + * pseudo-header followed by an AALn PDU. + * + * There may be other forms of Full Frontal ATM on other OSes, + * with different pseudo-headers. + * + * If ATM software returns a pseudo-header with VPI/VCI information + * (and, ideally, packet type information, e.g. signalling, ILMI, + * LANE, LLC-multiplexed traffic, etc.), it should not use + * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump + * and the like don't have to infer the presence or absence of a + * pseudo-header and the form of the pseudo-header. + */ +#define DLT_SUNATM 123 /* Solaris+SunATM */ + +/* + * Reserved as per request from Kent Dahlgren + * for private use. + */ +#define DLT_RIO 124 /* RapidIO */ +#define DLT_PCI_EXP 125 /* PCI Express */ +#define DLT_AURORA 126 /* Xilinx Aurora link layer */ + +/* + * Header for 802.11 plus a number of bits of link-layer information + * including radio information, used by some recent BSD drivers as + * well as the madwifi Atheros driver for Linux. + */ +#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */ + +/* + * Reserved for the TZSP encapsulation, as per request from + * Chris Waters + * TZSP is a generic encapsulation for any other link type, + * which includes a means to include meta-information + * with the packet, e.g. signal strength and channel + * for 802.11 packets. + */ +#define DLT_TZSP 128 /* Tazmen Sniffer Protocol */ + +/* + * BSD's ARCNET headers have the source host, destination host, + * and type at the beginning of the packet; that's what's handed + * up to userland via BPF. + * + * Linux's ARCNET headers, however, have a 2-byte offset field + * between the host IDs and the type; that's what's handed up + * to userland via PF_PACKET sockets. + * + * We therefore have to have separate DLT_ values for them. + */ +#define DLT_ARCNET_LINUX 129 /* ARCNET */ + +/* + * Juniper-private data link types, as per request from + * Hannes Gredler . The DLT_s are used + * for passing on chassis-internal metainformation such as + * QOS profiles, etc.. + */ +#define DLT_JUNIPER_MLPPP 130 +#define DLT_JUNIPER_MLFR 131 +#define DLT_JUNIPER_ES 132 +#define DLT_JUNIPER_GGSN 133 +#define DLT_JUNIPER_MFR 134 +#define DLT_JUNIPER_ATM2 135 +#define DLT_JUNIPER_SERVICES 136 +#define DLT_JUNIPER_ATM1 137 + +/* + * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund + * . The header that's presented is an Ethernet-like + * header: + * + * #define FIREWIRE_EUI64_LEN 8 + * struct firewire_header { + * u_char firewire_dhost[FIREWIRE_EUI64_LEN]; + * u_char firewire_shost[FIREWIRE_EUI64_LEN]; + * u_short firewire_type; + * }; + * + * with "firewire_type" being an Ethernet type value, rather than, + * for example, raw GASP frames being handed up. + */ +#define DLT_APPLE_IP_OVER_IEEE1394 138 + +/* + * Various SS7 encapsulations, as per a request from Jeff Morriss + * and subsequent discussions. + */ +#define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */ +#define DLT_MTP2 140 /* MTP2, without pseudo-header */ +#define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */ +#define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */ + +/* + * DOCSIS MAC frames. + */ +#define DLT_DOCSIS 143 + +/* + * Linux-IrDA packets. Protocol defined at https://www.irda.org. + * Those packets include IrLAP headers and above (IrLMP...), but + * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy + * framing can be handled by the hardware and depend on the bitrate. + * This is exactly the format you would get capturing on a Linux-IrDA + * interface (irdaX), but not on a raw serial port. + * Note the capture is done in "Linux-cooked" mode, so each packet include + * a fake packet header (struct sll_header). This is because IrDA packet + * decoding is dependent on the direction of the packet (incoming or + * outgoing). + * When/if other platform implement IrDA capture, we may revisit the + * issue and define a real DLT_IRDA... + * Jean II + */ +#define DLT_LINUX_IRDA 144 + +/* + * Reserved for IBM SP switch and IBM Next Federation switch. + */ +#define DLT_IBM_SP 145 +#define DLT_IBM_SN 146 + +/* + * Reserved for private use. If you have some link-layer header type + * that you want to use within your organization, with the capture files + * using that link-layer header type not ever be sent outside your + * organization, you can use these values. + * + * No libpcap release will use these for any purpose, nor will any + * tcpdump release use them, either. + * + * Do *NOT* use these in capture files that you expect anybody not using + * your private versions of capture-file-reading tools to read; in + * particular, do *NOT* use them in products, otherwise you may find that + * people won't be able to use tcpdump, or snort, or Ethereal, or... to + * read capture files from your firewall/intrusion detection/traffic + * monitoring/etc. appliance, or whatever product uses that DLT_ value, + * and you may also find that the developers of those applications will + * not accept patches to let them read those files. + * + * Also, do not use them if somebody might send you a capture using them + * for *their* private type and tools using them for *your* private type + * would have to read them. + * + * Instead, ask "tcpdump-workers@lists.tcpdump.org" for a new DLT_ value, + * as per the comment above, and use the type you're given. + */ +#define DLT_USER0 147 +#define DLT_USER1 148 +#define DLT_USER2 149 +#define DLT_USER3 150 +#define DLT_USER4 151 +#define DLT_USER5 152 +#define DLT_USER6 153 +#define DLT_USER7 154 +#define DLT_USER8 155 +#define DLT_USER9 156 +#define DLT_USER10 157 +#define DLT_USER11 158 +#define DLT_USER12 159 +#define DLT_USER13 160 +#define DLT_USER14 161 +#define DLT_USER15 162 + +/* + * For future use with 802.11 captures - defined by AbsoluteValue + * Systems to store a number of bits of link-layer information + * including radio information: + * + * http://www.shaftnet.org/~pizza/software/capturefrm.txt + * + * but it might be used by some non-AVS drivers now or in the + * future. + */ +#define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */ + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . The DLT_s are used + * for passing on chassis-internal metainformation such as + * QOS profiles, etc.. + */ +#define DLT_JUNIPER_MONITOR 164 + +/* + * BACnet MS/TP frames. + */ +#define DLT_BACNET_MS_TP 165 + +/* + * Another PPP variant as per request from Karsten Keil . + * + * This is used in some OSes to allow a kernel socket filter to distinguish + * between incoming and outgoing packets, on a socket intended to + * supply pppd with outgoing packets so it can do dial-on-demand and + * hangup-on-lack-of-demand; incoming packets are filtered out so they + * don't cause pppd to hold the connection up (you don't want random + * input packets such as port scans, packets from old lost connections, + * etc. to force the connection to stay up). + * + * The first byte of the PPP header (0xff03) is modified to accommodate + * the direction - 0x00 = IN, 0x01 = OUT. + */ +#define DLT_PPP_PPPD 166 + +/* + * Names for backwards compatibility with older versions of some PPP + * software; new software should use DLT_PPP_PPPD. + */ +#define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD +#define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . The DLT_s are used + * for passing on chassis-internal metainformation such as + * QOS profiles, cookies, etc.. + */ +#define DLT_JUNIPER_PPPOE 167 +#define DLT_JUNIPER_PPPOE_ATM 168 + +#define DLT_GPRS_LLC 169 /* GPRS LLC */ +#define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */ +#define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */ + +/* + * Requested by Oolan Zimmer for use in Gcom's T1/E1 line + * monitoring equipment. + */ +#define DLT_GCOM_T1E1 172 +#define DLT_GCOM_SERIAL 173 + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . The DLT_ is used + * for internal communication to Physical Interface Cards (PIC) + */ +#define DLT_JUNIPER_PIC_PEER 174 + +/* + * Link types requested by Gregor Maier of Endace + * Measurement Systems. They add an ERF header (see + * https://www.endace.com/support/EndaceRecordFormat.pdf) in front of + * the link-layer header. + */ +#define DLT_ERF_ETH 175 /* Ethernet */ +#define DLT_ERF_POS 176 /* Packet-over-SONET */ + +/* + * Requested by Daniele Orlandi for raw LAPD + * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header + * includes additional information before the LAPD header, so it's + * not necessarily a generic LAPD header. + */ +#define DLT_LINUX_LAPD 177 + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . + * The DLT_ are used for prepending meta-information + * like interface index, interface name + * before standard Ethernet, PPP, Frelay & C-HDLC Frames + */ +#define DLT_JUNIPER_ETHER 178 +#define DLT_JUNIPER_PPP 179 +#define DLT_JUNIPER_FRELAY 180 +#define DLT_JUNIPER_CHDLC 181 + +/* + * Multi Link Frame Relay (FRF.16) + */ +#define DLT_MFR 182 + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . + * The DLT_ is used for internal communication with a + * voice Adapter Card (PIC) + */ +#define DLT_JUNIPER_VP 183 + +/* + * Arinc 429 frames. + * DLT_ requested by Gianluca Varenni . + * Every frame contains a 32bit A429 label. + * More documentation on Arinc 429 can be found at + * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf + */ +#define DLT_A429 184 + +/* + * Arinc 653 Interpartition Communication messages. + * DLT_ requested by Gianluca Varenni . + * Please refer to the A653-1 standard for more information. + */ +#define DLT_A653_ICM 185 + +/* + * This used to be "USB packets, beginning with a USB setup header; + * requested by Paolo Abeni ." + * + * However, that header didn't work all that well - it left out some + * useful information - and was abandoned in favor of the DLT_USB_LINUX + * header. + * + * This is now used by FreeBSD for its BPF taps for USB; that has its + * own headers. So it is written, so it is done. + * + * For source-code compatibility, we also define DLT_USB to have this + * value. We do it numerically so that, if code that includes this + * file (directly or indirectly) also includes an OS header that also + * defines DLT_USB as 186, we don't get a redefinition warning. + * (NetBSD 7 does that.) + */ +#define DLT_USB_FREEBSD 186 +#define DLT_USB 186 + +/* + * Bluetooth HCI UART transport layer (part H:4); requested by + * Paolo Abeni. + */ +#define DLT_BLUETOOTH_HCI_H4 187 + +/* + * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz + * . + */ +#define DLT_IEEE802_16_MAC_CPS 188 + +/* + * USB packets, beginning with a Linux USB header; requested by + * Paolo Abeni . + */ +#define DLT_USB_LINUX 189 + +/* + * Controller Area Network (CAN) v. 2.0B packets. + * DLT_ requested by Gianluca Varenni . + * Used to dump CAN packets coming from a CAN Vector board. + * More documentation on the CAN v2.0B frames can be found at + * http://www.can-cia.org/downloads/?269 + */ +#define DLT_CAN20B 190 + +/* + * IEEE 802.15.4, with address fields padded, as is done by Linux + * drivers; requested by Juergen Schimmer. + */ +#define DLT_IEEE802_15_4_LINUX 191 + +/* + * Per Packet Information encapsulated packets. + * DLT_ requested by Gianluca Varenni . + */ +#define DLT_PPI 192 + +/* + * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header; + * requested by Charles Clancy. + */ +#define DLT_IEEE802_16_MAC_CPS_RADIO 193 + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . + * The DLT_ is used for internal communication with a + * integrated service module (ISM). + */ +#define DLT_JUNIPER_ISM 194 + +/* + * IEEE 802.15.4, exactly as it appears in the spec (no padding, no + * nothing); requested by Mikko Saarnivala . + * For this one, we expect the FCS to be present at the end of the frame; + * if the frame has no FCS, DLT_IEEE802_15_4_NOFCS should be used. + * + * We keep the name DLT_IEEE802_15_4 as an alias for backwards + * compatibility, but, again, this should *only* be used for 802.15.4 + * frames that include the FCS. + */ +#define DLT_IEEE802_15_4_WITHFCS 195 +#define DLT_IEEE802_15_4 DLT_IEEE802_15_4_WITHFCS + +/* + * Various link-layer types, with a pseudo-header, for SITA + * (https://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com). + */ +#define DLT_SITA 196 + +/* + * Various link-layer types, with a pseudo-header, for Endace DAG cards; + * encapsulates Endace ERF records. Requested by Stephen Donnelly + * . + */ +#define DLT_ERF 197 + +/* + * Special header prepended to Ethernet packets when capturing from a + * u10 Networks board. Requested by Phil Mulholland + * . + */ +#define DLT_RAIF1 198 + +/* + * IPMB packet for IPMI, beginning with a 2-byte header, followed by + * the I2C slave address, followed by the netFn and LUN, etc.. + * Requested by Chanthy Toeung . + * + * XXX - this used to be called DLT_IPMB, back when we got the + * impression from the email thread requesting it that the packet + * had no extra 2-byte header. We've renamed it; if anybody used + * DLT_IPMB and assumed no 2-byte header, this will cause the compile + * to fail, at which point we'll have to figure out what to do about + * the two header types using the same DLT_/LINKTYPE_ value. If that + * doesn't happen, we'll assume nobody used it and that the redefinition + * is safe. + */ +#define DLT_IPMB_KONTRON 199 + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . + * The DLT_ is used for capturing data on a secure tunnel interface. + */ +#define DLT_JUNIPER_ST 200 + +/* + * Bluetooth HCI UART transport layer (part H:4), with pseudo-header + * that includes direction information; requested by Paolo Abeni. + */ +#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201 + +/* + * AX.25 packet with a 1-byte KISS header; see + * + * http://www.ax25.net/kiss.htm + * + * as per Richard Stearn . + */ +#define DLT_AX25_KISS 202 + +/* + * LAPD packets from an ISDN channel, starting with the address field, + * with no pseudo-header. + * Requested by Varuna De Silva . + */ +#define DLT_LAPD 203 + +/* + * PPP, with a one-byte direction pseudo-header prepended - zero means + * "received by this host", non-zero (any non-zero value) means "sent by + * this host" - as per Will Barker . + * + * Don't confuse this with DLT_PPP_WITH_DIRECTION, which is an old + * name for what is now called DLT_PPP_PPPD. + */ +#define DLT_PPP_WITH_DIR 204 + +/* + * Cisco HDLC, with a one-byte direction pseudo-header prepended - zero + * means "received by this host", non-zero (any non-zero value) means + * "sent by this host" - as per Will Barker . + */ +#define DLT_C_HDLC_WITH_DIR 205 + +/* + * Frame Relay, with a one-byte direction pseudo-header prepended - zero + * means "received by this host" (DCE -> DTE), non-zero (any non-zero + * value) means "sent by this host" (DTE -> DCE) - as per Will Barker + * . + */ +#define DLT_FRELAY_WITH_DIR 206 + +/* + * LAPB, with a one-byte direction pseudo-header prepended - zero means + * "received by this host" (DCE -> DTE), non-zero (any non-zero value) + * means "sent by this host" (DTE -> DCE)- as per Will Barker + * . + */ +#define DLT_LAPB_WITH_DIR 207 + +/* + * 208 is reserved for an as-yet-unspecified proprietary link-layer + * type, as requested by Will Barker. + */ + +/* + * IPMB with a Linux-specific pseudo-header; as requested by Alexey Neyman + * . + */ +#define DLT_IPMB_LINUX 209 + +/* + * FlexRay automotive bus - http://www.flexray.com/ - as requested + * by Hannes Kaelber . + */ +#define DLT_FLEXRAY 210 + +/* + * Media Oriented Systems Transport (MOST) bus for multimedia + * transport - https://www.mostcooperation.com/ - as requested + * by Hannes Kaelber . + */ +#define DLT_MOST 211 + +/* + * Local Interconnect Network (LIN) bus for vehicle networks - + * http://www.lin-subbus.org/ - as requested by Hannes Kaelber + * . + */ +#define DLT_LIN 212 + +/* + * X2E-private data link type used for serial line capture, + * as requested by Hannes Kaelber . + */ +#define DLT_X2E_SERIAL 213 + +/* + * X2E-private data link type used for the Xoraya data logger + * family, as requested by Hannes Kaelber . + */ +#define DLT_X2E_XORAYA 214 + +/* + * IEEE 802.15.4, exactly as it appears in the spec (no padding, no + * nothing), but with the PHY-level data for non-ASK PHYs (4 octets + * of 0 as preamble, one octet of SFD, one octet of frame length+ + * reserved bit, and then the MAC-layer data, starting with the + * frame control field). + * + * Requested by Max Filippov . + */ +#define DLT_IEEE802_15_4_NONASK_PHY 215 + +/* + * David Gibson requested this for + * captures from the Linux kernel /dev/input/eventN devices. This + * is used to communicate keystrokes and mouse movements from the + * Linux kernel to display systems, such as Xorg. + */ +#define DLT_LINUX_EVDEV 216 + +/* + * GSM Um and Abis interfaces, preceded by a "gsmtap" header. + * + * Requested by Harald Welte . + */ +#define DLT_GSMTAP_UM 217 +#define DLT_GSMTAP_ABIS 218 + +/* + * MPLS, with an MPLS label as the link-layer header. + * Requested by Michele Marchetto on behalf + * of OpenBSD. + */ +#define DLT_MPLS 219 + +/* + * USB packets, beginning with a Linux USB header, with the USB header + * padded to 64 bytes; required for memory-mapped access. + */ +#define DLT_USB_LINUX_MMAPPED 220 + +/* + * DECT packets, with a pseudo-header; requested by + * Matthias Wenzel . + */ +#define DLT_DECT 221 + +/* + * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" + * Date: Mon, 11 May 2009 11:18:30 -0500 + * + * DLT_AOS. We need it for AOS Space Data Link Protocol. + * I have already written dissectors for but need an OK from + * legal before I can submit a patch. + * + */ +#define DLT_AOS 222 + +/* + * Wireless HART (Highway Addressable Remote Transducer) + * From the HART Communication Foundation + * IES/PAS 62591 + * + * Requested by Sam Roberts . + */ +#define DLT_WIHART 223 + +/* + * Fibre Channel FC-2 frames, beginning with a Frame_Header. + * Requested by Kahou Lei . + */ +#define DLT_FC_2 224 + +/* + * Fibre Channel FC-2 frames, beginning with an encoding of the + * SOF, and ending with an encoding of the EOF. + * + * The encodings represent the frame delimiters as 4-byte sequences + * representing the corresponding ordered sets, with K28.5 + * represented as 0xBC, and the D symbols as the corresponding + * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2, + * is represented as 0xBC 0xB5 0x55 0x55. + * + * Requested by Kahou Lei . + */ +#define DLT_FC_2_WITH_FRAME_DELIMS 225 + +/* + * Solaris ipnet pseudo-header; requested by Darren Reed . + * + * The pseudo-header starts with a one-byte version number; for version 2, + * the pseudo-header is: + * + * struct dl_ipnetinfo { + * uint8_t dli_version; + * uint8_t dli_family; + * uint16_t dli_htype; + * uint32_t dli_pktlen; + * uint32_t dli_ifindex; + * uint32_t dli_grifindex; + * uint32_t dli_zsrc; + * uint32_t dli_zdst; + * }; + * + * dli_version is 2 for the current version of the pseudo-header. + * + * dli_family is a Solaris address family value, so it's 2 for IPv4 + * and 26 for IPv6. + * + * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing + * packets, and 2 for packets arriving from another zone on the same + * machine. + * + * dli_pktlen is the length of the packet data following the pseudo-header + * (so the captured length minus dli_pktlen is the length of the + * pseudo-header, assuming the entire pseudo-header was captured). + * + * dli_ifindex is the interface index of the interface on which the + * packet arrived. + * + * dli_grifindex is the group interface index number (for IPMP interfaces). + * + * dli_zsrc is the zone identifier for the source of the packet. + * + * dli_zdst is the zone identifier for the destination of the packet. + * + * A zone number of 0 is the global zone; a zone number of 0xffffffff + * means that the packet arrived from another host on the network, not + * from another zone on the same machine. + * + * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates + * which of those it is. + */ +#define DLT_IPNET 226 + +/* + * CAN (Controller Area Network) frames, with a pseudo-header as supplied + * by Linux SocketCAN, and with multi-byte numerical fields in that header + * in big-endian byte order. + * + * See Documentation/networking/can.txt in the Linux source. + * + * Requested by Felix Obenhuber . + */ +#define DLT_CAN_SOCKETCAN 227 + +/* + * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies + * whether it's v4 or v6. Requested by Darren Reed . + */ +#define DLT_IPV4 228 +#define DLT_IPV6 229 + +/* + * IEEE 802.15.4, exactly as it appears in the spec (no padding, no + * nothing), and with no FCS at the end of the frame; requested by + * Jon Smirl . + */ +#define DLT_IEEE802_15_4_NOFCS 230 + +/* + * Raw D-Bus: + * + * https://www.freedesktop.org/wiki/Software/dbus + * + * messages: + * + * https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages + * + * starting with the endianness flag, followed by the message type, etc., + * but without the authentication handshake before the message sequence: + * + * https://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol + * + * Requested by Martin Vidner . + */ +#define DLT_DBUS 231 + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . + */ +#define DLT_JUNIPER_VS 232 +#define DLT_JUNIPER_SRX_E2E 233 +#define DLT_JUNIPER_FIBRECHANNEL 234 + +/* + * DVB-CI (DVB Common Interface for communication between a PC Card + * module and a DVB receiver). See + * + * https://www.kaiser.cx/pcap-dvbci.html + * + * for the specification. + * + * Requested by Martin Kaiser . + */ +#define DLT_DVB_CI 235 + +/* + * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but + * *not* the same as, 27.010). Requested by Hans-Christoph Schemmel + * . + */ +#define DLT_MUX27010 236 + +/* + * STANAG 5066 D_PDUs. Requested by M. Baris Demiray + * . + */ +#define DLT_STANAG_5066_D_PDU 237 + +/* + * Juniper-private data link type, as per request from + * Hannes Gredler . + */ +#define DLT_JUNIPER_ATM_CEMIC 238 + +/* + * NetFilter LOG messages + * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets) + * + * Requested by Jakub Zawadzki + */ +#define DLT_NFLOG 239 + +/* + * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type + * for Ethernet packets with a 4-byte pseudo-header and always + * with the payload including the FCS, as supplied by their + * netANALYZER hardware and software. + * + * Requested by Holger P. Frommer + */ +#define DLT_NETANALYZER 240 + +/* + * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type + * for Ethernet packets with a 4-byte pseudo-header and FCS and + * with the Ethernet header preceded by 7 bytes of preamble and + * 1 byte of SFD, as supplied by their netANALYZER hardware and + * software. + * + * Requested by Holger P. Frommer + */ +#define DLT_NETANALYZER_TRANSPARENT 241 + +/* + * IP-over-InfiniBand, as specified by RFC 4391. + * + * Requested by Petr Sumbera . + */ +#define DLT_IPOIB 242 + +/* + * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0). + * + * Requested by Guy Martin . + */ +#define DLT_MPEG_2_TS 243 + +/* + * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as + * used by their ng40 protocol tester. + * + * Requested by Jens Grimmer . + */ +#define DLT_NG40 244 + +/* + * Pseudo-header giving adapter number and flags, followed by an NFC + * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU, + * as specified by NFC Forum Logical Link Control Protocol Technical + * Specification LLCP 1.1. + * + * Requested by Mike Wakerly . + */ +#define DLT_NFC_LLCP 245 + +/* + * 246 is used as LINKTYPE_PFSYNC; do not use it for any other purpose. + * + * DLT_PFSYNC has different values on different platforms, and all of + * them collide with something used elsewhere. On platforms that + * don't already define it, define it as 246. + */ +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__) +#define DLT_PFSYNC 246 +#endif + +/* + * Raw InfiniBand packets, starting with the Local Routing Header. + * + * Requested by Oren Kladnitsky . + */ +#define DLT_INFINIBAND 247 + +/* + * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6). + * + * Requested by Michael Tuexen . + */ +#define DLT_SCTP 248 + +/* + * USB packets, beginning with a USBPcap header. + * + * Requested by Tomasz Mon + */ +#define DLT_USBPCAP 249 + +/* + * Schweitzer Engineering Laboratories "RTAC" product serial-line + * packets. + * + * Requested by Chris Bontje . + */ +#define DLT_RTAC_SERIAL 250 + +/* + * Bluetooth Low Energy air interface link-layer packets. + * + * Requested by Mike Kershaw . + */ +#define DLT_BLUETOOTH_LE_LL 251 + +/* + * DLT type for upper-protocol layer PDU saves from wireshark. + * + * the actual contents are determined by two TAGs stored with each + * packet: + * EXP_PDU_TAG_LINKTYPE the link type (LINKTYPE_ value) of the + * original packet. + * + * EXP_PDU_TAG_PROTO_NAME the name of the wireshark dissector + * that can make sense of the data stored. + */ +#define DLT_WIRESHARK_UPPER_PDU 252 + +/* + * DLT type for the netlink protocol (nlmon devices). + */ +#define DLT_NETLINK 253 + +/* + * Bluetooth Linux Monitor headers for the BlueZ stack. + */ +#define DLT_BLUETOOTH_LINUX_MONITOR 254 + +/* + * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as + * captured by Ubertooth. + */ +#define DLT_BLUETOOTH_BREDR_BB 255 + +/* + * Bluetooth Low Energy link layer packets, as captured by Ubertooth. + */ +#define DLT_BLUETOOTH_LE_LL_WITH_PHDR 256 + +/* + * PROFIBUS data link layer. + */ +#define DLT_PROFIBUS_DL 257 + +/* + * Apple's DLT_PKTAP headers. + * + * Sadly, the folks at Apple either had no clue that the DLT_USERn values + * are for internal use within an organization and partners only, and + * didn't know that the right way to get a link-layer header type is to + * ask tcpdump.org for one, or knew and didn't care, so they just + * used DLT_USER2, which causes problems for everything except for + * their version of tcpdump. + * + * So I'll just give them one; hopefully this will show up in a + * libpcap release in time for them to get this into 10.10 Big Sur + * or whatever Mavericks' successor is called. LINKTYPE_PKTAP + * will be 258 *even on macOS*; that is *intentional*, so that + * PKTAP files look the same on *all* OSes (different OSes can have + * different numerical values for a given DLT_, but *MUST NOT* have + * different values for what goes in a file, as files can be moved + * between OSes!). + * + * When capturing, on a system with a Darwin-based OS, on a device + * that returns 149 (DLT_USER2 and Apple's DLT_PKTAP) with this + * version of libpcap, the DLT_ value for the pcap_t will be DLT_PKTAP, + * and that will continue to be DLT_USER2 on Darwin-based OSes. That way, + * binary compatibility with Mavericks is preserved for programs using + * this version of libpcap. This does mean that if you were using + * DLT_USER2 for some capture device on macOS, you can't do so with + * this version of libpcap, just as you can't with Apple's libpcap - + * on macOS, they define DLT_PKTAP to be DLT_USER2, so programs won't + * be able to distinguish between PKTAP and whatever you were using + * DLT_USER2 for. + * + * If the program saves the capture to a file using this version of + * libpcap's pcap_dump code, the LINKTYPE_ value in the file will be + * LINKTYPE_PKTAP, which will be 258, even on Darwin-based OSes. + * That way, the file will *not* be a DLT_USER2 file. That means + * that the latest version of tcpdump, when built with this version + * of libpcap, and sufficiently recent versions of Wireshark will + * be able to read those files and interpret them correctly; however, + * Apple's version of tcpdump in OS X 10.9 won't be able to handle + * them. (Hopefully, Apple will pick up this version of libpcap, + * and the corresponding version of tcpdump, so that tcpdump will + * be able to handle the old LINKTYPE_USER2 captures *and* the new + * LINKTYPE_PKTAP captures.) + */ +#ifdef __APPLE__ +#define DLT_PKTAP DLT_USER2 +#else +#define DLT_PKTAP 258 +#endif + +/* + * Ethernet packets preceded by a header giving the last 6 octets + * of the preamble specified by 802.3-2012 Clause 65, section + * 65.1.3.2 "Transmit". + */ +#define DLT_EPON 259 + +/* + * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format" + * in the PICMG HPM.2 specification. + */ +#define DLT_IPMI_HPM_2 260 + +/* + * per Joshua Wright , formats for Zwave captures. + */ +#define DLT_ZWAVE_R1_R2 261 +#define DLT_ZWAVE_R3 262 + +/* + * per Steve Karg , formats for Wattstopper + * Digital Lighting Management room bus serial protocol captures. + */ +#define DLT_WATTSTOPPER_DLM 263 + +/* + * ISO 14443 contactless smart card messages. + */ +#define DLT_ISO_14443 264 + +/* + * Radio data system (RDS) groups. IEC 62106. + * Per Jonathan Brucker . + */ +#define DLT_RDS 265 + +/* + * USB packets, beginning with a Darwin (macOS, etc.) header. + */ +#define DLT_USB_DARWIN 266 + +/* + * OpenBSD DLT_OPENFLOW. + */ +#define DLT_OPENFLOW 267 + +/* + * SDLC frames containing SNA PDUs. + */ +#define DLT_SDLC 268 + +/* + * per "Selvig, Bjorn" used for + * TI protocol sniffer. + */ +#define DLT_TI_LLN_SNIFFER 269 + +/* + * per: Erik de Jong for + * https://github.com/eriknl/LoRaTap/releases/tag/v0.1 + */ +#define DLT_LORATAP 270 + +/* + * per: Stefanha at gmail.com for + * https://lists.sandelman.ca/pipermail/tcpdump-workers/2017-May/000772.html + * and: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/vsockmon.h + * for: https://qemu-project.org/Features/VirtioVsock + */ +#define DLT_VSOCK 271 + +/* + * Nordic Semiconductor Bluetooth LE sniffer. + */ +#define DLT_NORDIC_BLE 272 + +/* + * Excentis DOCSIS 3.1 RF sniffer (XRA-31) + * per: bruno.verstuyft at excentis.com + * https://www.xra31.com/xra-header + */ +#define DLT_DOCSIS31_XRA31 273 + +/* + * mPackets, as specified by IEEE 802.3br Figure 99-4, starting + * with the preamble and always ending with a CRC field. + */ +#define DLT_ETHERNET_MPACKET 274 + +/* + * DisplayPort AUX channel monitoring data as specified by VESA + * DisplayPort(DP) Standard preceded by a pseudo-header. + * per dirk.eibach at gdsys.cc + */ +#define DLT_DISPLAYPORT_AUX 275 + +/* + * Linux cooked sockets v2. + */ +#define DLT_LINUX_SLL2 276 + +/* + * Sercos Monitor, per Manuel Jacob + */ +#define DLT_SERCOS_MONITOR 277 + +/* + * OpenVizsla http://openvizsla.org is open source USB analyzer hardware. + * It consists of FPGA with attached USB phy and FTDI chip for streaming + * the data to the host PC. + * + * Current OpenVizsla data encapsulation format is described here: + * https://github.com/matwey/libopenvizsla/wiki/OpenVizsla-protocol-description + * + */ +#define DLT_OPENVIZSLA 278 + +/* + * The Elektrobit High Speed Capture and Replay (EBHSCR) protocol is produced + * by a PCIe Card for interfacing high speed automotive interfaces. + * + * The specification for this frame format can be found at: + * https://www.elektrobit.com/ebhscr + * + * for Guenter.Ebermann at elektrobit.com + * + */ +#define DLT_EBHSCR 279 + +/* + * The https://fd.io vpp graph dispatch tracer produces pcap trace files + * in the format documented here: + * https://fdio-vpp.readthedocs.io/en/latest/gettingstarted/developers/vnet.html#graph-dispatcher-pcap-tracing + */ +#define DLT_VPP_DISPATCH 280 + +/* + * Broadcom Ethernet switches (ROBO switch) 4 bytes proprietary tagging format. + */ +#define DLT_DSA_TAG_BRCM 281 +#define DLT_DSA_TAG_BRCM_PREPEND 282 + +/* + * IEEE 802.15.4 with pseudo-header and optional meta-data TLVs, PHY payload + * exactly as it appears in the spec (no padding, no nothing), and FCS if + * specified by FCS Type TLV; requested by James Ko . + * Specification at https://github.com/jkcko/ieee802.15.4-tap + */ +#define DLT_IEEE802_15_4_TAP 283 + +/* + * Marvell (Ethertype) Distributed Switch Architecture proprietary tagging format. + */ +#define DLT_DSA_TAG_DSA 284 +#define DLT_DSA_TAG_EDSA 285 + +/* + * Payload of lawful intercept packets using the ELEE protocol; + * https://socket.hr/draft-dfranusic-opsawg-elee-00.xml + * https://xml2rfc.tools.ietf.org/cgi-bin/xml2rfc.cgi?url=https://socket.hr/draft-dfranusic-opsawg-elee-00.xml&modeAsFormat=html/ascii + */ +#define DLT_ELEE 286 + +/* + * Serial frames transmitted between a host and a Z-Wave chip. + */ +#define DLT_Z_WAVE_SERIAL 287 + +/* + * USB 2.0, 1.1, and 1.0 packets as transmitted over the cable. + */ +#define DLT_USB_2_0 288 + +/* + * ATSC Link-Layer Protocol (A/330) packets. + */ +#define DLT_ATSC_ALP 289 + +/* + * In case the code that includes this file (directly or indirectly) + * has also included OS files that happen to define DLT_MATCHING_MAX, + * with a different value (perhaps because that OS hasn't picked up + * the latest version of our DLT definitions), we undefine the + * previous value of DLT_MATCHING_MAX. + */ +#ifdef DLT_MATCHING_MAX +#undef DLT_MATCHING_MAX +#endif +#define DLT_MATCHING_MAX 289 /* highest value in the "matching" range */ + +/* + * DLT and savefile link type values are split into a class and + * a member of that class. A class value of 0 indicates a regular + * DLT_/LINKTYPE_ value. + */ +#define DLT_CLASS(x) ((x) & 0x03ff0000) + +/* + * NetBSD-specific generic "raw" link type. The class value indicates + * that this is the generic raw type, and the lower 16 bits are the + * address family we're dealing with. Those values are NetBSD-specific; + * do not assume that they correspond to AF_ values for your operating + * system. + */ +#define DLT_CLASS_NETBSD_RAWAF 0x02240000 +#define DLT_NETBSD_RAWAF(af) (DLT_CLASS_NETBSD_RAWAF | (af)) +#define DLT_NETBSD_RAWAF_AF(x) ((x) & 0x0000ffff) +#define DLT_IS_NETBSD_RAWAF(x) (DLT_CLASS(x) == DLT_CLASS_NETBSD_RAWAF) + +#endif /* !defined(lib_pcap_dlt_h) */ diff --git a/ledset/npcap-sdk-1.13/Include/pcap/funcattrs.h b/ledset/npcap-sdk-1.13/Include/pcap/funcattrs.h new file mode 100644 index 0000000..5dbc428 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/funcattrs.h @@ -0,0 +1,341 @@ +/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ +/* + * Copyright (c) 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the Computer Systems + * Engineering Group at Lawrence Berkeley Laboratory. + * 4. Neither the name of the University nor of the Laboratory may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef lib_pcap_funcattrs_h +#define lib_pcap_funcattrs_h + +#include + +/* + * Attributes to apply to functions and their arguments, using various + * compiler-specific extensions. + */ + +/* + * PCAP_API_DEF must be used when defining *data* exported from + * libpcap. It can be used when defining *functions* exported + * from libpcap, but it doesn't have to be used there. It + * should not be used in declarations in headers. + * + * PCAP_API must be used when *declaring* data or functions + * exported from libpcap; PCAP_API_DEF won't work on all platforms. + */ + +#if defined(_WIN32) + /* + * For Windows: + * + * when building libpcap: + * + * if we're building it as a DLL, we have to declare API + * functions with __declspec(dllexport); + * + * if we're building it as a static library, we don't want + * to do so. + * + * when using libpcap: + * + * if we're using the DLL, calls to its functions are a + * little more efficient if they're declared with + * __declspec(dllimport); + * + * if we're not using the dll, we don't want to declare + * them that way. + * + * So: + * + * if pcap_EXPORTS is defined, we define PCAP_API_DEF as + * __declspec(dllexport); + * + * if PCAP_DLL is defined, we define PCAP_API_DEF as + * __declspec(dllimport); + * + * otherwise, we define PCAP_API_DEF as nothing. + */ + #if defined(pcap_EXPORTS) + /* + * We're compiling libpcap as a DLL, so we should export functions + * in our API. + */ + #define PCAP_API_DEF __declspec(dllexport) + #elif defined(PCAP_DLL) + /* + * We're using libpcap as a DLL, so the calls will be a little more + * efficient if we explicitly import the functions. + */ + #define PCAP_API_DEF __declspec(dllimport) + #else + /* + * Either we're building libpcap as a static library, or we're using + * it as a static library, or we don't know for certain that we're + * using it as a dynamic library, so neither import nor export the + * functions explicitly. + */ + #define PCAP_API_DEF + #endif +#elif defined(MSDOS) + /* XXX - does this need special treatment? */ + #define PCAP_API_DEF +#else /* UN*X */ + #ifdef pcap_EXPORTS + /* + * We're compiling libpcap as a (dynamic) shared library, so we should + * export functions in our API. The compiler might be configured not + * to export functions from a shared library by default, so we might + * have to explicitly mark functions as exported. + */ + #if PCAP_IS_AT_LEAST_GNUC_VERSION(3,4) \ + || PCAP_IS_AT_LEAST_XL_C_VERSION(12,0) + /* + * GCC 3.4 and later, or some compiler asserting compatibility with + * GCC 3.4 and later, or XL C 13.0 and later, so we have + * __attribute__((visibility()). + */ + #define PCAP_API_DEF __attribute__((visibility("default"))) + #elif PCAP_IS_AT_LEAST_SUNC_VERSION(5,5) + /* + * Sun C 5.5 and later, so we have __global. + * (Sun C 5.9 and later also have __attribute__((visibility()), + * but there's no reason to prefer it with Sun C.) + */ + #define PCAP_API_DEF __global + #else + /* + * We don't have anything to say. + */ + #define PCAP_API_DEF + #endif + #else + /* + * We're not building libpcap. + */ + #define PCAP_API_DEF + #endif +#endif /* _WIN32/MSDOS/UN*X */ + +#define PCAP_API PCAP_API_DEF extern + +/* + * Definitions to 1) indicate what version of libpcap first had a given + * API and 2) allow upstream providers whose build environments allow + * APIs to be designated as "first available in this release" to do so + * by appropriately defining them. + * + * Yes, that's you, Apple. :-) Please define PCAP_AVAILABLE_MACOS() + * as necessary to make various APIs "weak exports" to make it easier + * for software that's distributed in binary form and that uses libpcap + * to run on multiple macOS versions and use new APIs when available. + * (Yes, such third-party software exists - Wireshark provides binary + * packages for macOS, for example. tcpdump doesn't count, as that's + * provided by Apple, so each release can come with a version compiled + * to use the APIs present in that release.) + * + * The non-macOS versioning is based on + * + * https://en.wikipedia.org/wiki/Darwin_(operating_system)#Release_history + * + * If there are any corrections, please submit it upstream to the + * libpcap maintainers, preferably as a pull request on + * + * https://github.com/the-tcpdump-group/libpcap + * + * We don't define it ourselves because, if you're building and + * installing libpcap on macOS yourself, the APIs will be available + * no matter what OS version you're installing it on. + * + * For other platforms, we don't define them, leaving it up to + * others to do so based on their OS versions, if appropriate. + * + * We start with libpcap 0.4, as that was the last LBL release, and + * I've never seen earlier releases. + */ +#ifdef __APPLE__ +#include +/* + * When building as part of macOS, define this as __API_AVAILABLE(__VA_ARGS__). + * + * XXX - if there's some #define to indicate that this is being built + * as part of the macOS build process, we could make that Just Work. + */ +#define PCAP_AVAILABLE(...) +#define PCAP_AVAILABLE_0_4 PCAP_AVAILABLE(macos(10.0)) /* Did any version of Mac OS X ship with this? */ +#define PCAP_AVAILABLE_0_5 PCAP_AVAILABLE(macos(10.0)) /* Did any version of Mac OS X ship with this? */ +#define PCAP_AVAILABLE_0_6 PCAP_AVAILABLE(macos(10.1)) +#define PCAP_AVAILABLE_0_7 PCAP_AVAILABLE(macos(10.4)) +#define PCAP_AVAILABLE_0_8 PCAP_AVAILABLE(macos(10.4)) +#define PCAP_AVAILABLE_0_9 PCAP_AVAILABLE(macos(10.5), ios(1.0)) +#define PCAP_AVAILABLE_1_0 PCAP_AVAILABLE(macos(10.6), ios(4.0)) +/* #define PCAP_AVAILABLE_1_1 no routines added to the API */ +#define PCAP_AVAILABLE_1_2 PCAP_AVAILABLE(macos(10.9), ios(6.0)) +/* #define PCAP_AVAILABLE_1_3 no routines added to the API */ +/* #define PCAP_AVAILABLE_1_4 no routines added to the API */ +#define PCAP_AVAILABLE_1_5 PCAP_AVAILABLE(macos(10.10), ios(7.0), watchos(1.0)) +/* #define PCAP_AVAILABLE_1_6 no routines added to the API */ +#define PCAP_AVAILABLE_1_7 PCAP_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0)) +#define PCAP_AVAILABLE_1_8 PCAP_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) /* only Windows adds routines to the API; XXX - what version first had it? */ +#define PCAP_AVAILABLE_1_9 PCAP_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) +#define PCAP_AVAILABLE_1_10 /* not in macOS yet */ +#define PCAP_AVAILABLE_1_11 /* not released yet, so not in macOS yet */ +#else /* __APPLE__ */ +#define PCAP_AVAILABLE_0_4 +#define PCAP_AVAILABLE_0_5 +#define PCAP_AVAILABLE_0_6 +#define PCAP_AVAILABLE_0_7 +#define PCAP_AVAILABLE_0_8 +#define PCAP_AVAILABLE_0_9 +#define PCAP_AVAILABLE_1_0 +/* #define PCAP_AVAILABLE_1_1 no routines added to the API */ +#define PCAP_AVAILABLE_1_2 +/* #define PCAP_AVAILABLE_1_3 no routines added to the API */ +/* #define PCAP_AVAILABLE_1_4 no routines added to the API */ +#define PCAP_AVAILABLE_1_5 +/* #define PCAP_AVAILABLE_1_6 no routines added to the API */ +#define PCAP_AVAILABLE_1_7 +#define PCAP_AVAILABLE_1_8 +#define PCAP_AVAILABLE_1_9 +#define PCAP_AVAILABLE_1_10 +#define PCAP_AVAILABLE_1_11 +#endif /* __APPLE__ */ + +/* + * PCAP_NORETURN, before a function declaration, means "this function + * never returns". (It must go before the function declaration, e.g. + * "extern PCAP_NORETURN func(...)" rather than after the function + * declaration, as the MSVC version has to go before the declaration.) + * + * PCAP_NORETURN_DEF, before a function *definition*, means "this + * function never returns"; it would be used only for static functions + * that are defined before any use, and thus have no declaration. + * (MSVC doesn't support that; I guess the "decl" in "__declspec" + * means "declaration", and __declspec doesn't work with definitions.) + */ +#if __has_attribute(noreturn) \ + || PCAP_IS_AT_LEAST_GNUC_VERSION(2,5) \ + || PCAP_IS_AT_LEAST_SUNC_VERSION(5,9) \ + || PCAP_IS_AT_LEAST_XL_C_VERSION(10,1) \ + || PCAP_IS_AT_LEAST_HP_C_VERSION(6,10) + /* + * Compiler with support for __attribute((noreturn)), or GCC 2.5 and + * later, or some compiler asserting compatibility with GCC 2.5 and + * later, or Solaris Studio 12 (Sun C 5.9) and later, or IBM XL C 10.1 + * and later (do any earlier versions of XL C support this?), or HP aCC + * A.06.10 and later. + */ + #define PCAP_NORETURN __attribute((noreturn)) + #define PCAP_NORETURN_DEF __attribute((noreturn)) +#elif defined(_MSC_VER) + /* + * MSVC. + */ + #define PCAP_NORETURN __declspec(noreturn) + #define PCAP_NORETURN_DEF +#else + #define PCAP_NORETURN + #define PCAP_NORETURN_DEF +#endif + +/* + * PCAP_PRINTFLIKE(x,y), after a function declaration, means "this function + * does printf-style formatting, with the xth argument being the format + * string and the yth argument being the first argument for the format + * string". + */ +#if __has_attribute(__format__) \ + || PCAP_IS_AT_LEAST_GNUC_VERSION(2,3) \ + || PCAP_IS_AT_LEAST_XL_C_VERSION(10,1) \ + || PCAP_IS_AT_LEAST_HP_C_VERSION(6,10) + /* + * Compiler with support for it, or GCC 2.3 and later, or some compiler + * asserting compatibility with GCC 2.3 and later, or IBM XL C 10.1 + * and later (do any earlier versions of XL C support this?), + * or HP aCC A.06.10 and later. + */ + #define PCAP_PRINTFLIKE(x,y) __attribute__((__format__(__printf__,x,y))) +#else + #define PCAP_PRINTFLIKE(x,y) +#endif + +/* + * PCAP_DEPRECATED(func, msg), after a function declaration, marks the + * function as deprecated. + * + * The first argument is the name of the function; the second argument is + * a string giving the warning message to use if the compiler supports that. + * + * (Thank you, Microsoft, for requiring the function name.) + */ +#if __has_attribute(deprecated) \ + || PCAP_IS_AT_LEAST_GNUC_VERSION(4,5) \ + || PCAP_IS_AT_LEAST_SUNC_VERSION(5,13) + /* + * Compiler that supports __has_attribute and __attribute__((deprecated)), + * or GCC 4.5 and later, or Sun/Oracle C 12.4 (Sun C 5.13) and later. + * + * Those support __attribute__((deprecated(msg))) (we assume, perhaps + * incorrectly, that anything that supports __has_attribute() is + * recent enough to support __attribute__((deprecated(msg)))). + */ + #define PCAP_DEPRECATED(func, msg) __attribute__((deprecated(msg))) +#elif PCAP_IS_AT_LEAST_GNUC_VERSION(3,1) + /* + * GCC 3.1 through 4.4. + * + * Those support __attribute__((deprecated)) but not + * __attribute__((deprecated(msg))). + */ + #define PCAP_DEPRECATED(func, msg) __attribute__((deprecated)) +#elif defined(_MSC_VER) && !defined(BUILDING_PCAP) + /* + * MSVC, and we're not building libpcap itself; it's VS 2015 + * and later, so we have the deprecated pragma. + * + * If we *are* building libpcap, we don't want this, as it'll warn + * us even if we *define* the function. + */ + #define PCAP_DEPRECATED(func, msg) __pragma(deprecated(func)) +#else + #define PCAP_DEPRECATED(func, msg) +#endif + +/* + * For flagging arguments as format strings in MSVC. + */ +#ifdef _MSC_VER + #include + #define PCAP_FORMAT_STRING(p) _Printf_format_string_ p +#else + #define PCAP_FORMAT_STRING(p) p +#endif + +#endif /* lib_pcap_funcattrs_h */ diff --git a/ledset/npcap-sdk-1.13/Include/pcap/ipnet.h b/ledset/npcap-sdk-1.13/Include/pcap/ipnet.h new file mode 100644 index 0000000..5330847 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/ipnet.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from the Stanford/CMU enet packet filter, + * (net/enet.c) distributed as part of 4.3BSD, and code contributed + * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence + * Berkeley Laboratory. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#define IPH_AF_INET 2 /* Matches Solaris's AF_INET */ +#define IPH_AF_INET6 26 /* Matches Solaris's AF_INET6 */ + +#define IPNET_OUTBOUND 1 +#define IPNET_INBOUND 2 diff --git a/ledset/WpdPack_4_1_2/Include/pcap/namedb.h b/ledset/npcap-sdk-1.13/Include/pcap/namedb.h similarity index 74% rename from ledset/WpdPack_4_1_2/Include/pcap/namedb.h rename to ledset/npcap-sdk-1.13/Include/pcap/namedb.h index 9002c75..34a0ae7 100644 --- a/ledset/WpdPack_4_1_2/Include/pcap/namedb.h +++ b/ledset/npcap-sdk-1.13/Include/pcap/namedb.h @@ -29,8 +29,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/namedb.h,v 1.1 2006/10/04 18:09:22 guy Exp $ (LBL) */ #ifndef lib_pcap_namedb_h @@ -45,7 +43,10 @@ extern "C" { * XXX this stuff doesn't belong in this interface, but this * library already must do name to address translation, so * on systems that don't have support for /etc/ethers, we - * export these hooks since they'll + * export these hooks since they're already being used by + * some applications (such as tcpdump) and already being + * marked as exported in some OSes offering libpcap (such + * as Debian). */ struct pcap_etherent { u_char addr[6]; @@ -54,21 +55,20 @@ struct pcap_etherent { #ifndef PCAP_ETHERS_FILE #define PCAP_ETHERS_FILE "/etc/ethers" #endif -struct pcap_etherent *pcap_next_etherent(FILE *); -u_char *pcap_ether_hostton(const char*); -u_char *pcap_ether_aton(const char *); +PCAP_API struct pcap_etherent *pcap_next_etherent(FILE *); +PCAP_API u_char *pcap_ether_hostton(const char*); +PCAP_API u_char *pcap_ether_aton(const char *); -bpf_u_int32 **pcap_nametoaddr(const char *); -#ifdef INET6 -struct addrinfo *pcap_nametoaddrinfo(const char *); -#endif -bpf_u_int32 pcap_nametonetaddr(const char *); +PCAP_API bpf_u_int32 **pcap_nametoaddr(const char *) +PCAP_DEPRECATED(pcap_nametoaddr, "this is not reentrant; use 'pcap_nametoaddrinfo' instead"); +PCAP_API struct addrinfo *pcap_nametoaddrinfo(const char *); +PCAP_API bpf_u_int32 pcap_nametonetaddr(const char *); -int pcap_nametoport(const char *, int *, int *); -int pcap_nametoportrange(const char *, int *, int *, int *); -int pcap_nametoproto(const char *); -int pcap_nametoeproto(const char *); -int pcap_nametollc(const char *); +PCAP_API int pcap_nametoport(const char *, int *, int *); +PCAP_API int pcap_nametoportrange(const char *, int *, int *, int *); +PCAP_API int pcap_nametoproto(const char *); +PCAP_API int pcap_nametoeproto(const char *); +PCAP_API int pcap_nametollc(const char *); /* * If a protocol is unknown, PROTO_UNDEF is returned. * Also, pcap_nametoport() returns the protocol along with the port number. @@ -77,11 +77,6 @@ int pcap_nametollc(const char *); */ #define PROTO_UNDEF -1 -/* XXX move these to pcap-int.h? */ -int __pcap_atodn(const char *, bpf_u_int32 *); -int __pcap_atoin(const char *, bpf_u_int32 *); -u_short __pcap_nametodnaddr(const char *); - #ifdef __cplusplus } #endif diff --git a/ledset/npcap-sdk-1.13/Include/pcap/nflog.h b/ledset/npcap-sdk-1.13/Include/pcap/nflog.h new file mode 100644 index 0000000..f7c85b5 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/nflog.h @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2013, Petar Alilovic, + * Faculty of Electrical Engineering and Computing, University of Zagreb + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + */ + +#ifndef lib_pcap_nflog_h +#define lib_pcap_nflog_h + +#include + +/* + * Structure of an NFLOG header and TLV parts, as described at + * https://www.tcpdump.org/linktypes/LINKTYPE_NFLOG.html + * + * The NFLOG header is big-endian. + * + * The TLV length and type are in host byte order. The value is either + * big-endian or is an array of bytes in some externally-specified byte + * order (text string, link-layer address, link-layer header, packet + * data, etc.). + */ +typedef struct nflog_hdr { + uint8_t nflog_family; /* address family */ + uint8_t nflog_version; /* version */ + uint16_t nflog_rid; /* resource ID */ +} nflog_hdr_t; + +typedef struct nflog_tlv { + uint16_t tlv_length; /* tlv length */ + uint16_t tlv_type; /* tlv type */ + /* value follows this */ +} nflog_tlv_t; + +typedef struct nflog_packet_hdr { + uint16_t hw_protocol; /* hw protocol */ + uint8_t hook; /* netfilter hook */ + uint8_t pad; /* padding to 32 bits */ +} nflog_packet_hdr_t; + +typedef struct nflog_hwaddr { + uint16_t hw_addrlen; /* address length */ + uint16_t pad; /* padding to 32-bit boundary */ + uint8_t hw_addr[8]; /* address, up to 8 bytes */ +} nflog_hwaddr_t; + +typedef struct nflog_timestamp { + uint64_t sec; + uint64_t usec; +} nflog_timestamp_t; + +/* + * TLV types. + */ +#define NFULA_PACKET_HDR 1 /* nflog_packet_hdr_t */ +#define NFULA_MARK 2 /* packet mark from skbuff */ +#define NFULA_TIMESTAMP 3 /* nflog_timestamp_t for skbuff's time stamp */ +#define NFULA_IFINDEX_INDEV 4 /* ifindex of device on which packet received (possibly bridge group) */ +#define NFULA_IFINDEX_OUTDEV 5 /* ifindex of device on which packet transmitted (possibly bridge group) */ +#define NFULA_IFINDEX_PHYSINDEV 6 /* ifindex of physical device on which packet received (not bridge group) */ +#define NFULA_IFINDEX_PHYSOUTDEV 7 /* ifindex of physical device on which packet transmitted (not bridge group) */ +#define NFULA_HWADDR 8 /* nflog_hwaddr_t for hardware address */ +#define NFULA_PAYLOAD 9 /* packet payload */ +#define NFULA_PREFIX 10 /* text string - null-terminated, count includes NUL */ +#define NFULA_UID 11 /* UID owning socket on which packet was sent/received */ +#define NFULA_SEQ 12 /* sequence number of packets on this NFLOG socket */ +#define NFULA_SEQ_GLOBAL 13 /* sequence number of pakets on all NFLOG sockets */ +#define NFULA_GID 14 /* GID owning socket on which packet was sent/received */ +#define NFULA_HWTYPE 15 /* ARPHRD_ type of skbuff's device */ +#define NFULA_HWHEADER 16 /* skbuff's MAC-layer header */ +#define NFULA_HWLEN 17 /* length of skbuff's MAC-layer header */ + +#endif diff --git a/ledset/npcap-sdk-1.13/Include/pcap/pcap-inttypes.h b/ledset/npcap-sdk-1.13/Include/pcap/pcap-inttypes.h new file mode 100644 index 0000000..8c7b4f6 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/pcap-inttypes.h @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Politecnico di Torino nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef pcap_pcap_inttypes_h +#define pcap_pcap_inttypes_h + +/* + * If we're compiling with Visual Studio, make sure the C99 integer + * types are defined, by hook or by crook. + * + * XXX - verify that we have at least C99 support on UN*Xes? + * + * What about MinGW or various DOS toolchains? We're currently assuming + * sufficient C99 support there. + */ +#if defined(_MSC_VER) + /* + * Compiler is MSVC. + */ + #if _MSC_VER >= 1800 + /* + * VS 2013 or newer; we have . + */ + #include + #else + /* + * Earlier VS; we have to define this stuff ourselves. + * We don't support building libpcap with earlier versions of VS, + * but SDKs for Npcap have to support building applications using + * earlier versions of VS, so we work around this by defining + * those types ourselves, as some files use them. + */ + typedef unsigned char uint8_t; + typedef signed char int8_t; + typedef unsigned short uint16_t; + typedef signed short int16_t; + typedef unsigned int uint32_t; + typedef signed int int32_t; + #ifdef _MSC_EXTENSIONS + typedef unsigned _int64 uint64_t; + typedef _int64 int64_t; + #else /* _MSC_EXTENSIONS */ + typedef unsigned long long uint64_t; + typedef long long int64_t; + #endif + #endif +#else /* defined(_MSC_VER) */ + /* + * Not Visual Studio. + * Include to get the integer types and PRi[doux]64 values + * defined. + * + * If the compiler is MinGW, we assume we have - and + * support for %zu in the formatted printing functions. + * + * If the target is UN*X, we assume we have a C99-or-later development + * environment, and thus have - and support for %zu in + * the formatted printing functions. + * + * If the target is MS-DOS, we assume we have - and support + * for %zu in the formatted printing functions. + * + * I.e., assume we have and that it suffices. + */ + + /* + * XXX - somehow make sure we have enough C99 support with other + * compilers and support libraries? + */ + + #include +#endif /* defined(_MSC_VER) */ + +#endif /* pcap/pcap-inttypes.h */ diff --git a/ledset/npcap-sdk-1.13/Include/pcap/pcap.h b/ledset/npcap-sdk-1.13/Include/pcap/pcap.h new file mode 100644 index 0000000..aa03856 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/pcap.h @@ -0,0 +1,1220 @@ +/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ +/* + * Copyright (c) 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the Computer Systems + * Engineering Group at Lawrence Berkeley Laboratory. + * 4. Neither the name of the University nor of the Laboratory may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Remote packet capture mechanisms and extensions from WinPcap: + * + * Copyright (c) 2002 - 2003 + * NetGroup, Politecnico di Torino (Italy) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Politecnico di Torino nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef lib_pcap_pcap_h +#define lib_pcap_pcap_h + +/* + * Some software that uses libpcap/WinPcap/Npcap defines _MSC_VER before + * includeing pcap.h if it's not defined - and it defines it to 1500. + * (I'm looking at *you*, lwIP!) + * + * Attempt to detect this, and undefine _MSC_VER so that we can *reliably* + * use it to know what compiler is being used and, if it's Visual Studio, + * what version is being used. + */ +#if defined(_MSC_VER) + /* + * We assume here that software such as that doesn't define _MSC_FULL_VER + * as well and that it defines _MSC_VER with a value > 1200. + * + * DO NOT BREAK THESE ASSUMPTIONS. IF YOU FEEL YOU MUST DEFINE _MSC_VER + * WITH A COMPILER THAT'S NOT MICROSOFT'S C COMPILER, PLEASE CONTACT + * US SO THAT WE CAN MAKE IT SO THAT YOU DON'T HAVE TO DO THAT. THANK + * YOU. + * + * OK, is _MSC_FULL_VER defined? + */ + #if !defined(_MSC_FULL_VER) + /* + * According to + * + * https://sourceforge.net/p/predef/wiki/Compilers/ + * + * with "Visual C++ 6.0 Processor Pack"/Visual C++ 6.0 SP6 and + * later, _MSC_FULL_VER is defined, so either this is an older + * version of Visual C++ or it's not Visual C++ at all. + * + * For Visual C++ 6.0, _MSC_VER is defined as 1200. + */ + #if _MSC_VER > 1200 + /* + * If this is Visual C++, _MSC_FULL_VER should be defined, so we + * assume this isn't Visual C++, and undo the lie that it is. + */ + #undef _MSC_VER + #endif + #endif +#endif + +#include + +#include + +#if defined(_WIN32) + #include /* u_int, u_char etc. */ + #include /* _get_osfhandle() */ +#elif defined(MSDOS) + #include /* u_int, u_char etc. */ + #include +#else /* UN*X */ + #include /* u_int, u_char etc. */ + #include +#endif /* _WIN32/MSDOS/UN*X */ + +#include /* for SOCKET, as the active-mode rpcap APIs use it */ + +#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H +#include +#endif + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Version number of the current version of the pcap file format. + * + * NOTE: this is *NOT* the version number of the libpcap library. + * To fetch the version information for the version of libpcap + * you're using, use pcap_lib_version(). + */ +#define PCAP_VERSION_MAJOR 2 +#define PCAP_VERSION_MINOR 4 + +#define PCAP_ERRBUF_SIZE 256 + +/* + * Compatibility for systems that have a bpf.h that + * predates the bpf typedefs for 64-bit support. + */ +#if BPF_RELEASE - 0 < 199406 +typedef int bpf_int32; +typedef u_int bpf_u_int32; +#endif + +typedef struct pcap pcap_t; +typedef struct pcap_dumper pcap_dumper_t; +typedef struct pcap_if pcap_if_t; +typedef struct pcap_addr pcap_addr_t; + +/* + * The first record in the file contains saved values for some + * of the flags used in the printout phases of tcpdump. + * Many fields here are 32 bit ints so compilers won't insert unwanted + * padding; these files need to be interchangeable across architectures. + * Documentation: https://www.tcpdump.org/manpages/pcap-savefile.5.txt. + * + * Do not change the layout of this structure, in any way (this includes + * changes that only affect the length of fields in this structure). + * + * Also, do not change the interpretation of any of the members of this + * structure, in any way (this includes using values other than + * LINKTYPE_ values, as defined in "savefile.c", in the "linktype" + * field). + * + * Instead: + * + * introduce a new structure for the new format, if the layout + * of the structure changed; + * + * send mail to "tcpdump-workers@lists.tcpdump.org", requesting + * a new magic number for your new capture file format, and, when + * you get the new magic number, put it in "savefile.c"; + * + * use that magic number for save files with the changed file + * header; + * + * make the code in "savefile.c" capable of reading files with + * the old file header as well as files with the new file header + * (using the magic number to determine the header format). + * + * Then supply the changes by forking the branch at + * + * https://github.com/the-tcpdump-group/libpcap/tree/master + * + * and issuing a pull request, so that future versions of libpcap and + * programs that use it (such as tcpdump) will be able to read your new + * capture file format. + */ +struct pcap_file_header { + bpf_u_int32 magic; + u_short version_major; + u_short version_minor; + bpf_int32 thiszone; /* gmt to local correction; this is always 0 */ + bpf_u_int32 sigfigs; /* accuracy of timestamps; this is always 0 */ + bpf_u_int32 snaplen; /* max length saved portion of each pkt */ + bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */ +}; + +/* + * Macros for the value returned by pcap_datalink_ext(). + * + * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro + * gives the FCS length of packets in the capture. + */ +#define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000) +#define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28) +#define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000) + +typedef enum { + PCAP_D_INOUT = 0, + PCAP_D_IN, + PCAP_D_OUT +} pcap_direction_t; + +/* + * Generic per-packet information, as supplied by libpcap. + * + * The time stamp can and should be a "struct timeval", regardless of + * whether your system supports 32-bit tv_sec in "struct timeval", + * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit + * and 64-bit applications. The on-disk format of savefiles uses 32-bit + * tv_sec (and tv_usec); this structure is irrelevant to that. 32-bit + * and 64-bit versions of libpcap, even if they're on the same platform, + * should supply the appropriate version of "struct timeval", even if + * that's not what the underlying packet capture mechanism supplies. + */ +struct pcap_pkthdr { + struct timeval ts; /* time stamp */ + bpf_u_int32 caplen; /* length of portion present */ + bpf_u_int32 len; /* length of this packet (off wire) */ +}; + +/* + * As returned by the pcap_stats() + */ +struct pcap_stat { + u_int ps_recv; /* number of packets received */ + u_int ps_drop; /* number of packets dropped */ + u_int ps_ifdrop; /* drops by interface -- only supported on some platforms */ +#ifdef _WIN32 + u_int ps_capt; /* number of packets that reach the application */ + u_int ps_sent; /* number of packets sent by the server on the network */ + u_int ps_netdrop; /* number of packets lost on the network */ +#endif /* _WIN32 */ +}; + +#ifdef MSDOS +/* + * As returned by the pcap_stats_ex() + */ +struct pcap_stat_ex { + u_long rx_packets; /* total packets received */ + u_long tx_packets; /* total packets transmitted */ + u_long rx_bytes; /* total bytes received */ + u_long tx_bytes; /* total bytes transmitted */ + u_long rx_errors; /* bad packets received */ + u_long tx_errors; /* packet transmit problems */ + u_long rx_dropped; /* no space in Rx buffers */ + u_long tx_dropped; /* no space available for Tx */ + u_long multicast; /* multicast packets received */ + u_long collisions; + + /* detailed rx_errors: */ + u_long rx_length_errors; + u_long rx_over_errors; /* receiver ring buff overflow */ + u_long rx_crc_errors; /* recv'd pkt with crc error */ + u_long rx_frame_errors; /* recv'd frame alignment error */ + u_long rx_fifo_errors; /* recv'r fifo overrun */ + u_long rx_missed_errors; /* recv'r missed packet */ + + /* detailed tx_errors */ + u_long tx_aborted_errors; + u_long tx_carrier_errors; + u_long tx_fifo_errors; + u_long tx_heartbeat_errors; + u_long tx_window_errors; + }; +#endif + +/* + * Item in a list of interfaces. + */ +struct pcap_if { + struct pcap_if *next; + char *name; /* name to hand to "pcap_open_live()" */ + char *description; /* textual description of interface, or NULL */ + struct pcap_addr *addresses; + bpf_u_int32 flags; /* PCAP_IF_ interface flags */ +}; + +#define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */ +#define PCAP_IF_UP 0x00000002 /* interface is up */ +#define PCAP_IF_RUNNING 0x00000004 /* interface is running */ +#define PCAP_IF_WIRELESS 0x00000008 /* interface is wireless (*NOT* necessarily Wi-Fi!) */ +#define PCAP_IF_CONNECTION_STATUS 0x00000030 /* connection status: */ +#define PCAP_IF_CONNECTION_STATUS_UNKNOWN 0x00000000 /* unknown */ +#define PCAP_IF_CONNECTION_STATUS_CONNECTED 0x00000010 /* connected */ +#define PCAP_IF_CONNECTION_STATUS_DISCONNECTED 0x00000020 /* disconnected */ +#define PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE 0x00000030 /* not applicable */ + +/* + * Representation of an interface address. + */ +struct pcap_addr { + struct pcap_addr *next; + struct sockaddr *addr; /* address */ + struct sockaddr *netmask; /* netmask for that address */ + struct sockaddr *broadaddr; /* broadcast address for that address */ + struct sockaddr *dstaddr; /* P2P destination address for that address */ +}; + +typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *, + const u_char *); + +/* + * Error codes for the pcap API. + * These will all be negative, so you can check for the success or + * failure of a call that returns these codes by checking for a + * negative value. + */ +#define PCAP_ERROR -1 /* generic error code */ +#define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */ +#define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */ +#define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */ +#define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */ +#define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */ +#define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */ +#define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */ +#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */ +#define PCAP_ERROR_CANTSET_TSTAMP_TYPE -10 /* this device doesn't support setting the time stamp type */ +#define PCAP_ERROR_PROMISC_PERM_DENIED -11 /* you don't have permission to capture in promiscuous mode */ +#define PCAP_ERROR_TSTAMP_PRECISION_NOTSUP -12 /* the requested time stamp precision is not supported */ + +/* + * Warning codes for the pcap API. + * These will all be positive and non-zero, so they won't look like + * errors. + */ +#define PCAP_WARNING 1 /* generic warning code */ +#define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */ +#define PCAP_WARNING_TSTAMP_TYPE_NOTSUP 3 /* the requested time stamp type is not supported */ + +/* + * Value to pass to pcap_compile() as the netmask if you don't know what + * the netmask is. + */ +#define PCAP_NETMASK_UNKNOWN 0xffffffff + +/* + * Initialize pcap. If this isn't called, pcap is initialized to + * a mode source-compatible and binary-compatible with older versions + * that lack this routine. + */ + +/* + * Initialization options. + * All bits not listed here are reserved for expansion. + * + * On UNIX-like systems, the local character encoding is assumed to be + * UTF-8, so no character encoding transformations are done. + * + * On Windows, the local character encoding is the local ANSI code page. + */ +#define PCAP_CHAR_ENC_LOCAL 0x00000000U /* strings are in the local character encoding */ +#define PCAP_CHAR_ENC_UTF_8 0x00000001U /* strings are in UTF-8 */ + +PCAP_AVAILABLE_1_10 +PCAP_API int pcap_init(unsigned int, char *); + +/* + * We're deprecating pcap_lookupdev() for various reasons (not + * thread-safe, can behave weirdly with WinPcap). Callers + * should use pcap_findalldevs() and use the first device. + */ +PCAP_AVAILABLE_0_4 +PCAP_API char *pcap_lookupdev(char *) +PCAP_DEPRECATED(pcap_lookupdev, "use 'pcap_findalldevs' and use the first device"); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *); + +PCAP_AVAILABLE_1_0 +PCAP_API pcap_t *pcap_create(const char *, char *); + +PCAP_AVAILABLE_1_0 +PCAP_API int pcap_set_snaplen(pcap_t *, int); + +PCAP_AVAILABLE_1_0 +PCAP_API int pcap_set_promisc(pcap_t *, int); + +PCAP_AVAILABLE_1_0 +PCAP_API int pcap_can_set_rfmon(pcap_t *); + +PCAP_AVAILABLE_1_0 +PCAP_API int pcap_set_rfmon(pcap_t *, int); + +PCAP_AVAILABLE_1_0 +PCAP_API int pcap_set_timeout(pcap_t *, int); + +PCAP_AVAILABLE_1_2 +PCAP_API int pcap_set_tstamp_type(pcap_t *, int); + +PCAP_AVAILABLE_1_5 +PCAP_API int pcap_set_immediate_mode(pcap_t *, int); + +PCAP_AVAILABLE_1_0 +PCAP_API int pcap_set_buffer_size(pcap_t *, int); + +PCAP_AVAILABLE_1_5 +PCAP_API int pcap_set_tstamp_precision(pcap_t *, int); + +PCAP_AVAILABLE_1_5 +PCAP_API int pcap_get_tstamp_precision(pcap_t *); + +PCAP_AVAILABLE_1_0 +PCAP_API int pcap_activate(pcap_t *); + +PCAP_AVAILABLE_1_2 +PCAP_API int pcap_list_tstamp_types(pcap_t *, int **); + +PCAP_AVAILABLE_1_2 +PCAP_API void pcap_free_tstamp_types(int *); + +PCAP_AVAILABLE_1_2 +PCAP_API int pcap_tstamp_type_name_to_val(const char *); + +PCAP_AVAILABLE_1_2 +PCAP_API const char *pcap_tstamp_type_val_to_name(int); + +PCAP_AVAILABLE_1_2 +PCAP_API const char *pcap_tstamp_type_val_to_description(int); + +#ifdef __linux__ +PCAP_AVAILABLE_1_9 +PCAP_API int pcap_set_protocol_linux(pcap_t *, int); +#endif + +/* + * Time stamp types. + * Not all systems and interfaces will necessarily support all of these. + * + * A system that supports PCAP_TSTAMP_HOST is offering time stamps + * provided by the host machine, rather than by the capture device, + * but not committing to any characteristics of the time stamp. + * + * PCAP_TSTAMP_HOST_LOWPREC is a time stamp, provided by the host machine, + * that's low-precision but relatively cheap to fetch; it's normally done + * using the system clock, so it's normally synchronized with times you'd + * fetch from system calls. + * + * PCAP_TSTAMP_HOST_HIPREC is a time stamp, provided by the host machine, + * that's high-precision; it might be more expensive to fetch. It is + * synchronized with the system clock. + * + * PCAP_TSTAMP_HOST_HIPREC_UNSYNCED is a time stamp, provided by the host + * machine, that's high-precision; it might be more expensive to fetch. + * It is not synchronized with the system clock, and might have + * problems with time stamps for packets received on different CPUs, + * depending on the platform. It might be more likely to be strictly + * monotonic than PCAP_TSTAMP_HOST_HIPREC. + * + * PCAP_TSTAMP_ADAPTER is a high-precision time stamp supplied by the + * capture device; it's synchronized with the system clock. + * + * PCAP_TSTAMP_ADAPTER_UNSYNCED is a high-precision time stamp supplied by + * the capture device; it's not synchronized with the system clock. + * + * Note that time stamps synchronized with the system clock can go + * backwards, as the system clock can go backwards. If a clock is + * not in sync with the system clock, that could be because the + * system clock isn't keeping accurate time, because the other + * clock isn't keeping accurate time, or both. + * + * Note that host-provided time stamps generally correspond to the + * time when the time-stamping code sees the packet; this could + * be some unknown amount of time after the first or last bit of + * the packet is received by the network adapter, due to batching + * of interrupts for packet arrival, queueing delays, etc.. + */ +#define PCAP_TSTAMP_HOST 0 /* host-provided, unknown characteristics */ +#define PCAP_TSTAMP_HOST_LOWPREC 1 /* host-provided, low precision, synced with the system clock */ +#define PCAP_TSTAMP_HOST_HIPREC 2 /* host-provided, high precision, synced with the system clock */ +#define PCAP_TSTAMP_ADAPTER 3 /* device-provided, synced with the system clock */ +#define PCAP_TSTAMP_ADAPTER_UNSYNCED 4 /* device-provided, not synced with the system clock */ +#define PCAP_TSTAMP_HOST_HIPREC_UNSYNCED 5 /* host-provided, high precision, not synced with the system clock */ + +/* + * Time stamp resolution types. + * Not all systems and interfaces will necessarily support all of these + * resolutions when doing live captures; all of them can be requested + * when reading a savefile. + */ +#define PCAP_TSTAMP_PRECISION_MICRO 0 /* use timestamps with microsecond precision, default */ +#define PCAP_TSTAMP_PRECISION_NANO 1 /* use timestamps with nanosecond precision */ + +PCAP_AVAILABLE_0_4 +PCAP_API pcap_t *pcap_open_live(const char *, int, int, int, char *); + +PCAP_AVAILABLE_0_6 +PCAP_API pcap_t *pcap_open_dead(int, int); + +PCAP_AVAILABLE_1_5 +PCAP_API pcap_t *pcap_open_dead_with_tstamp_precision(int, int, u_int); + +PCAP_AVAILABLE_1_5 +PCAP_API pcap_t *pcap_open_offline_with_tstamp_precision(const char *, u_int, char *); + +PCAP_AVAILABLE_0_4 +PCAP_API pcap_t *pcap_open_offline(const char *, char *); + +#ifdef _WIN32 + PCAP_AVAILABLE_1_5 + PCAP_API pcap_t *pcap_hopen_offline_with_tstamp_precision(intptr_t, u_int, char *); + + PCAP_API pcap_t *pcap_hopen_offline(intptr_t, char *); + /* + * If we're building libpcap, these are internal routines in savefile.c, + * so we must not define them as macros. + * + * If we're not building libpcap, given that the version of the C runtime + * with which libpcap was built might be different from the version + * of the C runtime with which an application using libpcap was built, + * and that a FILE structure may differ between the two versions of the + * C runtime, calls to _fileno() must use the version of _fileno() in + * the C runtime used to open the FILE *, not the version in the C + * runtime with which libpcap was built. (Maybe once the Universal CRT + * rules the world, this will cease to be a problem.) + */ + #ifndef BUILDING_PCAP + #define pcap_fopen_offline_with_tstamp_precision(f,p,b) \ + pcap_hopen_offline_with_tstamp_precision(_get_osfhandle(_fileno(f)), p, b) + #define pcap_fopen_offline(f,b) \ + pcap_hopen_offline(_get_osfhandle(_fileno(f)), b) + #endif +#else /*_WIN32*/ + PCAP_AVAILABLE_1_5 + PCAP_API pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *, u_int, char *); + + PCAP_AVAILABLE_0_9 + PCAP_API pcap_t *pcap_fopen_offline(FILE *, char *); +#endif /*_WIN32*/ + +PCAP_AVAILABLE_0_4 +PCAP_API void pcap_close(pcap_t *); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_loop(pcap_t *, int, pcap_handler, u_char *); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *); + +PCAP_AVAILABLE_0_4 +PCAP_API const u_char *pcap_next(pcap_t *, struct pcap_pkthdr *); + +PCAP_AVAILABLE_0_8 +PCAP_API int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **); + +PCAP_AVAILABLE_0_8 +PCAP_API void pcap_breakloop(pcap_t *); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_stats(pcap_t *, struct pcap_stat *); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_setfilter(pcap_t *, struct bpf_program *); + +PCAP_AVAILABLE_0_9 +PCAP_API int pcap_setdirection(pcap_t *, pcap_direction_t); + +PCAP_AVAILABLE_0_7 +PCAP_API int pcap_getnonblock(pcap_t *, char *); + +PCAP_AVAILABLE_0_7 +PCAP_API int pcap_setnonblock(pcap_t *, int, char *); + +PCAP_AVAILABLE_0_9 +PCAP_API int pcap_inject(pcap_t *, const void *, size_t); + +PCAP_AVAILABLE_0_8 +PCAP_API int pcap_sendpacket(pcap_t *, const u_char *, int); + +PCAP_AVAILABLE_1_0 +PCAP_API const char *pcap_statustostr(int); + +PCAP_AVAILABLE_0_4 +PCAP_API const char *pcap_strerror(int); + +PCAP_AVAILABLE_0_4 +PCAP_API char *pcap_geterr(pcap_t *); + +PCAP_AVAILABLE_0_4 +PCAP_API void pcap_perror(pcap_t *, const char *); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, + bpf_u_int32); + +PCAP_AVAILABLE_0_5 +PCAP_API int pcap_compile_nopcap(int, int, struct bpf_program *, + const char *, int, bpf_u_int32); + +/* XXX - this took two arguments in 0.4 and 0.5 */ +PCAP_AVAILABLE_0_6 +PCAP_API void pcap_freecode(struct bpf_program *); + +PCAP_AVAILABLE_1_0 +PCAP_API int pcap_offline_filter(const struct bpf_program *, + const struct pcap_pkthdr *, const u_char *); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_datalink(pcap_t *); + +PCAP_AVAILABLE_1_0 +PCAP_API int pcap_datalink_ext(pcap_t *); + +PCAP_AVAILABLE_0_8 +PCAP_API int pcap_list_datalinks(pcap_t *, int **); + +PCAP_AVAILABLE_0_8 +PCAP_API int pcap_set_datalink(pcap_t *, int); + +PCAP_AVAILABLE_0_8 +PCAP_API void pcap_free_datalinks(int *); + +PCAP_AVAILABLE_0_8 +PCAP_API int pcap_datalink_name_to_val(const char *); + +PCAP_AVAILABLE_0_8 +PCAP_API const char *pcap_datalink_val_to_name(int); + +PCAP_AVAILABLE_0_8 +PCAP_API const char *pcap_datalink_val_to_description(int); + +PCAP_AVAILABLE_1_10 +PCAP_API const char *pcap_datalink_val_to_description_or_dlt(int); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_snapshot(pcap_t *); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_is_swapped(pcap_t *); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_major_version(pcap_t *); + +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_minor_version(pcap_t *); + +PCAP_AVAILABLE_1_9 +PCAP_API int pcap_bufsize(pcap_t *); + +/* XXX */ +PCAP_AVAILABLE_0_4 +PCAP_API FILE *pcap_file(pcap_t *); + +#ifdef _WIN32 +/* + * This probably shouldn't have been kept in WinPcap; most if not all + * UN*X code that used it won't work on Windows. We deprecate it; if + * anybody really needs access to whatever HANDLE may be associated + * with a pcap_t (there's no guarantee that there is one), we can add + * a Windows-only pcap_handle() API that returns the HANDLE. + */ +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_fileno(pcap_t *) +PCAP_DEPRECATED(pcap_fileno, "request a 'pcap_handle' that returns a HANDLE if you need it"); +#else /* _WIN32 */ +PCAP_AVAILABLE_0_4 +PCAP_API int pcap_fileno(pcap_t *); +#endif /* _WIN32 */ + +#ifdef _WIN32 + PCAP_API int pcap_wsockinit(void); +#endif + +PCAP_AVAILABLE_0_4 +PCAP_API pcap_dumper_t *pcap_dump_open(pcap_t *, const char *); + +#ifdef _WIN32 + PCAP_AVAILABLE_0_9 + PCAP_API pcap_dumper_t *pcap_dump_hopen(pcap_t *, intptr_t); + + /* + * If we're building libpcap, this is an internal routine in sf-pcap.c, so + * we must not define it as a macro. + * + * If we're not building libpcap, given that the version of the C runtime + * with which libpcap was built might be different from the version + * of the C runtime with which an application using libpcap was built, + * and that a FILE structure may differ between the two versions of the + * C runtime, calls to _fileno() must use the version of _fileno() in + * the C runtime used to open the FILE *, not the version in the C + * runtime with which libpcap was built. (Maybe once the Universal CRT + * rules the world, this will cease to be a problem.) + */ + #ifndef BUILDING_PCAP + #define pcap_dump_fopen(p,f) \ + pcap_dump_hopen(p, _get_osfhandle(_fileno(f))) + #endif +#else /*_WIN32*/ + PCAP_AVAILABLE_0_9 + PCAP_API pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp); +#endif /*_WIN32*/ + +PCAP_AVAILABLE_1_7 +PCAP_API pcap_dumper_t *pcap_dump_open_append(pcap_t *, const char *); + +PCAP_AVAILABLE_0_8 +PCAP_API FILE *pcap_dump_file(pcap_dumper_t *); + +PCAP_AVAILABLE_0_9 +PCAP_API long pcap_dump_ftell(pcap_dumper_t *); + +PCAP_AVAILABLE_1_9 +PCAP_API int64_t pcap_dump_ftell64(pcap_dumper_t *); + +PCAP_AVAILABLE_0_8 +PCAP_API int pcap_dump_flush(pcap_dumper_t *); + +PCAP_AVAILABLE_0_4 +PCAP_API void pcap_dump_close(pcap_dumper_t *); + +PCAP_AVAILABLE_0_4 +PCAP_API void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); + +PCAP_AVAILABLE_0_7 +PCAP_API int pcap_findalldevs(pcap_if_t **, char *); + +PCAP_AVAILABLE_0_7 +PCAP_API void pcap_freealldevs(pcap_if_t *); + +/* + * We return a pointer to the version string, rather than exporting the + * version string directly. + * + * On at least some UNIXes, if you import data from a shared library into + * a program, the data is bound into the program binary, so if the string + * in the version of the library with which the program was linked isn't + * the same as the string in the version of the library with which the + * program is being run, various undesirable things may happen (warnings, + * the string being the one from the version of the library with which the + * program was linked, or even weirder things, such as the string being the + * one from the library but being truncated). + * + * On Windows, the string is constructed at run time. + */ +PCAP_AVAILABLE_0_8 +PCAP_API const char *pcap_lib_version(void); + +#if defined(_WIN32) + + /* + * Win32 definitions + */ + + /*! + \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). + */ + struct pcap_send_queue + { + u_int maxlen; /* Maximum size of the queue, in bytes. This + variable contains the size of the buffer field. */ + u_int len; /* Current size of the queue, in bytes. */ + char *buffer; /* Buffer containing the packets to be sent. */ + }; + + typedef struct pcap_send_queue pcap_send_queue; + + /*! + \brief This typedef is a support for the pcap_get_airpcap_handle() function + */ + #if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) + #define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ + typedef struct _AirpcapHandle *PAirpcapHandle; + #endif + + PCAP_API int pcap_setbuff(pcap_t *p, int dim); + PCAP_API int pcap_setmode(pcap_t *p, int mode); + PCAP_API int pcap_setmintocopy(pcap_t *p, int size); + + PCAP_API HANDLE pcap_getevent(pcap_t *p); + + PCAP_AVAILABLE_1_8 + PCAP_API int pcap_oid_get_request(pcap_t *, bpf_u_int32, void *, size_t *); + + PCAP_AVAILABLE_1_8 + PCAP_API int pcap_oid_set_request(pcap_t *, bpf_u_int32, const void *, size_t *); + + PCAP_API pcap_send_queue* pcap_sendqueue_alloc(u_int memsize); + + PCAP_API void pcap_sendqueue_destroy(pcap_send_queue* queue); + + PCAP_API int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data); + + PCAP_API u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync); + + PCAP_API struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size); + + PCAP_API int pcap_setuserbuffer(pcap_t *p, int size); + + PCAP_API int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks); + + PCAP_API int pcap_live_dump_ended(pcap_t *p, int sync); + + PCAP_API int pcap_start_oem(char* err_str, int flags); + + PCAP_API PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p); + + #define MODE_CAPT 0 + #define MODE_STAT 1 + #define MODE_MON 2 + +#elif defined(MSDOS) + + /* + * MS-DOS definitions + */ + + PCAP_API int pcap_stats_ex (pcap_t *, struct pcap_stat_ex *); + PCAP_API void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait); + PCAP_API u_long pcap_mac_packets (void); + +#else /* UN*X */ + + /* + * UN*X definitions + */ + + PCAP_AVAILABLE_0_8 + PCAP_API int pcap_get_selectable_fd(pcap_t *); + + PCAP_AVAILABLE_1_9 + PCAP_API const struct timeval *pcap_get_required_select_timeout(pcap_t *); + +#endif /* _WIN32/MSDOS/UN*X */ + +/* + * Remote capture definitions. + * + * These routines are only present if libpcap has been configured to + * include remote capture support. + */ + +/* + * The maximum buffer size in which address, port, interface names are kept. + * + * In case the adapter name or such is larger than this value, it is truncated. + * This is not used by the user; however it must be aware that an hostname / interface + * name longer than this value will be truncated. + */ +#define PCAP_BUF_SIZE 1024 + +/* + * The type of input source, passed to pcap_open(). + */ +#define PCAP_SRC_FILE 2 /* local savefile */ +#define PCAP_SRC_IFLOCAL 3 /* local network interface */ +#define PCAP_SRC_IFREMOTE 4 /* interface on a remote host, using RPCAP */ + +/* + * The formats allowed by pcap_open() are the following: + * - file://path_and_filename [opens a local file] + * - rpcap://devicename [opens the selected device available on the local host, without using the RPCAP protocol] + * - rpcap://host/devicename [opens the selected device available on a remote host] + * - rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP] + * - adaptername [to open a local adapter; kept for compatibility, but it is strongly discouraged] + * - (NULL) [to open the first local adapter; kept for compatibility, but it is strongly discouraged] + * + * The formats allowed by the pcap_findalldevs_ex() are the following: + * - file://folder/ [lists all the files in the given folder] + * - rpcap:// [lists all local adapters] + * - rpcap://host:port/ [lists the devices available on a remote host] + * + * In all the above, "rpcaps://" can be substituted for "rpcap://" to enable + * SSL (if it has been compiled in). + * + * Referring to the 'host' and 'port' parameters, they can be either numeric or literal. Since + * IPv6 is fully supported, these are the allowed formats: + * + * - host (literal): e.g. host.foo.bar + * - host (numeric IPv4): e.g. 10.11.12.13 + * - host (numeric IPv4, IPv6 style): e.g. [10.11.12.13] + * - host (numeric IPv6): e.g. [1:2:3::4] + * - port: can be either numeric (e.g. '80') or literal (e.g. 'http') + * + * Here you find some allowed examples: + * - rpcap://host.foo.bar/devicename [everything literal, no port number] + * - rpcap://host.foo.bar:1234/devicename [everything literal, with port number] + * - rpcap://10.11.12.13/devicename [IPv4 numeric, no port number] + * - rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number] + * - rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number] + * - rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number] + * - rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number] + * - rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number] + */ + +/* + * URL schemes for capture source. + */ +/* + * This string indicates that the user wants to open a capture from a + * local file. + */ +#define PCAP_SRC_FILE_STRING "file://" +/* + * This string indicates that the user wants to open a capture from a + * network interface. This string does not necessarily involve the use + * of the RPCAP protocol. If the interface required resides on the local + * host, the RPCAP protocol is not involved and the local functions are used. + */ +#define PCAP_SRC_IF_STRING "rpcap://" + +/* + * Flags to pass to pcap_open(). + */ + +/* + * Specifies whether promiscuous mode is to be used. + */ +#define PCAP_OPENFLAG_PROMISCUOUS 0x00000001 + +/* + * Specifies, for an RPCAP capture, whether the data transfer (in + * case of a remote capture) has to be done with UDP protocol. + * + * If it is '1' if you want a UDP data connection, '0' if you want + * a TCP data connection; control connection is always TCP-based. + * A UDP connection is much lighter, but it does not guarantee that all + * the captured packets arrive to the client workstation. Moreover, + * it could be harmful in case of network congestion. + * This flag is meaningless if the source is not a remote interface. + * In that case, it is simply ignored. + */ +#define PCAP_OPENFLAG_DATATX_UDP 0x00000002 + +/* + * Specifies whether the remote probe will capture its own generated + * traffic. + * + * In case the remote probe uses the same interface to capture traffic + * and to send data back to the caller, the captured traffic includes + * the RPCAP traffic as well. If this flag is turned on, the RPCAP + * traffic is excluded from the capture, so that the trace returned + * back to the collector is does not include this traffic. + * + * Has no effect on local interfaces or savefiles. + */ +#define PCAP_OPENFLAG_NOCAPTURE_RPCAP 0x00000004 + +/* + * Specifies whether the local adapter will capture its own generated traffic. + * + * This flag tells the underlying capture driver to drop the packets + * that were sent by itself. This is useful when building applications + * such as bridges that should ignore the traffic they just sent. + * + * Supported only on Windows. + */ +#define PCAP_OPENFLAG_NOCAPTURE_LOCAL 0x00000008 + +/* + * This flag configures the adapter for maximum responsiveness. + * + * In presence of a large value for nbytes, WinPcap waits for the arrival + * of several packets before copying the data to the user. This guarantees + * a low number of system calls, i.e. lower processor usage, i.e. better + * performance, which is good for applications like sniffers. If the user + * sets the PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will + * copy the packets as soon as the application is ready to receive them. + * This is suggested for real time applications (such as, for example, + * a bridge) that need the best responsiveness. + * + * The equivalent with pcap_create()/pcap_activate() is "immediate mode". + */ +#define PCAP_OPENFLAG_MAX_RESPONSIVENESS 0x00000010 + +/* + * Remote authentication methods. + * These are used in the 'type' member of the pcap_rmtauth structure. + */ + +/* + * NULL authentication. + * + * The 'NULL' authentication has to be equal to 'zero', so that old + * applications can just put every field of struct pcap_rmtauth to zero, + * and it does work. + */ +#define RPCAP_RMTAUTH_NULL 0 +/* + * Username/password authentication. + * + * With this type of authentication, the RPCAP protocol will use the username/ + * password provided to authenticate the user on the remote machine. If the + * authentication is successful (and the user has the right to open network + * devices) the RPCAP connection will continue; otherwise it will be dropped. + * + * *******NOTE********: unless TLS is being used, the username and password + * are sent over the network to the capture server *IN CLEAR TEXT*. Don't + * use this, without TLS (i.e., with rpcap:// rather than rpcaps://) on + * a network that you don't completely control! (And be *really* careful + * in your definition of "completely"!) + */ +#define RPCAP_RMTAUTH_PWD 1 + +/* + * This structure keeps the information needed to authenticate the user + * on a remote machine. + * + * The remote machine can either grant or refuse the access according + * to the information provided. + * In case the NULL authentication is required, both 'username' and + * 'password' can be NULL pointers. + * + * This structure is meaningless if the source is not a remote interface; + * in that case, the functions which requires such a structure can accept + * a NULL pointer as well. + */ +struct pcap_rmtauth +{ + /* + * \brief Type of the authentication required. + * + * In order to provide maximum flexibility, we can support different types + * of authentication based on the value of this 'type' variable. The currently + * supported authentication methods are defined into the + * \link remote_auth_methods Remote Authentication Methods Section\endlink. + */ + int type; + /* + * \brief Zero-terminated string containing the username that has to be + * used on the remote machine for authentication. + * + * This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication + * and it can be NULL. + */ + char *username; + /* + * \brief Zero-terminated string containing the password that has to be + * used on the remote machine for authentication. + * + * This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication + * and it can be NULL. + */ + char *password; +}; + +/* + * This routine can open a savefile, a local device, or a device on + * a remote machine running an RPCAP server. + * + * For opening a savefile, the pcap_open_offline routines can be used, + * and will work just as well; code using them will work on more + * platforms than code using pcap_open() to open savefiles. + * + * For opening a local device, pcap_open_live() can be used; it supports + * most of the capabilities that pcap_open() supports, and code using it + * will work on more platforms than code using pcap_open(). pcap_create() + * and pcap_activate() can also be used; they support all capabilities + * that pcap_open() supports, except for the Windows-only + * PCAP_OPENFLAG_NOCAPTURE_LOCAL, and support additional capabilities. + * + * For opening a remote capture, pcap_open() is currently the only + * API available. + */ +PCAP_AVAILABLE_1_9 +PCAP_API pcap_t *pcap_open(const char *source, int snaplen, int flags, + int read_timeout, struct pcap_rmtauth *auth, char *errbuf); + +PCAP_AVAILABLE_1_9 +PCAP_API int pcap_createsrcstr(char *source, int type, const char *host, + const char *port, const char *name, char *errbuf); + +PCAP_AVAILABLE_1_9 +PCAP_API int pcap_parsesrcstr(const char *source, int *type, char *host, + char *port, char *name, char *errbuf); + +/* + * This routine can scan a directory for savefiles, list local capture + * devices, or list capture devices on a remote machine running an RPCAP + * server. + * + * For scanning for savefiles, it can be used on both UN*X systems and + * Windows systems; for each directory entry it sees, it tries to open + * the file as a savefile using pcap_open_offline(), and only includes + * it in the list of files if the open succeeds, so it filters out + * files for which the user doesn't have read permission, as well as + * files that aren't valid savefiles readable by libpcap. + * + * For listing local capture devices, it's just a wrapper around + * pcap_findalldevs(); code using pcap_findalldevs() will work on more + * platforms than code using pcap_findalldevs_ex(). + * + * For listing remote capture devices, pcap_findalldevs_ex() is currently + * the only API available. + */ +PCAP_AVAILABLE_1_9 +PCAP_API int pcap_findalldevs_ex(const char *source, + struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf); + +/* + * Sampling methods. + * + * These allow pcap_loop(), pcap_dispatch(), pcap_next(), and pcap_next_ex() + * to see only a sample of packets, rather than all packets. + * + * Currently, they work only on Windows local captures. + */ + +/* + * Specifies that no sampling is to be done on the current capture. + * + * In this case, no sampling algorithms are applied to the current capture. + */ +#define PCAP_SAMP_NOSAMP 0 + +/* + * Specifies that only 1 out of N packets must be returned to the user. + * + * In this case, the 'value' field of the 'pcap_samp' structure indicates the + * number of packets (minus 1) that must be discarded before one packet got + * accepted. + * In other words, if 'value = 10', the first packet is returned to the + * caller, while the following 9 are discarded. + */ +#define PCAP_SAMP_1_EVERY_N 1 + +/* + * Specifies that we have to return 1 packet every N milliseconds. + * + * In this case, the 'value' field of the 'pcap_samp' structure indicates + * the 'waiting time' in milliseconds before one packet got accepted. + * In other words, if 'value = 10', the first packet is returned to the + * caller; the next returned one will be the first packet that arrives + * when 10ms have elapsed. + */ +#define PCAP_SAMP_FIRST_AFTER_N_MS 2 + +/* + * This structure defines the information related to sampling. + * + * In case the sampling is requested, the capturing device should read + * only a subset of the packets coming from the source. The returned packets + * depend on the sampling parameters. + * + * WARNING: The sampling process is applied *after* the filtering process. + * In other words, packets are filtered first, then the sampling process + * selects a subset of the 'filtered' packets and it returns them to the + * caller. + */ +struct pcap_samp +{ + /* + * Method used for sampling; see above. + */ + int method; + + /* + * This value depends on the sampling method defined. + * For its meaning, see above. + */ + int value; +}; + +/* + * New functions. + */ +PCAP_AVAILABLE_1_9 +PCAP_API struct pcap_samp *pcap_setsampling(pcap_t *p); + +/* + * RPCAP active mode. + */ + +/* Maximum length of an host name (needed for the RPCAP active mode) */ +#define RPCAP_HOSTLIST_SIZE 1024 + +PCAP_AVAILABLE_1_9 +PCAP_API SOCKET pcap_remoteact_accept(const char *address, const char *port, + const char *hostlist, char *connectinghost, + struct pcap_rmtauth *auth, char *errbuf); + +PCAP_AVAILABLE_1_10 +PCAP_API SOCKET pcap_remoteact_accept_ex(const char *address, const char *port, + const char *hostlist, char *connectinghost, + struct pcap_rmtauth *auth, int uses_ssl, char *errbuf); + +PCAP_AVAILABLE_1_9 +PCAP_API int pcap_remoteact_list(char *hostlist, char sep, int size, + char *errbuf); + +PCAP_AVAILABLE_1_9 +PCAP_API int pcap_remoteact_close(const char *host, char *errbuf); + +PCAP_AVAILABLE_1_9 +PCAP_API void pcap_remoteact_cleanup(void); + +#ifdef __cplusplus +} +#endif + +#endif /* lib_pcap_pcap_h */ diff --git a/ledset/WpdPack_4_1_2/Include/pcap/sll.h b/ledset/npcap-sdk-1.13/Include/pcap/sll.h similarity index 74% rename from ledset/WpdPack_4_1_2/Include/pcap/sll.h rename to ledset/npcap-sdk-1.13/Include/pcap/sll.h index e9d5452..392faae 100644 --- a/ledset/WpdPack_4_1_2/Include/pcap/sll.h +++ b/ledset/npcap-sdk-1.13/Include/pcap/sll.h @@ -34,8 +34,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/sll.h,v 1.2.2.1 2008-05-30 01:36:06 guy Exp $ (LBL) */ /* @@ -76,6 +74,8 @@ #ifndef lib_pcap_sll_h #define lib_pcap_sll_h +#include + /* * A DLT_LINUX_SLL fake link-layer header. */ @@ -83,18 +83,35 @@ #define SLL_ADDRLEN 8 /* length of address field */ struct sll_header { - u_int16_t sll_pkttype; /* packet type */ - u_int16_t sll_hatype; /* link-layer address type */ - u_int16_t sll_halen; /* link-layer address length */ - u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */ - u_int16_t sll_protocol; /* protocol */ + uint16_t sll_pkttype; /* packet type */ + uint16_t sll_hatype; /* link-layer address type */ + uint16_t sll_halen; /* link-layer address length */ + uint8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */ + uint16_t sll_protocol; /* protocol */ }; /* - * The LINUX_SLL_ values for "sll_pkttype"; these correspond to the - * PACKET_ values on Linux, but are defined here so that they're - * available even on systems other than Linux, and so that they - * don't change even if the PACKET_ values change. + * A DLT_LINUX_SLL2 fake link-layer header. + */ +#define SLL2_HDR_LEN 20 /* total header length */ + +struct sll2_header { + uint16_t sll2_protocol; /* protocol */ + uint16_t sll2_reserved_mbz; /* reserved - must be zero */ + uint32_t sll2_if_index; /* 1-based interface index */ + uint16_t sll2_hatype; /* link-layer address type */ + uint8_t sll2_pkttype; /* packet type */ + uint8_t sll2_halen; /* link-layer address length */ + uint8_t sll2_addr[SLL_ADDRLEN]; /* link-layer address */ +}; + +/* + * The LINUX_SLL_ values for "sll_pkttype" and LINUX_SLL2_ values for + * "sll2_pkttype"; these correspond to the PACKET_ values on Linux, + * which are defined by a header under include/uapi in the current + * kernel source, and are thus not going to change on Linux. We + * define them here so that they're available even on systems other + * than Linux. */ #define LINUX_SLL_HOST 0 #define LINUX_SLL_BROADCAST 1 @@ -103,10 +120,11 @@ struct sll_header { #define LINUX_SLL_OUTGOING 4 /* - * The LINUX_SLL_ values for "sll_protocol"; these correspond to the - * ETH_P_ values on Linux, but are defined here so that they're - * available even on systems other than Linux. We assume, for now, - * that the ETH_P_ values won't change in Linux; if they do, then: + * The LINUX_SLL_ values for "sll_protocol" and LINUX_SLL2_ values for + * "sll2_protocol"; these correspond to the ETH_P_ values on Linux, but + * are defined here so that they're available even on systems other than + * Linux. We assume, for now, that the ETH_P_ values won't change in + * Linux; if they do, then: * * if we don't translate them in "pcap-linux.c", capture files * won't necessarily be readable if captured on a system that @@ -125,5 +143,7 @@ struct sll_header { */ #define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */ #define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */ +#define LINUX_SLL_P_CAN 0x000C /* CAN frames, with SocketCAN pseudo-headers */ +#define LINUX_SLL_P_CANFD 0x000D /* CAN FD frames, with SocketCAN pseudo-headers */ #endif diff --git a/ledset/npcap-sdk-1.13/Include/pcap/socket.h b/ledset/npcap-sdk-1.13/Include/pcap/socket.h new file mode 100644 index 0000000..ee2e393 --- /dev/null +++ b/ledset/npcap-sdk-1.13/Include/pcap/socket.h @@ -0,0 +1,84 @@ +/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ +/* + * Copyright (c) 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the Computer Systems + * Engineering Group at Lawrence Berkeley Laboratory. + * 4. Neither the name of the University nor of the Laboratory may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef lib_pcap_socket_h +#define lib_pcap_socket_h + +/* + * Some minor differences between sockets on various platforms. + * We include whatever sockets are needed for Internet-protocol + * socket access on UN*X and Windows. + */ +#ifdef _WIN32 + /* Need windef.h for defines used in winsock2.h under MingW32 */ + #ifdef __MINGW32__ + #include + #endif + #include + #include + + /* + * Winsock doesn't have this POSIX type; it's used for the + * tv_usec value of struct timeval. + */ + typedef long suseconds_t; +#else /* _WIN32 */ + #include + #include + #include /* for struct addrinfo/getaddrinfo() */ + #include /* for sockaddr_in, in BSD at least */ + #include + + /*! + * \brief In Winsock, a socket handle is of type SOCKET; in UN*X, it's + * a file descriptor, and therefore a signed integer. + * We define SOCKET to be a signed integer on UN*X, so that it can + * be used on both platforms. + */ + #ifndef SOCKET + #define SOCKET int + #endif + + /*! + * \brief In Winsock, the error return if socket() fails is INVALID_SOCKET; + * in UN*X, it's -1. + * We define INVALID_SOCKET to be -1 on UN*X, so that it can be used on + * both platforms. + */ + #ifndef INVALID_SOCKET + #define INVALID_SOCKET -1 + #endif +#endif /* _WIN32 */ + +#endif /* lib_pcap_socket_h */ diff --git a/ledset/WpdPack_4_1_2/Include/pcap/usb.h b/ledset/npcap-sdk-1.13/Include/pcap/usb.h similarity index 51% rename from ledset/WpdPack_4_1_2/Include/pcap/usb.h rename to ledset/npcap-sdk-1.13/Include/pcap/usb.h index adcd19c..e485ec8 100644 --- a/ledset/WpdPack_4_1_2/Include/pcap/usb.h +++ b/ledset/npcap-sdk-1.13/Include/pcap/usb.h @@ -11,8 +11,8 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior written + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS @@ -29,14 +29,14 @@ * * Basic USB data struct * By Paolo Abeni - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $ */ - -#ifndef _PCAP_USB_STRUCTS_H__ -#define _PCAP_USB_STRUCTS_H__ -/* +#ifndef lib_pcap_usb_h +#define lib_pcap_usb_h + +#include + +/* * possible transfer mode */ #define URB_TRANSFER_IN 0x80 @@ -54,37 +54,90 @@ /* * USB setup header as defined in USB specification. - * Appears at the front of each packet in DLT_USB captures. + * Appears at the front of each Control S-type packet in DLT_USB captures. */ typedef struct _usb_setup { - u_int8_t bmRequestType; - u_int8_t bRequest; - u_int16_t wValue; - u_int16_t wIndex; - u_int16_t wLength; + uint8_t bmRequestType; + uint8_t bRequest; + uint16_t wValue; + uint16_t wIndex; + uint16_t wLength; } pcap_usb_setup; +/* + * Information from the URB for Isochronous transfers. + */ +typedef struct _iso_rec { + int32_t error_count; + int32_t numdesc; +} iso_rec; /* * Header prepended by linux kernel to each event. * Appears at the front of each packet in DLT_USB_LINUX captures. */ typedef struct _usb_header { - u_int64_t id; - u_int8_t event_type; - u_int8_t transfer_type; - u_int8_t endpoint_number; - u_int8_t device_address; - u_int16_t bus_id; + uint64_t id; + uint8_t event_type; + uint8_t transfer_type; + uint8_t endpoint_number; + uint8_t device_address; + uint16_t bus_id; char setup_flag;/*if !=0 the urb setup header is not present*/ char data_flag; /*if !=0 no urb data is present*/ int64_t ts_sec; int32_t ts_usec; int32_t status; - u_int32_t urb_len; - u_int32_t data_len; /* amount of urb data really present in this event*/ + uint32_t urb_len; + uint32_t data_len; /* amount of urb data really present in this event*/ pcap_usb_setup setup; } pcap_usb_header; +/* + * Header prepended by linux kernel to each event for the 2.6.31 + * and later kernels; for the 2.6.21 through 2.6.30 kernels, the + * "iso_rec" information, and the fields starting with "interval" + * are zeroed-out padding fields. + * + * Appears at the front of each packet in DLT_USB_LINUX_MMAPPED captures. + */ +typedef struct _usb_header_mmapped { + uint64_t id; + uint8_t event_type; + uint8_t transfer_type; + uint8_t endpoint_number; + uint8_t device_address; + uint16_t bus_id; + char setup_flag;/*if !=0 the urb setup header is not present*/ + char data_flag; /*if !=0 no urb data is present*/ + int64_t ts_sec; + int32_t ts_usec; + int32_t status; + uint32_t urb_len; + uint32_t data_len; /* amount of urb data really present in this event*/ + union { + pcap_usb_setup setup; + iso_rec iso; + } s; + int32_t interval; /* for Interrupt and Isochronous events */ + int32_t start_frame; /* for Isochronous events */ + uint32_t xfer_flags; /* copy of URB's transfer flags */ + uint32_t ndesc; /* number of isochronous descriptors */ +} pcap_usb_header_mmapped; + +/* + * Isochronous descriptors; for isochronous transfers there might be + * one or more of these at the beginning of the packet data. The + * number of descriptors is given by the "ndesc" field in the header; + * as indicated, in older kernels that don't put the descriptors at + * the beginning of the packet, that field is zeroed out, so that field + * can be trusted even in captures from older kernels. + */ +typedef struct _usb_isodesc { + int32_t status; + uint32_t offset; + uint32_t len; + uint8_t pad[4]; +} usb_isodesc; #endif diff --git a/ledset/WpdPack_4_1_2/Include/pcap/vlan.h b/ledset/npcap-sdk-1.13/Include/pcap/vlan.h similarity index 91% rename from ledset/WpdPack_4_1_2/Include/pcap/vlan.h rename to ledset/npcap-sdk-1.13/Include/pcap/vlan.h index b0cb794..b29dd73 100644 --- a/ledset/WpdPack_4_1_2/Include/pcap/vlan.h +++ b/ledset/npcap-sdk-1.13/Include/pcap/vlan.h @@ -29,16 +29,16 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * @(#) $Header: /tcpdump/master/libpcap/pcap/vlan.h,v 1.1.2.2 2008-08-06 07:45:59 guy Exp $ */ #ifndef lib_pcap_vlan_h #define lib_pcap_vlan_h +#include + struct vlan_tag { - u_int16_t vlan_tpid; /* ETH_P_8021Q */ - u_int16_t vlan_tci; /* VLAN TCI */ + uint16_t vlan_tpid; /* ETH_P_8021Q */ + uint16_t vlan_tci; /* VLAN TCI */ }; #define VLAN_TAG_LEN 4 diff --git a/ledset/npcap-sdk-1.13/Lib/ARM64/Packet.lib b/ledset/npcap-sdk-1.13/Lib/ARM64/Packet.lib new file mode 100644 index 0000000000000000000000000000000000000000..45ab1b0f1a8d7b48ba70a1ae3a9f3cfaf07059cb GIT binary patch literal 9708 zcmb_heQZ?65g%*;r0217Vv8`r+H68*!z+&z~g=X)>r zLB3E*Q>7JB|A1?|XOY-{Nbt_tL+4pr60a)B(UA zfQEAbjn@I1?gVImmQ$+*z^LVAPV3(SVANIb(c}0;TKg2I4m8E6d4^MG6oAp%&p1Vn z0x)Vm%c=7O%8{%IPF+{g9#ZcyPV069l<5_GBDJ}kIxZp(()w{uJqZ9ttw%WZ_G5db z?rWTSPNN*Dt%g(gLF6N~UEgIQ605jM^O({3{LkX?l7>G20fM}u#bHnMRTeS0@WDp|A*R(&F_5zl3c23^AD(w%wRWRtMD-lUzfac~VL zbqQD4o^=YgX{a;-*PXJ9yB^t@$@)i?^0_8Pf@hOWiaug~8E-LZKU}g4Ec8_12%bdW zR+^pFG!VJWQyOki0a;Q$l}oy#wjQ5oM6kIY_He40EC#yGnYzx7N3{-#rpT6h<90Fe zm>URM!RC7L!l>i84`LpfCL<^nt;QS-A16QNr0uDa>pJq)qFyuh08$fW~eq4?6S2*GXkzT|<7qpzK4Js_7Y*$fwo$vM|FeY%jh z!J*RFfn@VZWvk&#ej=50cO`S_tR5(6QWws@y4WhKi;Vzqt^weBBfyjCP!03JtrYAq^a@i5a25bXr`48M;?0M6p~3H+YGJ@+c=9qR?yy$;|NB)1LV zBDNVvJBc2EBWSlD<=46aPUCkC$`9iEC43(0LwvONI@-x%n`OwaN1lcK8N|L|2?TXe z4=bSoHo`Kv1=^ttS|9>zp&2&7Qn(HJpcUF+IeZ6J!>zCa)<7flLJzEh+rfhMuns!W zg(kQIx?u^_EULX)^RCFJ)3C<`wlg-Xd?)8yNrga=>_9Dm1}YR3!SxDt{R;zUl^1Y{ z;ZJhZsjxT5CY8cjlt5fDu<6tE^;7~Ih2Rr+)K#t(hcYe9iQ<@d-(^X*-*iLcTVl`eK|al@Th9eGN^;0~uDI!=&Ex*`ev}6Nx1Ev9;*Yaa6)rI{muk z)9jUChYZ{g#>+`Yz%MUCW-Y7MWWm0*k;LH}S4U-$K(fIiNo?Lq{EY=TZ8?YK-Z&+4g zoxq9jc`V6P-f z?iL~zB`3s(_heDR>@N1~S2L$r1mieYxNst2Smme8RZ#w_@G^ zm2;Ej7X1yukjSm5;Ikb5P<(h#rnlImTg}MgaiQXk-F%}l=ADczYo-o>OzAL$p*uo0}0Xr%ZG zffc(uh}F{i_mAVW;BMg#ZO=&*ylP}m9t_&dIfhGi2EEe>t>xX;4!pkJQ^&wtq zb#8$|&U;lc#mF!B{^cC=ubyHqLbjQ(9ywb3KEqlivB-fg#8}F*i>#J6tlMv}I;BBj zky9c8oA)T1W^Vtg|9{G6ZZ$y@XDV^_41>AFu(xji;>}MsAZ8=MBuke%(Gp>7znkI4#Q0egaB4_fp5M`zd`)FjdL!*>|Gs38Y0@BaNoyu`)3SdoL` zjx7|DVP$#Zw%=S~+0ZPJ)Qtd5bA`L`Ia~eor4QJgwHUBMt|^9n{N2l!uHgka-eHR| z^zJm2E5yMny)w*IWJTn^Y_8fg9ClGcfaagyhA6yuW&9%+h3hC1xqb+N-+S@7^A;jmI+D6nCxGg; zI?qgX-q!DSTxa7Lp?K+;leqV<%)35?sIE$hci#ZH8d44b literal 0 HcmV?d00001 diff --git a/ledset/npcap-sdk-1.13/Lib/ARM64/wpcap.lib b/ledset/npcap-sdk-1.13/Lib/ARM64/wpcap.lib new file mode 100644 index 0000000000000000000000000000000000000000..53964bb8ca503abfffe38446c55c497bd12ecc49 GIT binary patch literal 26362 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 ib6OGb literal 0 HcmV?d00001 diff --git a/ledset/npcap-sdk-1.13/Lib/Packet.lib b/ledset/npcap-sdk-1.13/Lib/Packet.lib new file mode 100644 index 0000000000000000000000000000000000000000..8d866dd58a69e1987626e9e18c5b2770c266bd8b GIT binary patch literal 9898 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 literal 0 HcmV?d00001 diff --git a/ledset/npcap-sdk-1.13/Lib/wpcap.lib b/ledset/npcap-sdk-1.13/Lib/wpcap.lib new file mode 100644 index 0000000000000000000000000000000000000000..c43e37fcf10b9cf82e1617ef00786638a32a9549 GIT binary patch literal 26940 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 R$scI9>DBc!-{~2o{{^~gtpxx8 literal 0 HcmV?d00001 diff --git a/ledset/npcap-sdk-1.13/Lib/x64/Packet.lib b/ledset/npcap-sdk-1.13/Lib/x64/Packet.lib new file mode 100644 index 0000000000000000000000000000000000000000..d85e560ffdd529c258994478e21962158e10067f GIT binary patch literal 9708 zcmb_hYiwM_6+T%92i(LsPHe}qW3OL%AT^|BH+9s=*opHn_$BXBej$7DUXv~By*K+v zfd(2`zz@_4i9|f4{z6ezDQcA;sRT$M5P3iZh(H5sL;+PIa-&oT3#2MkanJ1BnK^Us zY`XUKN=NtJbIzP^&dfP8XJ*@WC$dwAdaLdZ>%X7=O#c>NJKUG<9X;Lrb+QToMgeL* z0;v5SVEtVHO(!^Q2m>%`IL&F(c>qSO)h<1OPo%n8PR(eFQT-&RmIwf&x_M4*F9R^D z|A14=Nt7dn$2hglp*^I|S2=CG51>eA@QKvuaB9ASI7pjDICaDU7;SigQ)f4}M{2*u zspBllks3ps+K(b1sqqU=UB>_zwW05f!f$YDP9qLddnKnX^qWyrm{UV9j!W;v#NhDQ z=y-f$U|($S_~2N4bbP`|Og(DlVPazBfuSM49Dd6cxHx|Bfsy+s2KwXuFjj1Lz{>y9 z%H~pb1}&s!oCzOWG6u4#BUZMAwl4Iv8A;4oUh}*`QNp!H9V^qHOgMQftLaic*Nj=2 zB!ANs3EQieE1{TkN1;ERwx<$#%V5gGpV& z751j>oMjp+O~7?yR{r3x_ovd{QKfvYiIL#iWRs$gm{-PIj9Z5bR*r?93LL?c=z9v& z)0ze%7kNs<@hc!p%43;?Gi2%UiADsQ>tPRL`9$8=ZO+tn_C2O`NHj&Z)Elw#@y8us z&7(aVB<+t|iDW!AW7!3La?w5&Nqy#tzaz+#8Y6|72eYZXC#=w(63E`-AP;7yZT~DO zfwViE%Eaxxw)40TUJ9gL*7bcytc>mxj)4-mcJsEwmnYq-VoUsi!i?iv-Ow$`*EEMx zGbvAqy1K4}YY*mF^L?45FDw*a+7%(V$2ycalCt%+6RrE?vL&10Ts|@5n5It`@-{eB z8rzp_9;s~ApURF+C7gqaOfszp3Yye~i?1$r$?9So0DM#f@O>@7UF!i(G~wR50pN54 z!1+x8)vW+eAkEgHA{Gym^#G9;fO-6Wxeee0{62}_W4Pzeq28;V0QYSKID_Og0$jm1 zBWNey0q_Fa?MC^vc7U_^9YXn0eE$NU$GQ+7?Y)6^(%7aF`PIk^V}E+FFIWOW6;#7& zsDW)z3AaHLv_b>4K^@e?R#*u?fiBnpjj#&Vz*@K+?tpbr3!Tsbcfw`}!zS1WE$G5} z*aGda0z%7bufn`5^650}F~04L%_`r?`BqXQ5G31I3!s4#1%-dTLS65|z*)rwTw-{W z9Cb?U4YEn8a26#HSM+WAG<{ta-$o($#2vL2aG}5MG1UUz{Z>{++=!})M5%*I!XCQ2 z>U%L;V6?T!xR%L^LV(<2l~F6SR4%SJ{e?gNf=KvJ#9Qf5^dVfrlpXljVO6MY?V$PLFp>YzoBcB z<=ag}no$6fY#O`djw!Z3bA?6*M5P}!Op}oE^;Fa){-RiAp*HM_t^4k#D7DI1hC-U8 zt4EtjOofR|U5~yPr&48vN@Gt$Q}IBC)#EU!_dIrJdV547$vtc>dUPC>@TE?_PVw}+ zJ(*7PisS#?VnlX{`;5t|q-z(iw98x zTVP$yDr9|J6kz#*CBr*~+Tqkx*3Q|}`S8~9ZQ-H8k^5b__F!17AB+I25%z{<71k;2 zO@Uw!rtBF9yZTOH#fpUm+5%O9^(_R#<3505Zx0Dh(Kn9c>O`0hHUg;=RUF30qD=mn zb$}lE&9KJsYbi_oaz#mZWS4vE#iAqxum9$y_g=$3@xB6>q9jQ?V6P-f?hzsuB`3v) z`(#nV>@N50moukW1mifDxNst2SYB>*_e993Rlr}LKlT}3m)&yIZjoD2cYuny$#RSS z`k+tbRz&bw4*yMjxKF0H+@o90$l`IKYj|k;mIlhmY>OIM;|)15H9+- z(p=>$5R&O-;)x}a;0>%fd>M~act#O;TAdUCEz;u#4MEEtaOT+vh9nv(z5-xH@9|?D zcUI5gArDtX;hDFhBY=y}iKs{k;@!nhpZP~SBCgaBwK|bNs@F1SPu}CJX!+sEhc2@< z_cn@1icf_>H=i=`3?3f%{P+##VWl5WRD%Rky_Sh+$cHWKp1&SO#8niL)-MWVS@Pk< zCuc9Qe7K$BsqCe7L z|MJv_crAlBB_#X!*&_&&VNIFc-tq$*!___{JkSKdibnlj9ldbsatC6qp;%g-o1>76 zUR6vn^5<<=uQUIuDdsX{n+faG&YEu+)}0cI9Owd!r7XM1YFYi}>1(V`sZm(ult{o9 zJ&LB8`((c7I-9w*1WlZ&#Mv_l=1xP#{bI+L|J;h0wFHwaUFt+jfYobxYo=*r-<XqqeBrO(;cKUBWU=B&Yh6>v>4?BkQQZ+(XsAu_{sZMSrl%hNaXq@2%ag&t_;-NWb@VJ#VcOw zEH~P{N6*YNv}TGXuZn`8MSt$!<$j#4yn%m*;FSc44zXCu3#dS-hSl=LX((1+EfiH< zYY{m0y7b6=C3N`jEHYa)H1yp*$74e2J~e9TZPoKnB1vo#!t7 lzHWh?b~-7RR_&1?B(LR-rpdcx{P?%byDo*Ou1bk_{{xFnP=Npd literal 0 HcmV?d00001 diff --git a/ledset/npcap-sdk-1.13/Lib/x64/wpcap.lib b/ledset/npcap-sdk-1.13/Lib/x64/wpcap.lib new file mode 100644 index 0000000000000000000000000000000000000000..b482ac54966bbaa99251be3ba9862b6466def5e4 GIT binary patch literal 26362 zcmds9dz4hgng0M4d8h;w5Fd<+JOlxUnPGSc0}Kem@EV4fJT5)mcbJBr?xwp3lte;K zPRQ;#Cb~yWayIIEl1O&5?naMpJO^_;h>;v0F=P`60>;QH;A278^#Rei-&b|3>bv(= z54WeuKilVgbF04ks($tOZq-*`)t&36#&YqtX}!l)_hzN%UV*Y^g1 z(*WaM0=VUUfC&`9u6SryZA(!hk1xrW7$Nrc1W6h7SoZYVmpYY;1~*e z7oSKiSSHcDev%ro{zMDrNSZhk`yXk>QAsoF0Ek-el{9k~#*ymROLA6XJCS18cSP&I zCuz?fpUdp%l?Po�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 + + + + + Npcap Guide + + + +

The Npcap Guide is located in the "docs" directory. + You can also find the latest version of the Guide on Npcap.com. +

+ + diff --git a/ledset/pcaprethread.cpp b/ledset/pcaprethread.cpp index 00167e1..8526b1c 100644 --- a/ledset/pcaprethread.cpp +++ b/ledset/pcaprethread.cpp @@ -1,35 +1,69 @@ #include "pcaprethread.h" +#include "pcap.h" +#include "globalfunc.h" PcapReThread::PcapReThread(pcap_t *pcap) : pcap(pcap) { - qRegisterMetaType("Resp"); + qRegisterMetaType("FuncIntByte"); connect(this, &QThread::finished, this, &QThread::deleteLater); - connect(this, &PcapReThread::onMsg, this, [](Resp resp, const QByteArray data) { - resp.callback(data); + connect(this, &PcapReThread::onMsg, this, [](FuncIntByte callback, int code, const QByteArray data) { + callback(code, data); }); } +PcapReThread::~PcapReThread() { + pcap_close(pcap); +} + +int PcapReThread::sendMsgNet(const byte *msg, int size, int id, qint64 timeout, FuncIntByte callback, WaitingDlg *waitingDlg) { + int res; + PcapResp *resp; + { + std::lock_guard lock(mtx); + res = pcap_sendpacket(pcapSend, msg, size); + if(res==0) { + if(timeout==0) timeout = 30000; + timeout += std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); + resps.append(resp = new PcapResp{callback, id, timeout}); + } + } + if(waitingDlg) { + if(res) waitingDlg->close(); + else { + QObject::connect(waitingDlg, &WaitingDlg::rejected, [=] { + std::lock_guard lock(mtx); + for(int i=resps.size()-1; i>=0; i--) if(resps[i]==resp) { + resp->notCancelled = false; + break; + } + }); + waitingDlg->showLater(); + } + } + return res; +} void PcapReThread::run() { pcap_pkthdr *header; const u_char *data; - int res; - while((res = pcap_next_ex(pcap, &header, &data)) >= 0) { + int cnt; + while((cnt = pcap_next_ex(pcap, &header, &data)) >= 0) { if(status==2) return; if(resps.isEmpty()) continue; { std::lock_guard lock(mtx); - if(status==0 && res && data[0]==0x55 && data[1]==0x55) { + if(status==0 && cnt && data[0]==0x55 && data[1]==0x55) { int id = data[2]<<8 | data[3]; - for(int i=0; iid==id) { auto resp = resps.takeAt(i); - emit onMsg(resp, QByteArray((char*)data, header->caplen)); + if(resp->notCancelled) emit onMsg(resp->callback, 0, QByteArray((char*)data, header->caplen)); + delete resp; break; } } auto now = std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); - for(int i=0; i 0) { + for(int i=0; itimeout <= now && resps[i]->timeout > 0) { auto resp = resps.takeAt(i); - resp.timeout = -5; - emit onMsg(resp, QByteArray()); + if(resp->notCancelled) emit onMsg(resp->callback, 5, QByteArray()); + delete resp; } } } diff --git a/ledset/pcaprethread.h b/ledset/pcaprethread.h index 48c46fa..21226ef 100644 --- a/ledset/pcaprethread.h +++ b/ledset/pcaprethread.h @@ -1,38 +1,31 @@ #ifndef PCAPRETHREAD_H #define PCAPRETHREAD_H -#include -#define HAVE_REMOTE +#include "waitingdlg.h" #include "pcap.h" +#include -struct Resp { - Resp() {} - Resp(int id, qint64 timeout, const std::function &callback) : id(id), timeout(timeout), callback(callback) { - auto now = std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); - if(this->timeout > 0) this->timeout += now; - } +typedef std::function FuncIntByte; + +struct PcapResp { + FuncIntByte callback; int id; qint64 timeout; - std::function callback; + bool notCancelled{true}; }; - class PcapReThread : public QThread { Q_OBJECT public: explicit PcapReThread(pcap *pcap); - ~PcapReThread() { - pcap_close(pcap); - } - void addResp(const Resp &resp) { - std::lock_guard lock(mtx); - resps.append(resp); - } + ~PcapReThread(); + + int sendMsgNet(const byte *msg, int size, int id, qint64 timeout, FuncIntByte callback, WaitingDlg *waitingDlg = 0); std::atomic status{0}; - QList resps; + QList resps; std::mutex mtx; pcap *pcap; signals: - void onMsg(Resp resp, const QByteArray data); + void onMsg(FuncIntByte callback, int code, const QByteArray data); void onError(char *); protected: void run(); diff --git a/ledset/videowin.cpp b/ledset/videowin.cpp index d722caf..9f679d7 100644 --- a/ledset/videowin.cpp +++ b/ledset/videowin.cpp @@ -11,7 +11,6 @@ #include #include #include - using namespace std; VideoWin *VideoWin::newIns(QByteArray &name, QWidget *parent) { diff --git a/ledset/videowin.h b/ledset/videowin.h index 0403314..6db8a91 100644 --- a/ledset/videowin.h +++ b/ledset/videowin.h @@ -10,7 +10,6 @@ #include #include #include -#include "Win32-Extensions.h" class VideoSendThread : public QThread { Q_OBJECT diff --git a/ledset/waitingdlg.cpp b/ledset/waitingdlg.cpp new file mode 100644 index 0000000..b636bdf --- /dev/null +++ b/ledset/waitingdlg.cpp @@ -0,0 +1,100 @@ +#include "waitingdlg.h" +#include "gutil/qgui.h" +#include +#include +#include +#include +#include + +WaitingDlg::WaitingDlg(QWidget *parent, QString text, QString sucText) : QDialog{parent, Qt::Tool}, sucText(sucText) { + setAttribute(Qt::WA_DeleteOnClose); + setModal(true); + + auto vBox = new VBox(this); + + mIndicator = new WaitingIndicator(this); + mIndicator->setFixedSize(120, 120); + vBox->addWidget(mIndicator, 0, Qt::AlignCenter); + + fdText = new QLabel(text); + fdText->setAlignment(Qt::AlignCenter); + gFont(fdText, 18, true); + vBox->addWidget(fdText); +} + +void WaitingDlg::timerEvent(QTimerEvent *event) { + if(showTimerId==event->timerId()) { + killTimer(showTimerId); + showTimerId = 0; + show(); + } else if(closeTimerId==event->timerId()) { + killTimer(closeTimerId); + closeTimerId = 0; + close(); + } else QDialog::timerEvent(event); +} +void WaitingDlg::showLater() { + if(showTimerId) killTimer(showTimerId); + showTimerId = startTimer(250); +} +void WaitingDlg::success() { + fdText->setText(sucText.isEmpty() ? tr("Success") : sucText); + mIndicator->success(); + if(closeTimerId) killTimer(closeTimerId); + closeTimerId = startTimer(1000); +} + + +void WaitingIndicator::success() { + if(timerId > 0) killTimer(timerId); + timerId = -1; + angle = 0; + update(); +} + +void WaitingIndicator::timerEvent(QTimerEvent *event) { + if(timerId!=event->timerId()) QWidget::timerEvent(event); + else if(isVisible()) { + angle += 30; + if(angle>=360) angle -= 360; + update(); + } else if(timerId > 0) { + killTimer(timerId); + timerId = 0; + angle = 0; + } +} + +void WaitingIndicator::paintEvent(QPaintEvent *) { + QPainter painter(this); + painter.setRenderHint(QPainter::Antialiasing); + if(timerId > 0) { + int radius = qMin(width(), height()) * 0.33; + int innerRadius = radius >> 1; + QPen pen(mColor, radius / 6, Qt::SolidLine, Qt::RoundCap); + painter.translate(width()>>1, height()>>1); + auto color = mColor; + for(int i=0; i<12; ++i) { + if(i) { + color.setAlphaF(1 - i/12.0); + pen.setColor(color); + painter.rotate(-30); + } else if(angle) painter.rotate(angle); + painter.setPen(pen); + painter.drawLine(0, innerRadius, 0, radius); + } + } else if(timerId==0) timerId = startTimer(33); + else { + int radius = qMin(width(), height()) >> 1; + int lineWidth = radius / 8; + radius -= lineWidth>>1; + QPen pen(QColor(0x00aa00), lineWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); + painter.setPen(pen); + painter.translate(width()>>1, height()>>1); + painter.drawEllipse(QPoint(0, 0), radius, radius); + QPainterPath path({-0.8*radius, 0}); + path.lineTo(-0.25*radius, 0.6*radius); + path.lineTo(0.6*radius, -0.5*radius); + painter.drawPath(path); + } +} diff --git a/ledset/waitingdlg.h b/ledset/waitingdlg.h new file mode 100644 index 0000000..74915f8 --- /dev/null +++ b/ledset/waitingdlg.h @@ -0,0 +1,49 @@ +#ifndef WAITINGDLG_H +#define WAITINGDLG_H + +#include +#include +#include + +class WaitingIndicator : public QWidget { + Q_OBJECT +public: + using QWidget::QWidget; + QColor mColor{0x0088ff}; +public slots: + void success(); +protected: + void timerEvent(QTimerEvent * event) override; + void paintEvent(QPaintEvent * event) override; + + int angle{0}; + int timerId{0}; +}; + +class WaitingDlg : public QDialog { + Q_OBJECT +public: + explicit WaitingDlg(QWidget *parent = nullptr, QString text = 0, QString sucText = 0); + + inline void connAbort(QNetworkReply *reply) { + connect(this, &WaitingDlg::rejected, reply, [reply] { + reply->blockSignals(true); + reply->abort(); + reply->blockSignals(false); + reply->deleteLater(); + }); + } + QPushButton *btnAbort; + QLabel *fdText; + QString sucText; + WaitingIndicator *mIndicator; +public slots: + void showLater(); + void success(); +protected: + void timerEvent(QTimerEvent *) override; +private: + int closeTimerId{0}, showTimerId{0}; +}; + +#endif // WAITINGDLG_H