ext
ext

Reputation: 2903

structs for IP, TCP and VLAN

I've recently inherited an almost 7 year old codebase, including a library with public headers with definitions of IP-, TCP, VLAN-structs and a shitload of defines (like #define TCP_NODELAY 1).

I tried to look for headers with these structs but I couldn't find anything (this is primary on linux, but also various BSD-variants). Surely there must be headers for this already?

I think net/ethernet.h helped with all the defines.

EDIT: Found most of the structs I'm looking for:
struct tcphdr in netinet/tcp.h
struct udphdr in netinet/udp.h
struct ip in netinet/ip.h

Does anyone have any clue about a struct with the vlan-header? (ether_vlan_header?)

Upvotes: 0

Views: 1136

Answers (1)

NPE
NPE

Reputation: 500217

Try

find /usr/include -type f | xargs grep TCP_NODELAY

where TCP_NODELAY is the symbol you're looking for.

You can look for all symbols at the same time by writing them to a file (one per line), and using grep -f FILE.

Upvotes: 1

Related Questions