/*
 * Definitions for DCCP-TP raw API
 *
 * 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 _DCTPRAWAPI_H_
#define _DCTPRAWAPI_H_

/*
 * Function prototypes
 */
dctpSocket *dctpaSocket(int encap, uint32_t scode, int *cerrno);
int dctpaListen(dctpSocket *sock, unsigned int backlog, int *cerrno);
dctpSocket *dctpaGetRequestData(dctpSocket *sock, dctpSockaddr *addr, dctpPacket **data,
			       int *cerrno);
int dctpaSendResponseData(dctpSocket *sock, dctpPacket *data, int *cerrno);
int dctpaIsSocketOpen(dctpSocket *sock, int *cerrno);
dctpSocket *dctpaAccept(dctpSocket *sock, dctpSockaddr *addr, int alen, int *cerrno);
int dctpaConnect(dctpSocket *sock, dctpSockaddr *addr, dctpPacket *data, int *cerrno);
int dctpaSend(dctpSocket *sock, dctpPacket *data, int *cerrno);
int dctpaRecv(dctpSocket *sock, dctpPacket **data, int *cerrno);
int dctpaClose(dctpSocket *sock, int *cerrno);
int dctpaBind(dctpSocket *sock, dctpSockaddr *addr, int *cerrno);
void dctpaNatV4Rcv(dctpPacket *pkt);
int dctpaSetSockopt(dctpSocket *sock, int opt, int mandatory,
		    void *opval, uint_t oplen, int *cerrno);

#endif  /* _DCTPRAWAPI_H_ */

