xref: /freebsd/lib/libsdp/sdp-int.h (revision 42b388439bd3795e09258c57a74ce9eec3651c7b)
15e53a4f9SPedro F. Giffuni /*-
20986ab12SMaksim Yevmenkin  * sdp-int.h
30986ab12SMaksim Yevmenkin  *
4*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
55e53a4f9SPedro F. Giffuni  *
60986ab12SMaksim Yevmenkin  * Copyright (c) 2001-2003 Maksim Yevmenkin <m_evmenkin@yahoo.com>
70986ab12SMaksim Yevmenkin  * All rights reserved.
80986ab12SMaksim Yevmenkin  *
90986ab12SMaksim Yevmenkin  * Redistribution and use in source and binary forms, with or without
100986ab12SMaksim Yevmenkin  * modification, are permitted provided that the following conditions
110986ab12SMaksim Yevmenkin  * are met:
120986ab12SMaksim Yevmenkin  * 1. Redistributions of source code must retain the above copyright
130986ab12SMaksim Yevmenkin  *    notice, this list of conditions and the following disclaimer.
140986ab12SMaksim Yevmenkin  * 2. Redistributions in binary form must reproduce the above copyright
150986ab12SMaksim Yevmenkin  *    notice, this list of conditions and the following disclaimer in the
160986ab12SMaksim Yevmenkin  *    documentation and/or other materials provided with the distribution.
170986ab12SMaksim Yevmenkin  *
180986ab12SMaksim Yevmenkin  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
190986ab12SMaksim Yevmenkin  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
200986ab12SMaksim Yevmenkin  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
210986ab12SMaksim Yevmenkin  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
220986ab12SMaksim Yevmenkin  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
230986ab12SMaksim Yevmenkin  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
240986ab12SMaksim Yevmenkin  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
250986ab12SMaksim Yevmenkin  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
260986ab12SMaksim Yevmenkin  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
270986ab12SMaksim Yevmenkin  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
280986ab12SMaksim Yevmenkin  * SUCH DAMAGE.
290986ab12SMaksim Yevmenkin  *
300986ab12SMaksim Yevmenkin  * $Id: sdp-int.h,v 1.1 2003/09/01 23:01:07 max Exp $
310986ab12SMaksim Yevmenkin  */
320986ab12SMaksim Yevmenkin 
330986ab12SMaksim Yevmenkin #ifndef _SDP_INT_H_
340986ab12SMaksim Yevmenkin #define _SDP_INT_H_
350986ab12SMaksim Yevmenkin 
360986ab12SMaksim Yevmenkin __BEGIN_DECLS
370986ab12SMaksim Yevmenkin 
380986ab12SMaksim Yevmenkin /*
390986ab12SMaksim Yevmenkin  * SDP session
400986ab12SMaksim Yevmenkin  */
410986ab12SMaksim Yevmenkin 
420986ab12SMaksim Yevmenkin struct sdp_session {
436aae6f7eSMaksim Yevmenkin 	uint16_t	 flags;
440986ab12SMaksim Yevmenkin #define SDP_SESSION_LOCAL	(1 << 0)
456aae6f7eSMaksim Yevmenkin 	uint16_t	 tid;   /* current session transaction ID (tid) */
466aae6f7eSMaksim Yevmenkin 	uint16_t	 omtu;  /* outgoing MTU (req buffer size) */
476aae6f7eSMaksim Yevmenkin 	uint16_t	 imtu;  /* incoming MTU (rsp buffer size) */
486aae6f7eSMaksim Yevmenkin 	uint8_t		*req;	/* request buffer (start) */
496aae6f7eSMaksim Yevmenkin 	uint8_t		*req_e;	/* request buffer (end) */
506aae6f7eSMaksim Yevmenkin 	uint8_t		*rsp;	/* response buffer (start) */
516aae6f7eSMaksim Yevmenkin 	uint8_t		*rsp_e;	/* response buffer (end) */
526aae6f7eSMaksim Yevmenkin 	uint32_t	 cslen; /* continuation state length */
536aae6f7eSMaksim Yevmenkin 	uint8_t		 cs[16];/* continuation state */
540986ab12SMaksim Yevmenkin 	int32_t		 s;     /* L2CAP socket */
550986ab12SMaksim Yevmenkin 	int32_t		 error;	/* last error code */
560986ab12SMaksim Yevmenkin };
570986ab12SMaksim Yevmenkin typedef struct sdp_session	sdp_session_t;
580986ab12SMaksim Yevmenkin typedef struct sdp_session *	sdp_session_p;
590986ab12SMaksim Yevmenkin 
600986ab12SMaksim Yevmenkin __END_DECLS
610986ab12SMaksim Yevmenkin 
620986ab12SMaksim Yevmenkin #endif /* ndef _SDP_INT_H_ */
630986ab12SMaksim Yevmenkin 
64