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