Lines Matching refs:ip

88 static inline int vxlan_nla_get_addr(union vxlan_addr *ip,  in vxlan_nla_get_addr()  argument
92 ip->sin6.sin6_addr = nla_get_in6_addr(nla); in vxlan_nla_get_addr()
93 ip->sa.sa_family = AF_INET6; in vxlan_nla_get_addr()
96 ip->sin.sin_addr.s_addr = nla_get_in_addr(nla); in vxlan_nla_get_addr()
97 ip->sa.sa_family = AF_INET; in vxlan_nla_get_addr()
105 const union vxlan_addr *ip) in vxlan_nla_put_addr() argument
107 if (ip->sa.sa_family == AF_INET6) in vxlan_nla_put_addr()
108 return nla_put_in6_addr(skb, attr, &ip->sin6.sin6_addr); in vxlan_nla_put_addr()
110 return nla_put_in_addr(skb, attr, ip->sin.sin_addr.s_addr); in vxlan_nla_put_addr()
113 static inline bool vxlan_addr_is_multicast(const union vxlan_addr *ip) in vxlan_addr_is_multicast() argument
115 if (ip->sa.sa_family == AF_INET6) in vxlan_addr_is_multicast()
116 return ipv6_addr_is_multicast(&ip->sin6.sin6_addr); in vxlan_addr_is_multicast()
118 return ipv4_is_multicast(ip->sin.sin_addr.s_addr); in vxlan_addr_is_multicast()
129 static inline int vxlan_nla_get_addr(union vxlan_addr *ip, in vxlan_nla_get_addr() argument
135 ip->sin.sin_addr.s_addr = nla_get_in_addr(nla); in vxlan_nla_get_addr()
136 ip->sa.sa_family = AF_INET; in vxlan_nla_get_addr()
144 const union vxlan_addr *ip) in vxlan_nla_put_addr() argument
146 return nla_put_in_addr(skb, attr, ip->sin.sin_addr.s_addr); in vxlan_nla_put_addr()
149 static inline bool vxlan_addr_is_multicast(const union vxlan_addr *ip) in vxlan_addr_is_multicast() argument
151 return ipv4_is_multicast(ip->sin.sin_addr.s_addr); in vxlan_addr_is_multicast()
156 static inline size_t vxlan_addr_size(const union vxlan_addr *ip) in vxlan_addr_size() argument
158 if (ip->sa.sa_family == AF_INET6) in vxlan_addr_size()
179 const u8 *mac, union vxlan_addr *ip,
185 const unsigned char *addr, union vxlan_addr ip,
191 const u8 *mac, union vxlan_addr *ip,