netlink.h (930345ea630405aa6e6f42efcb149c3f360a6b67) netlink.h (67b61f6c130a05b2cd4c3dfded49a751ff42c534)
1#ifndef __NET_NETLINK_H
2#define __NET_NETLINK_H
3
4#include <linux/types.h>
5#include <linux/netlink.h>
6#include <linux/jiffies.h>
7#include <linux/in6.h>
8

--- 1114 unchanged lines hidden (view full) ---

1123static inline unsigned long nla_get_msecs(const struct nlattr *nla)
1124{
1125 u64 msecs = nla_get_u64(nla);
1126
1127 return msecs_to_jiffies((unsigned long) msecs);
1128}
1129
1130/**
1#ifndef __NET_NETLINK_H
2#define __NET_NETLINK_H
3
4#include <linux/types.h>
5#include <linux/netlink.h>
6#include <linux/jiffies.h>
7#include <linux/in6.h>
8

--- 1114 unchanged lines hidden (view full) ---

1123static inline unsigned long nla_get_msecs(const struct nlattr *nla)
1124{
1125 u64 msecs = nla_get_u64(nla);
1126
1127 return msecs_to_jiffies((unsigned long) msecs);
1128}
1129
1130/**
1131 * nla_get_in_addr - return payload of IPv4 address attribute
1132 * @nla: IPv4 address netlink attribute
1133 */
1134static inline __be32 nla_get_in_addr(const struct nlattr *nla)
1135{
1136 return *(__be32 *) nla_data(nla);
1137}
1138
1139/**
1140 * nla_get_in6_addr - return payload of IPv6 address attribute
1141 * @nla: IPv6 address netlink attribute
1142 */
1143static inline struct in6_addr nla_get_in6_addr(const struct nlattr *nla)
1144{
1145 struct in6_addr tmp;
1146
1147 nla_memcpy(&tmp, nla, sizeof(tmp));
1148 return tmp;
1149}
1150
1151/**
1131 * nla_nest_start - Start a new level of nested attributes
1132 * @skb: socket buffer to add attributes to
1133 * @attrtype: attribute type of container
1134 *
1135 * Returns the container attribute
1136 */
1137static inline struct nlattr *nla_nest_start(struct sk_buff *skb, int attrtype)
1138{

--- 87 unchanged lines hidden ---
1152 * nla_nest_start - Start a new level of nested attributes
1153 * @skb: socket buffer to add attributes to
1154 * @attrtype: attribute type of container
1155 *
1156 * Returns the container attribute
1157 */
1158static inline struct nlattr *nla_nest_start(struct sk_buff *skb, int attrtype)
1159{

--- 87 unchanged lines hidden ---