05-28-2008
netlink and libpcap
"libpcap" can provide you quickest implementation. "netlink" will be very much kernel centric. See tcpdump source code for generic/finer level implmentation.
10 More Discussions You Might Find Interesting
1. IP Networking
How can UNIX systems obtain IP addresses? Can it obtain from Win 2000 Server, DHCP service, dynamically? (1 Reply)
Discussion started by: Raael
1 Replies
2. UNIX for Dummies Questions & Answers
say I have a IP address which is 10.0.0.12, and subnet mask is 255.255.255.240, what is the network address and what is the broadcast address which host lives on?
And could you explain how to get the answer?
thanx in advance! (7 Replies)
Discussion started by: pnxi
7 Replies
3. IP Networking
Hello, this is my first post on the Unix forums. This is something that's been bothering me for a while, is there any particular UNIX/Linux application that will allow you to see you external IP address? :confused: ( The address beyond your router )
Thank you in advance, I could not find a... (4 Replies)
Discussion started by: inquen
4 Replies
4. Solaris
I m having interface ce0 ce1 and its sub interfaces for that.
I want to give MAC addresses for the same.
How will I assign it.
Please give solution for the same (4 Replies)
Discussion started by: sunray
4 Replies
5. Solaris
i need to configure a zone to use different interface (bge2) than global and have connected to completely different network switch & to use its own defaultrouter and hosts file .. is it possible ..if so ..how ?
Thanks (9 Replies)
Discussion started by: skamal4u
9 Replies
6. UNIX and Linux Applications
Hi,
I'm a italian student. For my thesis I develop a gateway with protocol 6lowpan.
For that I must access to network interface to develope my personal stack based on standard 802.15.4.
Can you help me? I need an explanation for that. (0 Replies)
Discussion started by: berny88
0 Replies
7. Solaris
I've one Netra 240
After changing main board and system configuration card reader, Network is not accessible any more, Network interfaces are always UP and Running even when there is no cable connected to Network interfaces.
I tried to restart and plumb/unplumb with no luck.
ifconfig -a... (7 Replies)
Discussion started by: samer.odeh
7 Replies
8. UNIX for Dummies Questions & Answers
I have a RHEL 5 system with a bonded interface configure using only one network port (eth0). So I have config file for ifcfg-bond0 and ifcfg-eth. I'd like to configure eth5 to be the second SLAVE in the bond. My question is, after I modify ifcfg-eth5, can I add eth5 to the bond0 interface without... (1 Reply)
Discussion started by: westmoreland
1 Replies
9. Solaris
How to set gateway address to a particular interface? waht are the files need to update to make it permanent? (2 Replies)
Discussion started by: Naveen.6025
2 Replies
10. UNIX for Advanced & Expert Users
Hi ,
Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies
NETLINK(3) Linux Programmer's Manual NETLINK(3)
NAME
netlink - Netlink macros
SYNOPSIS
#include <asm/types.h>
#include <linux/netlink.h>
int NLMSG_ALIGN(size_t len);
int NLMSG_LENGTH(size_t len);
int NLMSG_SPACE(size_t len);
void *NLMSG_DATA(struct nlmsghdr *nlh);
struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *nlh, int len);
int NLMSG_OK(struct nlmsghdr *nlh, int len);
int NLMSG_PAYLOAD(struct nlmsghdr *nlh, int len);
DESCRIPTION
<linux/netlink.h> defines several standard macros to access or create a netlink datagram. They are similar in spirit to the macros defined
in cmsg(3) for auxiliary data. The buffer passed to and from a netlink socket should be accessed using only these macros.
NLMSG_ALIGN()
Round the length of a netlink message up to align it properly.
NLMSG_LENGTH()
Given the payload length, len, this macro returns the aligned length to store in the nlmsg_len field of the nlmsghdr.
NLMSG_SPACE()
Return the number of bytes that a netlink message with payload of len would occupy.
NLMSG_DATA()
Return a pointer to the payload associated with the passed nlmsghdr.
NLMSG_NEXT()
Get the next nlmsghdr in a multipart message. The caller must check if the current nlmsghdr didn't have the NLMSG_DONE set--this
function doesn't return NULL on end. The len argument is an lvalue containing the remaining length of the message buffer. This
macro decrements it by the length of the message header.
NLMSG_OK()
Return true if the netlink message is not truncated and is in a form suitable for parsing.
NLMSG_PAYLOAD()
Return the length of the payload associated with the nlmsghdr.
CONFORMING TO
These macros are nonstandard Linux extensions.
NOTES
It is often better to use netlink via libnetlink than via the low-level kernel interface.
SEE ALSO
libnetlink(3), netlink(7)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU
2014-03-20 NETLINK(3)