[Patches] [ python-Patches-658327 ] Add inet_pton and inet_ntop to socket

noreply@sourceforge.net noreply@sourceforge.net
Thu, 26 Dec 2002 10:32:42 -0800


Patches item #658327, was opened at 2002-12-24 16:00
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=658327&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jp Calderone (kuran)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add inet_pton and inet_ntop to socket

Initial Comment:
Patch is against current CVS and adds two socket module
functions, inet_pton and inet_ntop.  Both of these
should be available on all platforms (because of other
dependancies in the code) so I don't think portability
is a problem.  inet_ntop converts a packed IP address
to a human-readable '.' or ':' separated string
representation of the IP.  inet_pton performs the
reverse operation.

(Potential) problems: inet_pton sets errno to ENOSPC,
which may lead to a confusing error message.


----------------------------------------------------------------------

>Comment By: Jp Calderone (kuran)
Date: 2002-12-26 13:32

Message:
Logged In: YES 
user_id=366566

Ooops, I made two, and uploaded the wrong one >:O  Sorry. 
Dunno if it's still helpful, but here's the unified diff.


----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2002-12-26 13:10

Message:
Logged In: YES 
user_id=33168

Next time, please use context or unified diff.  -c or -u
option to cvs diff:  cvs diff -c ...

----------------------------------------------------------------------

Comment By: Jp Calderone (kuran)
Date: 2002-12-24 16:05

Message:
Logged In: YES 
user_id=366566

Sourceforge decided not to attach the file the first time...
 Here it is.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=658327&group_id=5470