X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=dccp.c;h=23d443c6e91fd6e827a3412f16c8d545463ee492;hp=147e46307676b60025561e4f81167a3a72b22b90;hb=5b30367a7e47fe5b9014599586e819305d76c9b0;hpb=a651debd8179d2a43d711b6f7f429a28bd2893c1 diff --git a/dccp.c b/dccp.c index 147e4630..23d443c6 100644 --- a/dccp.c +++ b/dccp.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006 Andre Noll + * Copyright (C) 2006-2007 Andre Noll * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,13 +26,11 @@ #include "para.h" #include "error.h" #include "dccp.h" +#include "fd.h" /** \cond some magic dccp constants */ -#define SOL_DCCP 269 #define SOCK_DCCP 6 #define IPPROTO_DCCP 33 -#define DCCP_SOCKOPT_PACKET_SIZE 1 -#define DCCP_SOCKOPT_SERVICE 2 /** \endcond */ /** @@ -57,18 +55,7 @@ int dccp_get_socket(void) * * \returns positive on success, negative on errors. */ -int dccp_set_socket(int fd) +int dccp_set_socket(__a_unused int fd) { - int pkt_size = 256, ret; - - /* hack to get a service code */ - ret = setsockopt(fd, SOL_DCCP, DCCP_SOCKOPT_PACKET_SIZE, - (char*)&pkt_size, sizeof(pkt_size)); - if (ret < 0) - return -E_DCCP_PACKET_SIZE; - ret = setsockopt(fd, SOL_DCCP, DCCP_SOCKOPT_SERVICE, - (char*)&pkt_size, sizeof(pkt_size)); - if (ret < 0) - return -E_DCCP_SERVICE; - return 1; + return 1; /* nothing to do at the moment */ }