Article reproduced from: http://www.isongzi.com/2009/03/26/socket-bad-address/
I don't understand why I have bad address errors when I read the socket buffer. The send-side write return value is normal, and the receiving end read returns 0 and
UDP socket: read error bad address
When writing to the UDP server, this error occurs when the socket is called for reading. You can see the corresponding error code efault through errno. h:
Bad address (posix.1:
It happen if the
Common Linux C functions-Signal Processing-general Linux technology-Linux programming and kernel information. For more information, see the following section. Alarm)
Related functions: signal, sleep
Header file # include
Define the function
Ifndef _i386_errno_h#define _i386_errno_h#define EPERM 1/* Operation not permitted * *#define ENOENT 2/* No such file or directory */#define ESRCH 3/* No such process * *#define EINTR 4/* Interrupted system call * *#define EIO 5 */I/O error *
Linux using IIC Bus Read and write I2C from device registers by Handavei @ Jilin Normal University handawei@jusontech.com reproduced please be sure to indicate the source ******************* *******
2012.7.16 1, this paper gives the implementation
The errno definition in Linux. In the header file # include
124 emediumtype wrong medium type
123 enomedium no medium found
122 edquot Disk Quota exceeded
121 eremoteio remote I/O Error
120 eisnam is a named type file
119 enavail no XENIX
124 emediumtype wrong medium type
123 enomedium no medium found
122 edquot Disk Quota exceeded
121 eremoteio remote I/O Error
120 eisnam is a named type file
119 enavail no XENIX semaphores available
118 enotnam not a xenix named type file
117
When there is an exception to the C API function in Linux, generally will errno variable (need include errno.h) to assign an integer value, different values to represent different meanings, you can see the value of the reason for the error, in the
Transferred from: http://baike.baidu.com/link?url=uX-q7K-TTL-5AFNT-hjhAP6fvgAwvsNkIMqJqJ3GEspYgtQXsovEEzpqmQ3ZmAgql2uG3LluUetAp8uKTm3z5qErrno is the last error code for the recording system. The code is a value of type int, defined in
A problem has recently been encountered when opening a file with Filp_open, and when opening a file that does not exist, the Filp_open return value is 0xFFFFFFFE instead of 0 (NULL), because the kernel handles the function that returns the pointer
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.