Home
last modified time | relevance | path

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

/system/netd/server/
DNetlinkCommands.cpp138 for (nlmsghdr *nlh = reinterpret_cast<nlmsghdr *>(buf); in processNetlinkDump() local
139 NLMSG_OK(nlh, len); in processNetlinkDump()
140 nlh = NLMSG_NEXT(nlh, len)) { in processNetlinkDump()
141 switch (nlh->nlmsg_type) { in processNetlinkDump()
145 nlmsgerr *err = reinterpret_cast<nlmsgerr *>(NLMSG_DATA(nlh)); in processNetlinkDump()
149 callback(nlh); in processNetlinkDump()
170 NetlinkDumpCallback callback = [writeSock, deleteAction, shouldDelete, what] (nlmsghdr *nlh) { in rtNetlinkFlush() argument
171 if (!shouldDelete(nlh)) return; in rtNetlinkFlush()
173 nlh->nlmsg_type = deleteAction; in rtNetlinkFlush()
174 nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in rtNetlinkFlush()
[all …]
DSockDiag.cpp101 nlmsghdr nlh; in sendDumpRequest() member
104 .nlh = { in sendDumpRequest()
122 request.nlh.nlmsg_len = len; in sendDumpRequest()
208 NetlinkDumpCallback callback = [this, proto, shouldDestroy] (nlmsghdr *nlh) { in readDiagMsg() argument
209 const inet_diag_msg *msg = reinterpret_cast<inet_diag_msg *>(NLMSG_DATA(nlh)); in readDiagMsg()
219 NetlinkDumpCallback callback = [tcpInfoReader] (nlmsghdr *nlh) { in readDiagMsgWithTcpInfo() argument
220 if (nlh->nlmsg_type != SOCK_DIAG_BY_FAMILY) { in readDiagMsgWithTcpInfo()
221 ALOGE("expected nlmsg_type=SOCK_DIAG_BY_FAMILY, got nlmsg_type=%d", nlh->nlmsg_type); in readDiagMsgWithTcpInfo()
227 inet_diag_msg *msg = reinterpret_cast<inet_diag_msg *>(NLMSG_DATA(nlh)); in readDiagMsgWithTcpInfo()
228 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.h69 uint32_t getRtmU32Attribute(const nlmsghdr *nlh, int attribute);
DRouteController.cpp967 uint32_t getRulePriority(const nlmsghdr *nlh) { in getRulePriority() argument
968 return getRtmU32Attribute(nlh, FRA_PRIORITY); in getRulePriority()
971 uint32_t getRouteTable(const nlmsghdr *nlh) { in getRouteTable() argument
972 return getRtmU32Attribute(nlh, RTA_TABLE); in getRouteTable()
976 NetlinkDumpFilter shouldDelete = [] (nlmsghdr *nlh) { in flushRules() argument
978 return getRulePriority(nlh) != 0; in flushRules()
984 NetlinkDumpFilter shouldDelete = [table] (nlmsghdr *nlh) { in flushRoutes() argument
985 return getRouteTable(nlh) == table; in flushRoutes()
DSockDiag.h58 nlmsghdr nlh; member
DRouteController.h149 uint32_t getRulePriority(const nlmsghdr *nlh);
/system/core/logd/
Dlibaudit.cpp43 if (rep.nlh.nlmsg_type == NLMSG_ERROR) { in get_ack()
72 req.nlh.nlmsg_type = static_cast<uint16_t>(type); in audit_send()
73 req.nlh.nlmsg_len = NLMSG_SPACE(size); in audit_send()
74 req.nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in audit_send()
91 memcpy(NLMSG_DATA(&req.nlh), data, size); in audit_send()
104 req.nlh.nlmsg_seq = sequence; in audit_send()
107 sendto(fd, &req, req.nlh.nlmsg_len, 0, (struct sockaddr*)&addr, sizeof(addr))); in audit_send()
112 } else if ((uint32_t)rc != req.nlh.nlmsg_len) { in audit_send()
208 if (!NLMSG_OK(&rep->nlh, (size_t)len)) { in audit_get_reply()
Dlibaudit.h44 struct nlmsghdr nlh; member
DLogAudit.cpp88 rep.nlh.nlmsg_type = 0; in onDataAvailable()
89 rep.nlh.nlmsg_len = 0; in onDataAvailable()
97 logPrint("type=%d %.*s", rep.nlh.nlmsg_type, rep.nlh.nlmsg_len, rep.data); in onDataAvailable()