patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9111, pcapif: Use pcap_oid_get_request()...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #9111: pcapif: Use pcap_oid_get_request() instead?

Submitter:  Dirk Ziegelmeier <dziegel>
Submitted:  Wed 07 Sep 2016 06:33:55 PM UTC
   
 
Category:  Platform ports Priority:  5 - Normal
Status:  Works For Me Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Jump to the original submission

Wed 23 Nov 2016 08:06:57 PM UTC, comment #6: 

I'm lost there. I'm using WinPcap, and there is no pcap_oid_get_request() function. How is WinPcap related to libpcap, anyway?

I'm giving up: I don't see a big difference anyway, given that the windows port is an "example" port only...

Simon Goldschmidt <goldsimon>
Group administrator
Tue 22 Nov 2016 09:01:53 PM UTC, comment #5: 

Is this really portable pcap? i.e. no win32 only? I ask because the separation between pcapif and pcapif_helper was meant to make pcapif usable on other platforms (not win32 dependent).

OK, by now I know that doesn't work on linux as pcap apps can't see packets sent by pcap apps, but from the developer's view trying to write clean code, that's a different issue... ;-)

Simon Goldschmidt <goldsimon>
Group administrator
Tue 04 Oct 2016 08:20:24 PM UTC, comment #4: 

Let me test that one before pushing it ;-)

Simon Goldschmidt <goldsimon>
Group administrator
Fri 30 Sep 2016 05:56:10 AM UTC, comment #3: 

Re comment #2: of course we still need wpcap.lib. This is where all pcap functions are defined. This patch is only to get source code compatibility to pcap where I have been using win32-only packet.lib functions...

Simon Goldschmidt <goldsimon>
Group administrator
Wed 07 Sep 2016 09:15:08 PM UTC, comment #2: 

We would still need to use wpcap.lib from winpcap-dev right?

I use the winpcap support for some testing/simulation work. I have the winpcap-dev package integrated into my build and eliminating it completely would be nice, but if we still need wpcap.lib, then it doesn't matter to me too much (Packet.lib is also included in winpcap-dev)

Joel Cunningham <jcunningham>
Group Member
Wed 07 Sep 2016 06:34:35 PM UTC, comment #1: 

Patch originally from
Gisle Vanem -email is unavailable-

Dirk Ziegelmeier <dziegel>
Group administrator
Wed 07 Sep 2016 06:33:55 PM UTC, original submission:  

I've toying with simplifying the src/contrib/ports/win32/pcap*.c
code. Since way back, libpcap has the function pcap_oid_get_request()
to simplify/replace PacketRequest() on Windows. Thus the Win32-port should
build with no dependency on Packet.lib (or libpacket.a). Note the:
  Unused libraries:
   f:/MingW32/src/inet/libpcap/WinPcap/lib/Packet.lib

in the lwip.map or test-app.map files.

From my test-app.exe it seems to work fine:
  status_callback==UP, local interface IP is 10.0.0.23
  setting sys-time: 1471003844
  3com.com: 15.201.225.10

Unplug my Eth-cable:
  link_callback==DOWN

Plug the cable back:
  link_callback==UP
  link_callback==DOWN
  link_callback==UP
  status_callback==UP, local interface IP is 10.0.0.24

I'm not sure how and where to put my patches. If there
is any interest? Who is maintaining the Win32 port?

Dirk Ziegelmeier <dziegel>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by jcunningham (Posted a comment)
  • -email is unavailable- added by dziegel (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-23 goldsimon StatusNone Works For Me
        Open/ClosedOpen Closed
    2016-11-22 goldsimon Carbon-Copy- Added -email is unavailable-
    2016-09-07 dziegel Attached File- Added pcap_oid_get_request.diff, #38445

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code