summaryrefslogtreecommitdiff
path: root/include/linux/rtnetlink.h
AgeCommit message (Collapse)Author
2005-08-29[NETLINK]: Convert netlink users to use group numbers instead of bitmasksPatrick McHardy
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-28[NETLINK]: Missing padding fields in dumped structuresPatrick McHardy
Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-28[NETLINK]: Clear padding in netlink messagesPatrick McHardy
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-23[PKT_SCHED]: Packet classification based on textsearch (ematch)Thomas Graf
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-18[RTNETLINK]: Add RTA_(PUT|GET) shortcuts for u8, u16, and flagThomas Graf
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-18[NETLINK]: Fix RTA_NEST_CANCEL().Thomas Graf
Only skb_trim() if 'start' is non-NULL. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-18[NETLINK]: Neighbour table configuration and statistics via rtnetlinkThomas Graf
To retrieve the neighbour tables send RTM_GETNEIGHTBL with the NLM_F_DUMP flag set. Every neighbour table configuration is spread over multiple messages to avoid running into message size limits on systems with many interfaces. The first message in the sequence transports all not device specific data such as statistics, configuration, and the default parameter set. This message is followed by 0..n messages carrying device specific parameter sets. Although the ordering should be sufficient, NDTA_NAME can be used to identify sequences. The initial message can be identified by checking for NDTA_CONFIG. The device specific messages do not contain this TLV but have NDTPA_IFINDEX set to the corresponding interface index. To change neighbour table attributes, send RTM_SETNEIGHTBL with NDTA_NAME set. Changeable attribute include NDTA_THRESH[1-3], NDTA_GC_INTERVAL, and all TLVs in NDTA_PARMS unless marked otherwise. Device specific parameter sets can be changed by setting NDTPA_IFINDEX to the interface index of the corresponding device. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-06-18[NETLINK] Routing attribute related shortcutsThomas Graf
RTA_GET_U(32|64)(tlv) Assumes TLV is a u32/u64 field and returns its value. RTA_GET_[M]SECS(tlv) Assumes TLV is a u64 and transports jiffies converted to seconds or milliseconds and returns its value. RTA_PUT_U(32|64)(skb, type, value) Appends %value as fixed u32/u64 to %skb as TLV %type. RTA_PUT_[M]SECS(skb, type, jiffies) Converts %jiffies to secs/msecs and appends it as u64 to %skb as TLV %type. RTA_PUT_STRING(skb, type, string) Appends %NUL terminated %string to %skb as TLV %type. RTA_NEST(skb, type) Starts a nested TLV %type and returns the nesting handle. RTA_NEST_END(skb, nesting_handle) Finishes the nested TLV %nesting_handle, must be called symmetric to RTA_NEST(). Returns skb->len RTA_NEST_CANCEL(skb, nesting_handle) Cancel the nested TLV %nesting_handle and trim nested TLV from skb again, returns -1. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-03[RTNETLINK] Cleanup rtnetlink_link tablesThomas Graf
Converts remaining rtnetlink_link tables to use c99 designated initializers to make greping a little bit easier. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-03[RTNETLINK] Fix & cleanup rtm_min/rtm_maxThomas Graf
Converts rtm_min and rtm_max arrays to use c99 designated initializers for easier insertion of new message families. RTM_GETMULTICAST and RTM_GETANYCAST did not have the minimal message size specified which means that the netlink message was parsed for routing attributes starting from the header. Adds the proper minimal message sizes for these messages (netlink header + common rtnetlink header) to fix this issue. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-05-03[RTNETLINK] Fix RTM_MAX to represent the maximum valid message typeThomas Graf
RTM_MAX is currently set to the maximum reserverd message type plus one thus being the cause of two bugs for new types being assigned a) given the new family registers only the NEW command in its reserved block the array size for per family entries is calculated one entry short and b) given the new family registers all commands RTM_MAX would point to the first entry of the block following this one and the rtnetlink receive path would accept a message type for a nonexisting family. This patch changes RTM_MAX to point to the maximum valid message type by aligning it to the start of the next block and subtracting one. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-31Cset exclude: tgraf@suug.ch|ChangeSet|20050316221421|24742Thomas Graf
2005-03-23[PKT_SCHED]: Use proper attritbute for action stats.Jamal Hadi Salim
Action stats were being sent on the wrong TLV. Patch attached. Thanks to Andy Furniss for finding and helping debug this. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-17[IPV4]: Make multipath algs into true drivers.David S. Miller
This also makes them configurable on a per-route basis via rtnetlink route attributes. Based upon suggestions from Thomas Graf and Alexey Kuznetsov. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-15[IPV4]: All deletion of equal addresses only differing by prefix length.Thomas Graf
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-09MergeDavid S. Miller
2005-03-09[NEIGH]: Provide number of probes to userspaceThomas Graf
Provides number of probes done so far to userspace, quite useful for debugging. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-03-04[IPV6] Always add a fragment header after receiving TOO BIG w/ pmtu < 1280.Hideaki Yoshifuji
According to RFC2460, PMTU is set to the IPv6 Minimum Link MTU (1280) and a fragment header should always be included after a node receiving Too Big message reporting PMTU is less than the IPv6 Minimum Link MTU (1280). Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
2005-02-14[PKT_SCHED]: Extended Matches APIDavid S. Miller
An extended match (ematch) is a small classifiction tool not worth writing a full classifier for. Ematches can be interconnected to form a logic expression and get attached to classifiers to extend their functionatlity. The userspace part transforms the logic expressions into an array consisting of multiple sequences of interconnected ematches separated by markers. Precedence is implemented by a special ematch kind referencing a sequence beyond the marker of the current sequence causing the current position in the sequence to be pushed onto a stack to allow the current position to be overwritten by the position referenced in the special ematch. Matching continues in the new sequence until a marker is reached causing the position to be restored from the stack. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-09[PKT_SCHED]: Add rtattr_strlcpy, use it where appropriatePatrick McHardy
Add rtattr_strlcpy to handle unterminated strings. The destination is nulled out entirely to avoid possible leaks when dumping. The return value can be checked for >= size to detect truncated strings. Currently strings equal to the size of the destination are accepted everywhere even if not null-terminated. Sometimes they are silently truncated, sometimes the unterminated string is used. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-09[PKT_SCHED]: rtattr_parse shortcut for nested TLVsThomas Graf
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-09[NET]: Add rtnl_lock_interruptible()Christoph Hellwig
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-09[NET]: misc cleanupsAdrian Bunk
The patch below contains the following cleanups: - make needlessly global code static - remove the following unused global functions: - datagram.c: skb_copy_datagram - iovec.c: memcpy_tokerneliovec - remove the following unneeded EXPORT_SYMBOL's: - datagram.c: skb_copy_datagram - dev.c: ing_filter - iovec.c: memcpy_tokerneliovec - netpoll.c: netpoll_send_skb - rtnetlink.c: rtnetlink_dump_ifinfo - sock.c: sock_alloc_send_pskb Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-11-02[PKT_SCHED]: tcf_action: copy generic stats via TCA_ACT_STATSThomas Graf
Dumps the statistic common to all action modules via the newly introduced TLV type TCA_ACT_STATS in tcf_action_copy_stats but allows the corresponding module to dump its own statistic by implementing the get_stats callback. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-10-19[PKT_SCHED]: Use gnet_stats API to copy statistics into netlink messageThomas Graf
Adapts qdisc API to use new gnet_stats functions to copy statistics into netlink message. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-21[NET]: Fix ifmap alignment issues over rtnetlinkThomas Graf
Introduces a fixed size variant of ifmap for rtnetlink. Fixes issues with address size mismatch between kernel and userspace. Obviously this will fail if userspace provides an address greater than 32bit. Signed-off-by: Thomas Graf <tgraf@suug.ch> SIgned-off-by: David S. Miller <davem@davemloft.net>
2004-09-14[NET]: Convert RTM+_* to enum.Herbert Xu
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-08[NET]: Calculate RTATTR_MAX at run time.David S. Miller
This also solved a problem noticed by Thomas Graf in that RTATTR_MAX had become incorrect recently due to IFLA_MAX increasing and thus becomming the largest one. Signed-off-by: David S. Miller <davem@davemloft.net>
2004-09-01[NET]: Allow get/set of dev->weight via netlink.Eric Lemoine
Signed-off-by: David S. Miller <davem@davemloft.net>
2004-08-24[NET]: Device mtu/txqlen/ifmap via rtnetlink.Thomas Graf
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@redhat.com>
2004-07-28[NET]: Kill rtnl_exlock stubs.Stephen Hemminger
Rtnetlink has some macro's that are relics from earlier locking. They are only used a couple of places so are easy to kill. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
2004-06-28[NETLINK]: Fix NLMSG_OK/RTA_OK length checking.Christoph Hellwig
Verify at least a full header is there before derefencing length struct member.
2004-06-15[NET]: Add tc extensions infrastructure.Jamal Hadi Salim
Signed-off-by: Jamal Hadi Salim <hadi@znyx.com> Signed-off-by: David S. Miller <davem@redhat.com>
2004-05-28[NET]: Prevent future missed updates of FOO_MAX macros.Hideaki Yoshifuji
2004-05-26Cset exclude: mashirle@us.ibm.com|ChangeSet|20040526204412|10895David S. Miller
2004-05-25[RTNETLINK]: IFA_MAX is wrong.Shirley Ma
2004-05-25[IPV6]: Add new IPv6 MIBs counters support through netlink.Shirley Ma
This patch implements both per interface and global new IPv6 MIBs counters through netlink based on new IP MIBs draft, 64 bit counters are not supported here because of performance issues. It coexists old IPv6 MIBs counters (which are through proc file system) for the compatibility.
2004-04-05[IPV6]: Provide ipv6 multicast/anycast addresses through netlink.Shirley Ma
2004-01-15Cset exclude: mashirle@us.ibm.com|ChangeSet|20040115231022|51079David S. Miller
2004-01-14[IPV6]: Add MIB:ipv6RouterAdvert netlink notification.Shirley Ma
2004-01-14[IPV6]: Add notification for MIB:ipv6Prefix events.Shirley Ma
2004-01-14[IPV6]: Implement MIB:ipv6InterfaceTableShirley Ma
2003-12-02[RTNETLINK]: Add RTPROT_XORP.Pavlin Radoslavov
2003-10-16[IPV6]: MIB fix, provide timestamps in ifa_cacheinfo.Shirley Ma
2003-09-22[NET]: rtnetlink -- ASSERT_RTNL and BUG_TRAP.Stephen Hemminger
Change ASSERT_RTNL and BUG_TRAP - unlikely to occur - tag message as error - dump_stack in ASSERT_RTNL to aide finding code path - make all format's which a smart compiler can optimize
2003-09-22[NET]: rtnetlink -- RTA_PUT unlikely.Stephen Hemminger
2003-09-22[NET]: rtnetlink -- rtattr_strcmp const args.Stephen Hemminger
2003-09-12[IPV6]: Export devconf device settings via netlink.Krishna Kumar
2003-09-04[NET]: Kill more verbose init msgs and unused RTNL_DEBUG define.David S. Miller
2003-07-25[NET]: Make IFLA_STATS arch independent.Alexey Kuznetsov