Bash-Linux.com : Le SHELL pour les nuls

  Actuellement 50 lignes de commande et 1472 man disponibles
login as: root
root@213.186.33.18's password:
Last login: Wed May 30 7:39:31 2012 from 38.107.179.230
[root@bash-linux ~] # echo "Bienvenue sur Bash-Linux.com"_
 Manuel des commandes UNIX (man) Version anglaise

Indiquez la fonction :

Man Rtnetlink en anglais

RTNETLINK(3) Linux Programmer's Manual RTNETLINK(3)
 
NAME


rtnetlink - macros to manipulate rtnetlink messages
 
SYNOPSIS


#include #include #include #include rtnetlink_socket = socket(PF_NETLINK, int socket_type, NETLINK_ROUTE); int RTA_OK(struct rtattr *rta, int rtabuflen); void *RTA_DATA(struct rtattr *rta); unsigned int RTA_PAYLOAD(struct rtattr *rta); struct rtattr *RTA_NEXT(struct rtattr *rta, unsigned int rtabuflen); unsigned int RTA_LENGTH(unsigned int length); unsigned int RTA_SPACE(unsigned int length);
 
DESCRIPTION


All rtnetlink(7) messages consist of a netlink(7) message header and appended attributes. The attributes should be only manipulated using the macros provided here. RTA_OK(rta, attrlen) returns true if rta points to a valid routing attribute; attrlen is the running length of the attribute buffer. When not true then you must assume there are no more attributes in the mes- sage, even if attrlen is non-zero. RTA_DATA(rta) returns a pointer to the start of this attribute's data. RTA_PAYLOAD(rta) returns the length of this attribute's data. RTA_NEXT(rta, attrlen) gets the next attribute after rta. Calling this macro will update attrlen. You should use RTA_OK to check the validity of the returned pointer. RTA_LENGTH(len) returns the length which is required for len bytes of data plus the header. RTA_SPACE(len) returns the amount of space which will be needed in a message with len bytes of data.
 
CONFORMING TO


These macros are non-standard Linux extensions.
 
BUGS


This manual page is incomplete.
 
EXAMPLE


Creating a rtnetlink message to set the MTU of a device: struct { struct nlmsghdr nh; struct ifinfomsg if; char attrbuf[512]; } req; struct rtattr *rta; unsigned int mtu = 1000; int rtnetlink_sk = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); memset(&req, 0, sizeof(req)); req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); req.nh.nlmsg_flags = NLM_F_REQUEST; req.nh.nlmsg_type = RTML_NEWLINK; req.if.ifi_family = AF_UNSPEC; req.if.ifi_index = INTERFACE_INDEX; req.if.ifi_change = 0xffffffff; /* ???*/ rta = (struct rtattr *)(((char *) &req) + NLMSG_ALIGN(n->nlmsg_len)); rta->rta_type = IFLA_MTU; rta->rta_len = sizeof(unsigned int); req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + RTA_LENGTH(sizeof(mtu)); memcpy(RTA_DATA(rta), &mtu, sizeof(mtu)); send(rtnetlink_sk, &req, req.n.nlmsg_len);
 
SEE ALSO


netlink(3), netlink(7), rtnetlink(7)
 
COLOPHON


This page is part of release 3.05 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU 1999-05-14 RTNETLINK(3)


 Dernières recherches
Man  en anglais Man rtnetlink en anglaisMan  en français Man rtnetlink en français
Man  en anglais Man rtc en anglaisMan  en français Man rtc en français
Man  en anglais Man rt_sigtimedwait en anglaisMan  en français Man rt_sigtimedwait en français
Man  en anglais Man rt_sigsuspend en anglaisMan  en français Man rt_sigsuspend en français
Man  en anglais Man rt_sigreturn en anglaisMan  en français Man rt_sigreturn en français
Man  en anglais Man rt_sigqueueinfo en anglaisMan  en français Man rt_sigqueueinfo en français
Man  en anglais Man rt_sigprocmask en anglaisMan  en français Man rt_sigprocmask en français
Man  en anglais Man rt_sigpending en anglaisMan  en français Man rt_sigpending en français
Man  en anglais Man rt_sigaction en anglaisMan  en français Man rt_sigaction en français
Man  en anglais Man rsh en anglaisMan  en français Man rsh en français
Man  en anglais Man rsautl en anglaisMan  en français Man rsautl en français
Man  en anglais Man rsa en anglaisMan  en français Man rsa en français
Man  en anglais Man rpmatch en anglaisMan  en français Man rpmatch en français
Man  en anglais Man rpcinfo en anglaisMan  en français Man rpcinfo en français
Man  en anglais Man round en anglaisMan  en français Man round en français

 Recherche

Dans ce moteur de recherche, vous pouvez taper directement votre besoin, en une phrase normale, humaine.
Exemple : vous cherchez comment remplacer un mot par un autre dans tous les fichiers d'un certain dossier. Vous pouvez écrire "Comment remplacer un mot par un autre dans tous les fichiers d'un dossier". Le moteur vous ramenera les résultats en fonction de leur pertinence.
Vous pouvez bien sûr ne chercher qu'un seul mot-clé, par exemple "find".
 Toutes les lignes de code
Par popularité
Par fonction
Recherche avancée
 Les logiciels SHELL/SSH
Putty
Astuces Bash
Faire du SHELL avec PHP!
 La doc officielle
Les man Linux en français
Les man Linux en anglais
 Proposer vos bash
Partagez vos lignes!
 Les requêtes
Déposer une requête
Voir/répondre à une requête
 Quelques sites interessants
Bons sites pour apprendre
 Rechercher