summaryrefslogtreecommitdiff
path: root/gpsdclient.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-01-12 19:22:47 +0000
committerEric S. Raymond <esr@thyrsus.com>2010-01-12 19:22:47 +0000
commitda43ae4070286f4e8ab60e048893defe5cd48589 (patch)
treeafb785cb9deedceebef934e1ef86124d98a3b43b /gpsdclient.c
parent4d8ecc5b743a2d436daf9bb60232e09d5d02ab5c (diff)
downloadgpsd-da43ae4070286f4e8ab60e048893defe5cd48589.tar.gz
Internal IPv6 support, derived from a support patch by Olivier Mehani.
The patch original is at: https://lists.berlios.de/pipermail/gpsd-dev/attachments/20100111/85ad4e15/attachment.bin This revision changes netlib_connectsock() to take a first argument that is an address family and can specify IPv4, IPv6, or either. It also changes gpsd.c to open two client sockets, one IPv4 and one IPv6, and listen on both. As a required cleanup, a number of defaults to "127.0.0.1" become defaults to "localhost" so we're not hardwiring in IPv4 assumptions anymore. I've omitted a significant portion of the Mehani patch that changed the interface of the client library in an incompatible way. Currently there is no way to make gpsd listen to IPv4 or IPv6 only, and no way to make a client query over IPV4 or IPv6 only. Also, we'd really like to be able to condition out IPv6 or (someday) IPv4 support for a leaner runtime, and there's no way to do that yet, either. Under IPv4, regression tests pass; live operation with a GPS mouse and the aishub feed both work. However, the resulting code does not splint clean; this will need to be fixed, and that's going to be tricky due to the new sockaddr_t struct.
Diffstat (limited to 'gpsdclient.c')
-rw-r--r--gpsdclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsdclient.c b/gpsdclient.c
index 26d88477..1befefd1 100644
--- a/gpsdclient.c
+++ b/gpsdclient.c
@@ -133,7 +133,7 @@ enum unit gpsd_units(void)
void gpsd_source_spec(const char *arg, struct fixsource_t *source)
/* standard parsing of a GPS data source spec */
{
- source->server = "127.0.0.1";
+ source->server = "localhost";
source->port = DEFAULT_GPSD_PORT;
source->device = NULL;