diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-10-14 13:57:41 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-10-14 13:57:41 +0200 |
commit | b389f8d373c2d8f5c636d40ec020e5e2adf0f01c (patch) | |
tree | 1a9957d2c70eaac68e15ed91a136187e374ecc7c /src | |
parent | 9427977bb5efee031b5001bd943c0efd8aa39276 (diff) | |
download | connman-b389f8d373c2d8f5c636d40ec020e5e2adf0f01c.tar.gz connman-b389f8d373c2d8f5c636d40ec020e5e2adf0f01c.tar.bz2 connman-b389f8d373c2d8f5c636d40ec020e5e2adf0f01c.zip |
Add function for requesting link status
Diffstat (limited to 'src')
-rw-r--r-- | src/rtnl.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -406,6 +406,26 @@ int __connman_rtnl_send(const void *buf, size_t len) (struct sockaddr *) &addr, sizeof(addr)); } +int connman_rtnl_send_getlink(void) +{ + struct { + struct nlmsghdr hdr; + struct rtgenmsg msg; + } req; + + DBG(""); + + memset(&req, 0, sizeof(req)); + req.hdr.nlmsg_len = sizeof(req.hdr) + sizeof(req.msg); + req.hdr.nlmsg_type = RTM_GETLINK; + req.hdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP; + req.hdr.nlmsg_pid = 0; + req.hdr.nlmsg_seq = 42; + req.msg.rtgen_family = AF_INET; + + __connman_rtnl_send(&req, sizeof(req)); +} + int __connman_rtnl_init(void) { struct sockaddr_nl addr; |