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>
19 /** \cond some magic dccp constants */
21 #define IPPROTO_DCCP 33
25 * obtain a dccp socket for sending/receiving
27 * \return the file descriptor of the new socket or \p -E_DCCP_SOCKET
30 int dccp_get_socket(void)
32 int s = socket(AF_INET, SOCK_DCCP, IPPROTO_DCCP);
35 return -E_DCCP_SOCKET;
40 * prepare a dccp socket
42 * \param fd the file descriptor of the socket
44 * \returns positive on success, negative on errors.
46 int dccp_set_socket(__a_unused int fd)
48 return 1; /* nothing to do at the moment */