Sponsored Content
Top Forums UNIX for Advanced & Expert Users Bridge interface: Netlink socket notification Post 302476388 by learn more on Wednesday 1st of December 2010 03:12:41 PM
Old 12-01-2010
I agree on the operation state for bridge interface since it is going to be always up(atleast in my env). But my main concern is the change in address. If you know of a way to get the netlink notification for change in address happens in a bridge interface then it would help me lot.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

connect problem for sctp socket (ipv6 socket) - Runtime fail Invalid Arguments

Hi, I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime. To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies

2. Programming

socket function to read a webpage (socket.h)

Why does this socket function only read the first 1440 chars of the stream. Why not the whole stream ? I checked it with gdm and valgrind and everything seems correct... #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #include... (3 Replies)
Discussion started by: cyler
3 Replies

3. UNIX for Advanced & Expert Users

netlink: NLM_F_REPLACE not working on address???

Am I missing something, or does RFC 3549 suggest that the NLM_F_REPLACE flag should apply to any netlink message header? In other words, routes/links/ipv6-lifetimes should not be the only things that can be affected by the flag. The reason I ask is that it seems impossible (from looking at the... (0 Replies)
Discussion started by: jjinno
0 Replies

4. Solaris

Command line Interface or GUI Interface not shown on solaris

Dear all, I am a newbie in solaris and I need your advice. I have a Solaris version 5.9 installed on Sunfire V240. I am able to ssh the machine from putty remotely. My problem is that I cannot see the display from KVM switch I have connected to it. I need also to be able to see the GUI... (2 Replies)
Discussion started by: mbouster
2 Replies

5. SCO

Change SCO - GUI or Desktop interface to DOS based interface

Hi all I have installed a demo version of SCO OpenServer 5.0.2, I finally found it is Desktop Interface, I would like to know how to change its interface to dos based interface? If you have any ideas, please tell me then. Thank you (2 Replies)
Discussion started by: TinhNhi
2 Replies

6. IP Networking

Need a bridge from an ethernet interface to a serial interface

This is my situation DOS pc serial cable (sl0) Linux Pc eth1 192.168.0.10 <-------------------->192.168.0.2 <------------>192.168.0.1 (router) I connected the linux pc and the dos pc with a SLIP (serial line internet protocol), so they can communicate in the sl0 interface. ... (3 Replies)
Discussion started by: mghis
3 Replies

7. IP Networking

Clarification - Setting socket options at the same time when socket is listening

I need clarification on whether it is okay to set socket options on a listening socket simultaneously when it is being used in an accept() call? Following is the scenario:- -- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies

8. IP Networking

Socket and interface (eth0, eth 1)relationship

hi, Could some one answer this please we have a program with client socket declared which connect to a server for the above program description we wont send an interface information ... let us suppose, I have two interfaces (eth0 , eth1) which are assigned some ip, which interface the... (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies

9. UNIX for Dummies Questions & Answers

Adding a network interface to a bonded interface

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
NETLINK(7)						     Linux Programmer's Manual							NETLINK(7)

NAME
netlink, PF_NETLINK - Communication between kernel and user. SYNOPSIS
#include <asm/types.h> #include <sys/socket.h> #include <linux/netlink.h> netlink_socket = socket(PF_NETLINK, socket_type, netlink_family); DESCRIPTION
Netlink is used to transfer information between kernel modules and user space processes. It consists of a standard sockets based interface for user processes and an internal kernel API for kernel modules. The internal kernel interface is not documented in this man page. Also there is an obsolete netlink interface via netlink character devices, this interface is not documented here and is only provided for back- wards compatibility. Netlink is a datagram oriented service. Both SOCK_RAW and SOCK_DGRAM are valid values for socket_type; however the netlink protocol does not distinguish between datagram and raw sockets. netlink_family selects the kernel module or netlink group to communicate with. The currently assigned netlink families are: NETLINK_ROUTE Receives routing updates and may be used to modify the IPv4 routing table (see rtnetlink(7)). NETLINK_FIREWALL Receives packets sent by the IPv4 firewall code. NETLINK_ARPD For managing the arp table in user space. NETLINK_ROUTE6 Receives and sends IPv6 routing table updates. NETLINK_IP6_FW to receive packets that failed the IPv6 firewall checks (currently not implemented). NETLINK_TAPBASE...NETLINK_TAPBASE+15 are the instances of the ethertap device. Ethertap is a pseudo network tunnel device that allows an ethernet driver to be simulated from user space. NETLINK_SKIP Reserved for ENskip. NETLINK_USERSOCK is reserved for future user space protocols. Netlink messages consist of a byte stream with one or multiple nlmsghdr headers and associated payload. For multipart messages the first and all following headers have the NLM_F_MULTI flag set, except for the last header which has the type NLMSG_DONE. The byte stream should only be accessed with the standard NLMSG_* macros, see netlink(3). Netlink is not a reliable protocol. It tries its best to deliver a message to its destination(s), but may drop messages when an out of memory condition or other error occurs. For reliable transfer the sender can request an acknowledgement from the receiver by setting the NLM_F_ACK flag. An acknowledgment is an NLMSG_ERROR packet with the error field set to 0. The application must generate acks for received messages itself. The kernel tries to send an NLMSG_ERROR message for every failed packet. A user process should follow this convention too. Each netlink family has a set of 32 multicast groups. When bind(2) is called on the socket, the nl_groups field in the sockaddr_nl should be set to a bitmask of the groups which it wishes to listen to. The default value for this field is zero which means that no multicasts will be received. A socket may multicast messages to any of the multicast groups by setting nl_groups to a bitmask of the groups it wishes to send to when it calls sendmsg(2) or does a connect(2). Only users with an effective uid of 0 or the CAP_NET_ADMIN capability may send or listen to a netlink multicast group. Any replies to a message received for a multicast group should be sent back to the sending pid and the multicast group. struct nlmsghdr { __u32 nlmsg_len; /* Length of message including header */ __u16 nlmsg_type; /* Message content */ __u16 nlmsg_flags;/* Additional flags */ __u32 nlmsg_seq; /* Sequence number */ __u32 nlmsg_pid; /* PID of the process that opened the socket */ }; struct nlmsgerr { int error; /* negative errno or 0 for acks. */ struct nlmsghdr msg; /* message header that caused the error */ }; After each nlmsghdr the payload follows. nlmsg_type can be one of the standard message types: NLMSG_NOOP message is to be ignored, NLMSG_ERROR the message signals an error and the payload contains a nlmsgerr structure, NLMSG_DONE message terminates a multipart message, A netlink family usually specifies more message types, see the appropriate man pages for that, e.g. rtnetlink(7) for NETLINK_ROUTE. Standard Flag bits in nlmsg_flags NLM_F_REQUEST set on all request messages NLM_F_MULTI the message is part of a multipart message termi- nated by NLMSG_DONE NLM_F_ACK reply with an acknowledgment on success NLM_F_ECHO echo this request Additional flag bits for GET requests NLM_F_ROOT Return the complete table instead of a single entry. NLM_F_MATCH Not implemented yet. NLM_F_ATOMIC Return an atomic snapshot of the table. NLM_F_DUMP not documented yet. Additional flag bits for NEW requests NLM_F_REPLACE Override existing object. NLM_F_EXCL Don't replace if the object already exists. NLM_F_CREATE Create object if it doesn't already exist. NLM_F_APPEND Add to the end of the object list. Note that NLM_F_ATOMIC requires CAP_NET_ADMIN or super user rights. ADDRESS FORMATS
The sockaddr_nl structure describes a netlink client in user space or in the kernel. A sockaddr_nl can be either unicast (only send to one peer) or send to netlink groups (nl_groups not equal 0). struct sockaddr_nl { sa_family_t nl_family; /* AF_NETLINK */ unsigned short nl_pad; /* zero */ pid_t nl_pid; /* process pid */ __u32 nl_groups; /* multicast groups mask */ }; nl_pid is the pid of the process owning the destination socket, or 0 if the destination is in the kernel. nl_groups is a bitmask with every bit representing a netlink group number. BUGS
This man page is not complete. NOTES
It is often better to use netlink via libnetlink than via the low level kernel interface. VERSIONS
The socket interface to netlink is a new feature of Linux 2.2 Linux 2.0 supported a more primitive device based netlink interface (which is still available as a compatibility option). This obsolete interface is not described here. SEE ALSO
cmsg(3), rtnetlink(7), netlink(3) ftp://ftp.inr.ac.ru/ip-routing/iproute2* for libnetlink Linux Man Page 1999-04-27 NETLINK(7)
All times are GMT -4. The time now is 02:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy