diff options
author | Benjamin Peterson <benjamin@python.org> | 2018-09-12 05:36:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 05:36:09 (GMT) |
commit | a00de685c11cf8bdca1f8efa7aab80552d80ddfb (patch) | |
tree | a071deb35e426b7ddb35f13b9876083118de5644 /Modules | |
parent | 6539b9136f4ffe73a8942a835d84fc218fb97967 (diff) | |
download | cpython-a00de685c11cf8bdca1f8efa7aab80552d80ddfb.zip cpython-a00de685c11cf8bdca1f8efa7aab80552d80ddfb.tar.gz cpython-a00de685c11cf8bdca1f8efa7aab80552d80ddfb.tar.bz2 |
[3.6] closes bpo-25041: Document AF_PACKET socket address format. (GH-9209)
(cherry picked from commit 731ff68eeef58babdf2b32dc9a73b141760c2be9)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Diffstat (limited to 'Modules')
-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 ff73a3f..ed31667 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. |