getaddrinfo and getnameinfo for IPv6
Margaret Frances <[email protected]> Mon, 16 Aug 2010 09:27:05 -0400
| Newsgroups | gmane.comp.python.mod_python |
|---|---|
| Message-ID | <A3F63C4681BE75419CC0A799308910D40DE73159C9@MAILBOX.exchange.upenn.edu> |
--===============0798343783==
Content-Language: en-US
Content-Type: multipart/alternative;
boundary="_000_A3F63C4681BE75419CC0A799308910D40DE73159C9MAILBOXexchan_"
--_000_A3F63C4681BE75419CC0A799308910D40DE73159C9MAILBOXexchan_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hello,
I am running Python's socket.getaddrinfo through mod_python in order to obt=
ain IPv6 addresses from various IPv6 capable devices. Using this setup, I c=
onsistently get the error: (8, 'node name or service name not known'). Co=
nversely, using getnameinfo to obtain a domain name from an IPv6 address co=
nsistently returns the IPv6 address rather than the name. These problems d=
on't existing with name resolution for IPv4 addresses.
I have traced this problem to mod-python: running getaddrinfo in a python i=
nterpreter or though cgi works fine and returns the expected IPv6 addresses=
. I'm able to get around these issues by spawning a child python process, b=
ut that's messy.
Does mod_python needs to be especially built with IPv6 support? If so, how =
do I do this; I have not seen anything in the documentation.
Python
Thank you.
--_000_A3F63C4681BE75419CC0A799308910D40DE73159C9MAILBOXexchan_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DWordSection1>
<p class=3DMsoNormal>Hello,<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>I am running Python's socket.getaddrinfo through mod_p=
ython in
order to obtain IPv6 addresses from various IPv6 capable devices. Using thi=
s
setup, I consistently get the error: (8, 'node name or service name not
known'). Conversely, using getnameinfo to obtain a domain name =
from
an IPv6 address consistently returns the IPv6 address rather than the name.=
These problems don’t existing with name resolution for IPv4 addresses=
.<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>I have traced this problem to mod-python: running
getaddrinfo in a python interpreter or though cgi works fine and returns th=
e
expected IPv6 addresses. I'm able to get around these issues by spawning a
child python process, but that's messy.<br>
<br>
Does mod_python needs to be especially built with IPv6 support? If so, how =
do I
do this; I have not seen anything in the documentation.<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>Python <o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>Thank you.<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
</div>
</body>
</html>
--_000_A3F63C4681BE75419CC0A799308910D40DE73159C9MAILBOXexchan_--
--===============0798343783==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Mod_python mailing list
[email protected]
http://mailman.modpython.org/mailman/listinfo/mod_python
--===============0798343783==--