ssr.c (124758) | ssr.c (126245) |
---|---|
1/* 2 * ssr.c 3 * 4 * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * $Id: ssr.c,v 1.5 2004/01/13 01:54:39 max Exp $ | 1/* 2 * ssr.c 3 * 4 * Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * $Id: ssr.c,v 1.5 2004/01/13 01:54:39 max Exp $ |
29 * $FreeBSD: head/usr.sbin/bluetooth/sdpd/ssr.c 124758 2004-01-20 20:48:26Z emax $ | 29 * $FreeBSD: head/usr.sbin/bluetooth/sdpd/ssr.c 126245 2004-02-25 22:43:43Z emax $ |
30 */ 31 32#include <sys/queue.h> 33#include <sys/uio.h> 34#include <netinet/in.h> 35#include <arpa/inet.h> 36#include <assert.h> 37#include <bluetooth.h> --- 181 unchanged lines hidden (view full) --- 219 220 rcounts[0] = srv->fdidx[fd].rsp_size / 4; /* TotalServiceRecordCount */ 221 rcounts[1] = (rsp_end - rsp) / 4; /* CurrentServiceRecordCount */ 222 223 pdu.pid = SDP_PDU_SERVICE_SEARCH_RESPONSE; 224 pdu.tid = ((sdp_pdu_p)(srv->req))->tid; 225 pdu.len = htons(sizeof(rcounts) + rcounts[1] * 4 + 1 + cs[0]); 226 | 30 */ 31 32#include <sys/queue.h> 33#include <sys/uio.h> 34#include <netinet/in.h> 35#include <arpa/inet.h> 36#include <assert.h> 37#include <bluetooth.h> --- 181 unchanged lines hidden (view full) --- 219 220 rcounts[0] = srv->fdidx[fd].rsp_size / 4; /* TotalServiceRecordCount */ 221 rcounts[1] = (rsp_end - rsp) / 4; /* CurrentServiceRecordCount */ 222 223 pdu.pid = SDP_PDU_SERVICE_SEARCH_RESPONSE; 224 pdu.tid = ((sdp_pdu_p)(srv->req))->tid; 225 pdu.len = htons(sizeof(rcounts) + rcounts[1] * 4 + 1 + cs[0]); 226 |
227 rcounts[0] = htons(rcounts[0]); 228 rcounts[1] = htons(rcounts[1]); 229 |
|
227 iov[0].iov_base = &pdu; 228 iov[0].iov_len = sizeof(pdu); 229 230 iov[1].iov_base = rcounts; 231 iov[1].iov_len = sizeof(rcounts); 232 233 iov[2].iov_base = rsp; 234 iov[2].iov_len = rsp_end - rsp; --- 18 unchanged lines hidden --- | 230 iov[0].iov_base = &pdu; 231 iov[0].iov_len = sizeof(pdu); 232 233 iov[1].iov_base = rcounts; 234 iov[1].iov_len = sizeof(rcounts); 235 236 iov[2].iov_base = rsp; 237 iov[2].iov_len = rsp_end - rsp; --- 18 unchanged lines hidden --- |