diff options
| author | Lorenzo Colitti <lorenzo@google.com> | 2013-08-12 17:03:32 +0900 |
|---|---|---|
| committer | Lorenzo Colitti <lorenzo@google.com> | 2013-11-20 10:31:19 +0900 |
| commit | c7eec83f08329a2a0008ba939c07dd1dc7d9b7ff (patch) | |
| tree | d56ce7475a6ff93463709ac01bb19c4fdf5e5e40 /include/sysutils | |
| parent | 526b838c9d647e8767fac957c53133153c3cf909 (diff) | |
| download | system_core-c7eec83f08329a2a0008ba939c07dd1dc7d9b7ff.zip system_core-c7eec83f08329a2a0008ba939c07dd1dc7d9b7ff.tar.gz system_core-c7eec83f08329a2a0008ba939c07dd1dc7d9b7ff.tar.bz2 | |
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.
[Cherry-pick of b185e90dcc6ac111bff908edcc6d89fd6b37dc11]
Bug: 9180552
Change-Id: I6c532c8f0ceef3afdc977a431a036df398013e1a
Diffstat (limited to 'include/sysutils')
| -rw-r--r-- | include/sysutils/NetlinkEvent.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
