# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2024-03-01 17:06+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "rtnetlink" msgstr "" #. type: TH #: archlinux fedora-40 fedora-rawhide mageia-cauldron #, no-wrap msgid "2023-10-31" msgstr "" #. type: TH #: archlinux fedora-40 fedora-rawhide mageia-cauldron #, no-wrap msgid "Linux man-pages 6.06" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "rtnetlink - macros to manipulate rtnetlink messages" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Standard C library (I, I<-lc>)" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "B<#include Easm/types.hE>\n" "B<#include Elinux/netlink.hE>\n" "B<#include Elinux/rtnetlink.hE>\n" "B<#include Esys/socket.hE>\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BIB<, NETLINK_ROUTE);>\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BIB<, int >IB<);>\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "BIB<);>\n" "BIB<);>\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BIB<, unsigned int >IB<);>\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "BIB<);>\n" "BIB<);>\n" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "All B(7) messages consist of a B(7) message header and " "appended attributes. The attributes should be manipulated only using the " "macros provided here." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "BIB<, >IB<)> returns true if I points to a valid " "routing attribute; I is the running length of the attribute " "buffer. When not true then you must assume there are no more attributes in " "the message, even if I is nonzero." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "BIB<)> returns a pointer to the start of this attribute's " "data." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "BIB<)> returns the length of this attribute's data." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "BIB<, >IB<)> gets the next attribute after I. " "Calling this macro will update I. You should use B to " "check the validity of the returned pointer." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "BIB<)> returns the length which is required for I " "bytes of data plus the header." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "BIB<)> returns the amount of space which will be needed in " "a message with I bytes of data." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "Linux." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BUGS" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "This manual page is incomplete." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "" #. FIXME . ? would be better to use libnetlink in the EXAMPLE code here #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Creating a rtnetlink message to set the MTU of a device:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "#include Elinux/rtnetlink.hE\n" "\\&\n" "\\&...\n" "\\&\n" "struct {\n" " struct nlmsghdr nh;\n" " struct ifinfomsg if;\n" " char attrbuf[512];\n" "} req;\n" "\\&\n" "struct rtattr *rta;\n" "unsigned int mtu = 1000;\n" "\\&\n" "int rtnetlink_sk = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);\n" "\\&\n" "memset(&req, 0, sizeof(req));\n" "req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.if));\n" "req.nh.nlmsg_flags = NLM_F_REQUEST;\n" "req.nh.nlmsg_type = RTM_NEWLINK;\n" "req.if.ifi_family = AF_UNSPEC;\n" "req.if.ifi_index = INTERFACE_INDEX;\n" "req.if.ifi_change = 0xffffffff; /* ??? */\n" "rta = (struct rtattr *)(((char *) &req) +\n" " NLMSG_ALIGN(req.nh.nlmsg_len));\n" "rta-Erta_type = IFLA_MTU;\n" "rta-Erta_len = RTA_LENGTH(sizeof(mtu));\n" "req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) +\n" " RTA_LENGTH(sizeof(mtu));\n" "memcpy(RTA_DATA(rta), &mtu, sizeof(mtu));\n" "send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0);\n" msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "B(3), B(7), B(7)" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "2022-10-30" msgstr "" #. type: TH #: debian-bookworm #, no-wrap msgid "Linux man-pages 6.03" msgstr "" #. type: Plain text #: debian-bookworm msgid "These macros are nonstandard Linux extensions." msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "#include Elinux/rtnetlink.hE\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "\\&...\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "struct {\n" " struct nlmsghdr nh;\n" " struct ifinfomsg if;\n" " char attrbuf[512];\n" "} req;\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "struct rtattr *rta;\n" "unsigned int mtu = 1000;\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "int rtnetlink_sk = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);\n" msgstr "" #. type: Plain text #: debian-bookworm opensuse-leap-15-6 #, no-wrap msgid "" "memset(&req, 0, sizeof(req));\n" "req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.if));\n" "req.nh.nlmsg_flags = NLM_F_REQUEST;\n" "req.nh.nlmsg_type = RTM_NEWLINK;\n" "req.if.ifi_family = AF_UNSPEC;\n" "req.if.ifi_index = INTERFACE_INDEX;\n" "req.if.ifi_change = 0xffffffff; /* ??? */\n" "rta = (struct rtattr *)(((char *) &req) +\n" " NLMSG_ALIGN(req.nh.nlmsg_len));\n" "rta-Erta_type = IFLA_MTU;\n" "rta-Erta_len = RTA_LENGTH(sizeof(mtu));\n" "req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) +\n" " RTA_LENGTH(sizeof(mtu));\n" "memcpy(RTA_DATA(rta), &mtu, sizeof(mtu));\n" "send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0);\n" msgstr "" #. type: TH #: debian-unstable opensuse-tumbleweed #, no-wrap msgid "2023-07-15" msgstr "" #. type: TH #: debian-unstable opensuse-tumbleweed #, no-wrap msgid "Linux man-pages 6.05.01" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "2023-03-30" msgstr "" #. type: TH #: opensuse-leap-15-6 #, no-wrap msgid "Linux man-pages 6.04" msgstr ""