diff options
Diffstat (limited to 'pfinet/linux-src/net/ipv4/devinet.c')
-rw-r--r-- | pfinet/linux-src/net/ipv4/devinet.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pfinet/linux-src/net/ipv4/devinet.c b/pfinet/linux-src/net/ipv4/devinet.c index ccae0c58..d980631b 100644 --- a/pfinet/linux-src/net/ipv4/devinet.c +++ b/pfinet/linux-src/net/ipv4/devinet.c @@ -435,6 +435,22 @@ configure_device (struct device *dev, return - inet_set_ifa (dev, ifa); } +void +inquire_device (struct device *dev, + uint32_t *addr, uint32_t *netmask) +{ + struct in_device *in_dev = dev->ip_ptr; + struct in_ifaddr *ifa = in_dev ? in_dev->ifa_list : 0; + + if (ifa) + { + *addr = ifa->ifa_local; + *netmask = ifa->ifa_mask; + } + else + *addr = *netmask = INADDR_NONE; +} + #else int devinet_ioctl(unsigned int cmd, void *arg) |