media/mtransport/third_party/nICEr/src/net/local_addr.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/mtransport/third_party/nICEr/src/net/local_addr.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,59 @@
     1.4 +/*
     1.5 +Copyright (c) 2007, Adobe Systems, Incorporated
     1.6 +Copyright (c) 2013, Mozilla
     1.7 +
     1.8 +All rights reserved.
     1.9 +
    1.10 +Redistribution and use in source and binary forms, with or without
    1.11 +modification, are permitted provided that the following conditions are
    1.12 +met:
    1.13 +
    1.14 +* Redistributions of source code must retain the above copyright
    1.15 +  notice, this list of conditions and the following disclaimer.
    1.16 +
    1.17 +* Redistributions in binary form must reproduce the above copyright
    1.18 +  notice, this list of conditions and the following disclaimer in the
    1.19 +  documentation and/or other materials provided with the distribution.
    1.20 +
    1.21 +* Neither the name of Adobe Systems, Network Resonance, Mozilla nor
    1.22 +  the names of its contributors may be used to endorse or promote
    1.23 +  products derived from this software without specific prior written
    1.24 +  permission.
    1.25 +
    1.26 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    1.27 +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    1.28 +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    1.29 +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    1.30 +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.31 +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.32 +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    1.33 +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    1.34 +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    1.35 +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    1.36 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    1.37 +*/
    1.38 +
    1.39 +#ifndef _local_addr_h
    1.40 +#define _local_addr_h
    1.41 +
    1.42 +#include "transport_addr.h"
    1.43 +
    1.44 +typedef struct nr_interface_ {
    1.45 +  int type;
    1.46 +#define NR_INTERFACE_TYPE_UNKNOWN 0x0
    1.47 +#define NR_INTERFACE_TYPE_WIRED   0x1
    1.48 +#define NR_INTERFACE_TYPE_WIFI    0x2
    1.49 +#define NR_INTERFACE_TYPE_MOBILE  0x4
    1.50 +#define NR_INTERFACE_TYPE_VPN     0x8
    1.51 +  int estimated_speed; /* Speed in kbps */
    1.52 +} nr_interface;
    1.53 +
    1.54 +typedef struct nr_local_addr_ {
    1.55 +  nr_transport_addr addr;
    1.56 +  nr_interface interface;
    1.57 +} nr_local_addr;
    1.58 +
    1.59 +int nr_local_addr_copy(nr_local_addr *to, nr_local_addr *from);
    1.60 +int nr_local_addr_fmt_info_string(nr_local_addr *addr, char *buf, int len);
    1.61 +
    1.62 +#endif

mercurial