summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Fix numeric IPv6 address handlingSridhar Samudrala2008-08-091-1/+3
| | | | | | | | | | The following patch sets additional hints to restrict the addresses returned by getaddrinfo() to specify preferred socket type, protocol and a flag to return only v4/v6 addresses based on the configured addresses. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Improve address type error handlingKarsten Keil2008-07-311-7/+2
| | | | | | | | | This patch detects numeric address types to avoid unnecessary warnings/errors. It also cleans up error printing to not print error messages on stderr in the deamon case. Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Implement is_numeric_ipv6() as a state machineH. Peter Anvin2008-07-302-28/+48
| | | | | | | Implement is_numeric_ipv6() as a state machine, so we can avoid in-place modification. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Fix numeric IPv6 address handlingKarsten Keil2008-07-302-1/+67
| | | | | | | | | | | | | | | This patch fix a issue with numeric IPv6 addresses in the tftpd -a address[:port] option. Since IPv6 addresses use colon ':' in differnt counts itself, we cannot detect, if the last colon is a seperator, so it is needed to put the IPv6 address into square brackets, e.g. [2001:db8::1], so a optional port assignment is unambiguous. The patch also allows to specify numeric IPv6 addresses in other places enclosed in [], but in these cases it accept these also without []. Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add support for IPv6 in the server and client.Karsten Keil2008-07-232-8/+90
| | | | | | | | | Add support for IPv6 in the server and client. You can force the use of IPv4 or IPv6 only with new -4 and -6 commandline options, if IPv6 support was compiled in. Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Remove long since obsolete ID tagsH. Peter Anvin2008-07-082-18/+0
|
* Reformat the source codeH. Peter Anvin2008-07-082-193/+194
| | | | | The source code was a mix of different styles; normalize on NASM style; basically K&R style with 4 space indentation.
* Prototype cleanup; use "config.h" where appropriateH. Peter Anvin2007-01-151-13/+1
|
* Moved pick_port_bind() to the libcommon common code so both client and ↵Zack Bartel2006-11-132-0/+41
| | | | server can use it. Client can now specify a range of ephemeral ports (transaction id)
* Introduce socklen_t; detect non-local (e.g. broadcast) receive addressesH. Peter Anvin2006-10-041-1/+1
|
* Move common code to a common/ subdirectoryH. Peter Anvin2006-10-043-0/+375