179662672Smatthias.ringwald /* 2*1713bceaSmatthias.ringwald * Copyright (C) 2009 by Matthias Ringwald 3*1713bceaSmatthias.ringwald * 4*1713bceaSmatthias.ringwald * Redistribution and use in source and binary forms, with or without 5*1713bceaSmatthias.ringwald * modification, are permitted provided that the following conditions 6*1713bceaSmatthias.ringwald * are met: 7*1713bceaSmatthias.ringwald * 8*1713bceaSmatthias.ringwald * 1. Redistributions of source code must retain the above copyright 9*1713bceaSmatthias.ringwald * notice, this list of conditions and the following disclaimer. 10*1713bceaSmatthias.ringwald * 2. Redistributions in binary form must reproduce the above copyright 11*1713bceaSmatthias.ringwald * notice, this list of conditions and the following disclaimer in the 12*1713bceaSmatthias.ringwald * documentation and/or other materials provided with the distribution. 13*1713bceaSmatthias.ringwald * 3. Neither the name of the copyright holders nor the names of 14*1713bceaSmatthias.ringwald * contributors may be used to endorse or promote products derived 15*1713bceaSmatthias.ringwald * from this software without specific prior written permission. 16*1713bceaSmatthias.ringwald * 17*1713bceaSmatthias.ringwald * THIS SOFTWARE IS PROVIDED BY MATTHIAS RINGWALD AND CONTRIBUTORS 18*1713bceaSmatthias.ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19*1713bceaSmatthias.ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 20*1713bceaSmatthias.ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 21*1713bceaSmatthias.ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22*1713bceaSmatthias.ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 23*1713bceaSmatthias.ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 24*1713bceaSmatthias.ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 25*1713bceaSmatthias.ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26*1713bceaSmatthias.ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27*1713bceaSmatthias.ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28*1713bceaSmatthias.ringwald * SUCH DAMAGE. 29*1713bceaSmatthias.ringwald * 30*1713bceaSmatthias.ringwald */ 31*1713bceaSmatthias.ringwald 32*1713bceaSmatthias.ringwald /* 3379662672Smatthias.ringwald * hci_dump.h 3479662672Smatthias.ringwald * 3579662672Smatthias.ringwald * Dump HCI trace in BlueZ's hcidump format 3679662672Smatthias.ringwald * 3779662672Smatthias.ringwald * Created by Matthias Ringwald on 5/26/09. 3879662672Smatthias.ringwald */ 3979662672Smatthias.ringwald 4079662672Smatthias.ringwald #include <stdint.h> 4179662672Smatthias.ringwald 428b658ebcSmatthias.ringwald typedef enum { 438b658ebcSmatthias.ringwald HCI_DUMP_BLUEZ = 0, 448adf0ddaSmatthias.ringwald HCI_DUMP_PACKETLOGGER, 458adf0ddaSmatthias.ringwald HCI_DUMP_STDOUT 468b658ebcSmatthias.ringwald } hci_dump_format_t; 4779662672Smatthias.ringwald 488b658ebcSmatthias.ringwald void hci_dump_open(char *filename, hci_dump_format_t format); 4979662672Smatthias.ringwald void hci_dump_packet(uint8_t packet_type, uint8_t in, uint8_t *packet, uint16_t len); 5079662672Smatthias.ringwald void hci_dump_close(); 51