net: Add utility function returning IPv4 broadcast address
Change-Id: Ibe4f5ad530f6a0f50137ef2cd8e64dbc9de6cba1 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
9d0de92f59
commit
af685962b6
3 changed files with 28 additions and 0 deletions
|
@ -216,6 +216,17 @@ struct in6_addr *net_if_ipv6_unspecified_addr(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
const struct in_addr *net_if_ipv4_broadcast_addr(void)
|
||||
{
|
||||
#if defined(CONFIG_NET_IPV4)
|
||||
static const struct in_addr addr = { { { 255, 255, 255, 255 } } };
|
||||
|
||||
return &addr;
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
struct in6_addr *net_if_ipv6_get_ll(struct net_if *iface,
|
||||
enum net_addr_state addr_state)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue