Lines Matching refs:sock
286 struct nl_sock *sock = NULL;
288 sock = nl_socket_alloc();
289 if (sock == NULL) {
294 if (nl_connect(sock, NETLINK_GENERIC) != 0) {
296 nl_socket_free(sock);
300 return sock;
303 static void CloseNetlinkSocket(struct nl_sock *sock)
305 if (sock != NULL) {
306 nl_socket_free(sock);
462 HILOG_ERROR(LOG_CORE, "%s: sock is null", __FUNCTION__);
623 static int32_t NlsockAddMembership(struct nl_sock *sock, const char *group)
634 ret = nl_socket_add_membership(sock, id);
1929 int32_t sock = socket(AF_INET, SOCK_DGRAM, 0);
1930 if (sock < 0) {
1936 ret = ioctl(sock, SIOCDEVPRIVATE + 1, &ifr);
1945 close(sock);
3385 HILOG_ERROR(LOG_CORE, "%s: register ctrl sock failed", __FUNCTION__);