1*dfbf818aSplunky /* $NetBSD: sdp-int.h,v 1.1 2009/05/12 10:05:06 plunky Exp $ */ 2*dfbf818aSplunky 3*dfbf818aSplunky /* 4*dfbf818aSplunky * Copyright (c) 2001-2003 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5*dfbf818aSplunky * All rights reserved. 6*dfbf818aSplunky * 7*dfbf818aSplunky * Redistribution and use in source and binary forms, with or without 8*dfbf818aSplunky * modification, are permitted provided that the following conditions 9*dfbf818aSplunky * are met: 10*dfbf818aSplunky * 1. Redistributions of source code must retain the above copyright 11*dfbf818aSplunky * notice, this list of conditions and the following disclaimer. 12*dfbf818aSplunky * 2. Redistributions in binary form must reproduce the above copyright 13*dfbf818aSplunky * notice, this list of conditions and the following disclaimer in the 14*dfbf818aSplunky * documentation and/or other materials provided with the distribution. 15*dfbf818aSplunky * 16*dfbf818aSplunky * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17*dfbf818aSplunky * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18*dfbf818aSplunky * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19*dfbf818aSplunky * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20*dfbf818aSplunky * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21*dfbf818aSplunky * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22*dfbf818aSplunky * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23*dfbf818aSplunky * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24*dfbf818aSplunky * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25*dfbf818aSplunky * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26*dfbf818aSplunky * SUCH DAMAGE. 27*dfbf818aSplunky */ 28*dfbf818aSplunky 29*dfbf818aSplunky #ifndef _SDP_INT_H_ 30*dfbf818aSplunky #define _SDP_INT_H_ 31*dfbf818aSplunky 32*dfbf818aSplunky struct sdp_session { 33*dfbf818aSplunky uint16_t tid; /* current session transaction ID */ 34*dfbf818aSplunky uint16_t imtu; /* incoming MTU */ 35*dfbf818aSplunky uint8_t *ibuf; /* incoming buffer */ 36*dfbf818aSplunky uint8_t *rbuf; /* response buffer */ 37*dfbf818aSplunky uint8_t cs[17];/* continuation state */ 38*dfbf818aSplunky int32_t s; /* L2CAP socket */ 39*dfbf818aSplunky }; 40*dfbf818aSplunky 41*dfbf818aSplunky /* sdp_session.c */ 42*dfbf818aSplunky sdp_session_t _sdp_open(const bdaddr_t *, const bdaddr_t *); 43*dfbf818aSplunky sdp_session_t _sdp_open_local(const char *); 44*dfbf818aSplunky void _sdp_close(sdp_session_t); 45*dfbf818aSplunky bool _sdp_send_pdu(struct sdp_session *, uint8_t, struct iovec *, int); 46*dfbf818aSplunky ssize_t _sdp_recv_pdu(struct sdp_session *, uint8_t); 47*dfbf818aSplunky int _sdp_errno(uint16_t); 48*dfbf818aSplunky 49*dfbf818aSplunky /* sdp_data.c */ 50*dfbf818aSplunky bool _sdp_data_print(const uint8_t *, const uint8_t *, int); 51*dfbf818aSplunky 52*dfbf818aSplunky /* sdp_service.c */ 53*dfbf818aSplunky bool sdp_service_search_attribute(sdp_session_t, const sdp_data_t *, 54*dfbf818aSplunky const sdp_data_t *, sdp_data_t *); 55*dfbf818aSplunky 56*dfbf818aSplunky #endif /* _SDP_INT_H_ */ 57