diff options
author | Cheryl Sabella <cheryl.sabella@gmail.com> | 2018-09-11 20:32:15 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2018-09-11 17:35:23 -0700 |
commit | d141bab2080d5dcb404beacb5c1a4e78f106bf8e (patch) | |
tree | 1339b3acd231d87aa9e15cc366243fddff969c41 /Modules/socketmodule.c | |
parent | 31912b43c903aafad09350899ed6a9dec7c43421 (diff) | |
download | cpython-git-backport-731ff68-3.6.tar.gz |
[3.6] closes bpo-25041: Document AF_PACKET socket address format. (GH-4092).backport-731ff68-3.6
(cherry picked from commit 731ff68eeef58babdf2b32dc9a73b141760c2be9)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index ff73a3fbfa..ed31667402 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1834,7 +1834,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)) { @@ -1865,7 +1865,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, if (protoNumber < 0 || protoNumber > 0xffff) { PyErr_SetString( PyExc_OverflowError, - "getsockaddrarg: protoNumber must be 0-65535."); + "getsockaddrarg: proto must be 0-65535."); PyBuffer_Release(&haddr); return 0; } @@ -2742,7 +2742,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. |