全部博文(45)
分类: LINUX
2014-12-03 22:38:17
ENOBUFS The output queue for a network interface was full. This generally indicates that the interface has stopped sending, but may be caused by transient conges- tion. (Normally, this does not occur in Linux. Packets are just silently dropped when a device queue overflows.) |
...... err = -ENOBUFS; if (msg_sys.msg_controllen > INT_MAX) goto out_freeiov; ctl_len = msg_sys.msg_controllen; if ((MSG_CMSG_COMPAT & flags) && ctl_len) { err = cmsghdr_from_user_compat_to_kern(&msg_sys, sock->sk, ctl, sizeof(ctl)); if (err) goto out_freeiov; ...... out_freectl: if (ctl_buf != ctl) sock_kfree_s(sock->sk, ctl_buf, ctl_len); out_freeiov: if (iov != iovstack) sock_kfree_s(sock->sk, iov, iov_size); out_put: fput_light(sock->file, fput_needed); out: return err; |
struct msghdr msg; msg.msg_name = (void *)&dest_addr; msg.msg_namelen = sizeof(dest_addr); msg.msg_iov = &iov; msg.msg_iovlen = 1; |
memset(&msg, 0 ,sizeof(msg)); |