Pcap_open_live or how to read packets?

I have been looking for a while for a starting point to have my own code to parse the packets incoming on a specific interface. It is not a radiotap / not an interface in monitor mode.
It is a regular wlan1 and I can just not find the entry point.... how to get started.

There is libpcap and pcap_open_live - this is what I have found.

Need help adapting package from CC to 18.06.2

Is this the appropriate way to "hook up" to an interface and to listen and to parse 802.11 packets?

Any hint is highly appreciated -
thanks, Frood

Hello Frood42,

The proper way to capture packets on an interface is with "tcpdump" command
You can then parse these packets to wireshark for better inspection.

My suggestion, create a startup script which will run the tcpdump command on a specific interface and send those data directly to a file or to wireshark on your pc via network

Some helpful links

best regards

Tcpdump is done manually - I am fine with that.

But I need to read the traffic on wlan1 in real time - and filter and parse some specific data.
And no, I don’t want to read and parse it manually (netcat tcpdump remotely) - I need to do it programmatically.
It is actually broadcasts (802.11p) that are received on wlan1 with type OCB.
On the router there is


I have searched the openc2x embedded code for the way they are receiving packets / data but I am not sure if this is just simulated data or real data received.
I cannot find any code how the packets are received. Parsing is no problem.
But I am not sure about the proper way how to hook up to an interface to read the stream.
Please remember: interface is not on monitor mode.

BR Frood