bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] On additions to libinetutils.a for IPv6


From: Mats Erik Andersson
Subject: [bug-inetutils] On additions to libinetutils.a for IPv6
Date: Thu, 29 Jul 2010 23:37:20 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello all,

I have now arrived at a functional tftp client with the
ability to use IPv4 ans IPv6, as well as withstanding
RES_OPTIONS=inet6.

However, for this particular executable and for other
upcoming migrations, I would like to add two functions
to the library 'libinetutils.a'. These two have the
prototypes

  in_port_t get_port (const struct sockaddr *);

  void set_port (struct sockaddr *, const in_port_t);

Two questions arise:

  1) Are the names 'get_port', 'set_port' acceptable?

  2) Into which file in "inetutils/libinetutils/"
     are these best written?

Both functions are simple switch statements to accomplish
distinct processing of AF_INET and AF_INET6. They could
even be written as inline code, but are best kept as
separate code in order to enhance readability.


Best regards,

Mats Erik Andersson, fil. dr



reply via email to

[Prev in Thread] Current Thread [Next in Thread]