aboutsummaryrefslogtreecommitdiffhomepage
path: root/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/unix.c b/unix.c
index b029221..2c7d847 100644
--- a/unix.c
+++ b/unix.c
@@ -348,6 +348,10 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
result = setsockopt (socket, IPPROTO_TCP, TCP_NODELAY, (char *) & value, sizeof (int));
break;
+ case ENET_SOCKOPT_TTL:
+ result = setsockopt (socket, IPPROTO_IP, IP_TTL, (char *) & value, sizeof (int));
+ break;
+
default:
break;
}
@@ -366,6 +370,11 @@ enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value)
result = getsockopt (socket, SOL_SOCKET, SO_ERROR, value, & len);
break;
+ case ENET_SOCKOPT_TTL:
+ len = sizeof (int);
+ result = getsockopt (socket, IPPROTO_IP, IP_TTL, (char *) value, & len);
+ break;
+
default:
break;
}