2 * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 /** \file dccp.c common functions of the dccp sender/receiver */
10 * based on common.c of dccp-cs-0.01.tar.bz2,
11 * (C) 2005 Ian McDonald <imcdnzl@gmail.com>
14 #include <sys/types.h>
22 /** \cond some magic dccp constants */
24 #define IPPROTO_DCCP 33
28 * obtain a dccp socket for sending/receiving
30 * \return the file descriptor of the new socket or \p -E_DCCP_SOCKET
33 int dccp_get_socket(void)
35 int s
= socket(AF_INET
, SOCK_DCCP
, IPPROTO_DCCP
);
38 return -E_DCCP_SOCKET
;
43 * prepare a dccp socket
45 * \param fd the file descriptor of the socket
47 * \returns positive on success, negative on errors.
49 int dccp_set_socket(__a_unused
int fd
)
51 return 1; /* nothing to do at the moment */