Home
last modified time | relevance | path

Searched refs:nlh (Results 1 – 10 of 10) sorted by relevance

/system/netd/server/
DNetlinkCommands.cpp130 for (nlmsghdr *nlh = reinterpret_cast<nlmsghdr *>(buf); in processNetlinkDump() local
131 NLMSG_OK(nlh, len); in processNetlinkDump()
132 nlh = NLMSG_NEXT(nlh, len)) { in processNetlinkDump()
133 switch (nlh->nlmsg_type) { in processNetlinkDump()
137 nlmsgerr *err = reinterpret_cast<nlmsgerr *>(NLMSG_DATA(nlh)); in processNetlinkDump()
141 callback(nlh); in processNetlinkDump()
162 NetlinkDumpCallback callback = [writeSock, deleteAction, shouldDelete, what] (nlmsghdr *nlh) { in rtNetlinkFlush() argument
163 if (!shouldDelete(nlh)) return; in rtNetlinkFlush()
165 nlh->nlmsg_type = deleteAction; in rtNetlinkFlush()
166 nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in rtNetlinkFlush()
[all …]
DSockDiag.cpp98 nlmsghdr nlh; in sendDumpRequest() member
101 .nlh = { in sendDumpRequest()
119 request.nlh.nlmsg_len = len; in sendDumpRequest()
207 NetlinkDumpCallback callback = [this, proto, shouldDestroy] (nlmsghdr *nlh) { in readDiagMsg() argument
208 const inet_diag_msg *msg = reinterpret_cast<inet_diag_msg *>(NLMSG_DATA(nlh)); in readDiagMsg()
218 NetlinkDumpCallback callback = [tcpInfoReader] (nlmsghdr *nlh) { in readDiagMsgWithTcpInfo() argument
219 if (nlh->nlmsg_type != SOCK_DIAG_BY_FAMILY) { in readDiagMsgWithTcpInfo()
220 ALOGE("expected nlmsg_type=SOCK_DIAG_BY_FAMILY, got nlmsg_type=%d", nlh->nlmsg_type); in readDiagMsgWithTcpInfo()
226 inet_diag_msg *msg = reinterpret_cast<inet_diag_msg *>(NLMSG_DATA(nlh)); in readDiagMsgWithTcpInfo()
227 uint32_t attr_len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*msg)); in readDiagMsgWithTcpInfo()
[all …]
DRouteControllerTest.cpp54 NetlinkDumpCallback callback = [&expectedPriorities] (const nlmsghdr *nlh) { in TEST_F() argument
55 expectedPriorities.erase(getRulePriority(nlh)); in TEST_F()
DNetlinkCommands.h79 uint32_t getRtmU32Attribute(const nlmsghdr *nlh, int attribute);
DRouteController.cpp906 uint32_t getRulePriority(const nlmsghdr *nlh) { in getRulePriority() argument
907 return getRtmU32Attribute(nlh, FRA_PRIORITY); in getRulePriority()
910 uint32_t getRouteTable(const nlmsghdr *nlh) { in getRouteTable() argument
911 return getRtmU32Attribute(nlh, RTA_TABLE); in getRouteTable()
915 NetlinkDumpFilter shouldDelete = [] (nlmsghdr *nlh) { in flushRules() argument
917 return getRulePriority(nlh) != 0; in flushRules()
923 NetlinkDumpFilter shouldDelete = [table] (nlmsghdr *nlh) { in flushRoutes() argument
924 return getRouteTable(nlh) == table; in flushRoutes()
DSockDiag.h59 nlmsghdr nlh; member
DRouteController.h147 uint32_t getRulePriority(const nlmsghdr *nlh);
/system/core/logd/
Dlibaudit.c48 if (rep.nlh.nlmsg_type == NLMSG_ERROR) { in get_ack()
85 req.nlh.nlmsg_type = type; in audit_send()
86 req.nlh.nlmsg_len = NLMSG_SPACE(size); in audit_send()
87 req.nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in audit_send()
104 memcpy(NLMSG_DATA(&req.nlh), data, size); in audit_send()
119 req.nlh.nlmsg_seq = ++sequence; in audit_send()
123 rc = TEMP_FAILURE_RETRY(sendto(fd, &req, req.nlh.nlmsg_len, 0, in audit_send()
130 } else if ((uint32_t)rc != req.nlh.nlmsg_len) { in audit_send()
244 if (!NLMSG_OK(&rep->nlh, (size_t)len)) { in audit_get_reply()
Dlibaudit.h45 struct nlmsghdr nlh; member
DLogAudit.cpp89 rep.nlh.nlmsg_type = 0; in onDataAvailable()
90 rep.nlh.nlmsg_len = 0; in onDataAvailable()
98 logPrint("type=%d %.*s", rep.nlh.nlmsg_type, rep.nlh.nlmsg_len, rep.data); in onDataAvailable()