Skip to contentSkip to conversation

Developing with libipq

DISCUSSION Jvalencia 2 participants 3 messages Oct 14, 2004 netfilter

lore
Share & tools
lore

Jvalencia

author
#0 lore raw

Hi all, i'm new to netfilter and just started trying some simple things. I've made a program (simple program) to take a packet and print its metadata. The output is this:

ID of queued packet: 3413885640
Netfilter mark value: 0
Packet arrival time (seconds): 0
Packet arrival time (+useconds): 0
Netfilter hook we rode in on: 3
Name of incoming interface:
Name of outcoming interface: eth0
Hardware protocol: 0
Hardware type: 0
Hardware address length: (null)
Hardware address:
Length of packet data: 0

Is this result valid? most values are 0

#1 lore raw
Quoted 11 lines · Jvalencia

Hi all, i'm new to netfilter and just started trying some simple things. I've made a program (simple program) to take a packet and print its metadata. The output is this:

ID of queued packet: 3413885640
Netfilter mark value: 0
Packet arrival time (seconds): 0
Packet arrival time (+useconds): 0
Netfilter hook we rode in on: 3

You are enqueing packets in the localout hook.

#define NF_IP_LOCAL_OUT 3

Quoted 10 lines

Name of incoming interface: Name of outcoming interface: eth0 Hardware protocol: 0
Hardware type: 0
Hardware address length: (null)
Hardware address: Length of packet data: 0

Is this result valid? most values are 0

yes, in localout hook the packets are in network layer, so they don't still know anything about the link layer information, that is, mac address and folks.

regards,
Pablo

author
#2 lore raw

Thanks, and sorry by double posting.