/*
 * DCCP-TP API definitions
 *
 * Copyright (C) 2008 Tom Phelan
 *
 * This file is part of dccp-tp.
 *
 * Dccp-tp is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 2.1 of the License, or
 * (at your option) any later version.
 *
 * Dccp-tp is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with dccp-tp.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Documentation and source code for dccp-tp is available at
 * http://www.phelan-4.com/dccp-tp/.
 */

#ifndef _DCTPAPI_H_

#define SOCK_DCCP_RAW 1
#define SOCK_DCCP_NAT 2

/*
 * Function prototypes
 */
int dccpSocket(int domain, int type, char *scodetxt);
int dccpBind(int sd, dctpSockaddr *addr, int addrlen);
int dccpListen(int sd, int backlog);
int dccpAccept(int sd, dctpSockaddr *addr, int *addrlen);
int dccpGetRequestData(int sd, dctpSockaddr *addr, int addrlen, void *buf, int *blen);
int dccpSendResponseData(int sd, void *buf, int blen);
int dccpIsSocketOpen(int sd);
int dccpConnect(int sd, dctpSockaddr *addr, int addrlen, void *buf, int blen);
int dccpSend(int sd, void *buf, int blen);
int dccpRecv(int sd, void *buf, uint_t blen);
int dccpClose(int sd);
int dccpSetSockopt(int sd, int opt, void *opval, uint_t oplen);

#endif  /* _DCTPAPI_H_ */

