From b185e90dcc6ac111bff908edcc6d89fd6b37dc11 Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Mon, 12 Aug 2013 17:03:32 +0900 Subject: Support parsing RDNSS ND options from netlink. The RDNSS options (RFC 6106) used to configure DNS servers via router advertisements are passed from the kernel to userspace via RTM_NEWNDUSEROPT netlink messages. Add code to NetlinkEvent to parse them. Also fix a compiler warning and a couple of style issues. Bug: 9180552 Change-Id: I6c532c8f0ceef3afdc977a431a036df398013e1a --- include/sysutils/NetlinkEvent.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/sysutils/NetlinkEvent.h') diff --git a/include/sysutils/NetlinkEvent.h b/include/sysutils/NetlinkEvent.h index f3501cf..c0a9418 100644 --- a/include/sysutils/NetlinkEvent.h +++ b/include/sysutils/NetlinkEvent.h @@ -36,6 +36,7 @@ public: const static int NlActionLinkUp; const static int NlActionAddressUpdated; const static int NlActionAddressRemoved; + const static int NlActionRdnss; NetlinkEvent(); virtual ~NetlinkEvent(); @@ -49,9 +50,10 @@ public: void dump(); protected: - bool parseIfAddrMessage(int type, struct ifaddrmsg *ifaddr, int rtasize); bool parseBinaryNetlinkMessage(char *buffer, int size); bool parseAsciiNetlinkMessage(char *buffer, int size); + bool parseIfAddrMessage(int type, struct ifaddrmsg *ifaddr, int rtasize); + bool parseNdUserOptMessage(struct nduseroptmsg *msg, int optsize); }; #endif -- cgit v1.1