mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
closes bpo-25041: Document AF_PACKET socket address format. (GH-4092)
This commit is contained in:
parent
b9bf9d025e
commit
731ff68eee
3 changed files with 38 additions and 12 deletions
|
|
@ -1901,7 +1901,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
|
|||
const char *interfaceName;
|
||||
int protoNumber;
|
||||
int hatype = 0;
|
||||
int pkttype = 0;
|
||||
int pkttype = PACKET_HOST;
|
||||
Py_buffer haddr = {NULL, NULL};
|
||||
|
||||
if (!PyTuple_Check(args)) {
|
||||
|
|
@ -1943,7 +1943,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
|
|||
if (protoNumber < 0 || protoNumber > 0xffff) {
|
||||
PyErr_Format(
|
||||
PyExc_OverflowError,
|
||||
"%s(): protoNumber must be 0-65535.", caller);
|
||||
"%s(): proto must be 0-65535.", caller);
|
||||
PyBuffer_Release(&haddr);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2979,7 +2979,7 @@ PyDoc_STRVAR(bind_doc,
|
|||
\n\
|
||||
Bind the socket to a local address. For IP sockets, the address is a\n\
|
||||
pair (host, port); the host must refer to the local host. For raw packet\n\
|
||||
sockets the address is a tuple (ifname, proto [,pkttype [,hatype]])");
|
||||
sockets the address is a tuple (ifname, proto [,pkttype [,hatype [,addr]]])");
|
||||
|
||||
|
||||
/* s.close() method.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue