VirtualBox

Changeset 63012 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Aug 4, 2016 9:25:17 PM (8 years ago)
Author:
vboxsync
Message:

slirp: warnings

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/bootp.c

    r62511 r63012  
    592592        return offReply;
    593593    }
    594     else
    595     {
    596         bc = find_addr(pData, &daddr, bp->bp_hwaddr);
    597         if (!bc)
    598         {
    599             LogRel(("NAT: DHCP Inform was ignored no boot client was found\n"));
    600             return -1;
    601         }
    602 
    603         LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr.s_addr));
    604         offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 0);
    605         return offReply;
    606     }
    607 
    608     return -1;
     594
     595    bc = find_addr(pData, &daddr, bp->bp_hwaddr);
     596    if (!bc)
     597    {
     598        LogRel(("NAT: DHCP Inform was ignored no boot client was found\n"));
     599        return -1;
     600    }
     601
     602    LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr.s_addr));
     603    offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 0);
     604    return offReply;
    609605}
    610606
     
    617613    return 0;
    618614}
     615
    619616/**
    620617 * fields for discovering t
  • trunk/src/VBox/Devices/Network/slirp/ip_icmp.c

    r62511 r63012  
    130130    fd_nonblock(pData->icmp_socket.s);
    131131    NSOCK_INC();
     132
    132133#else /* RT_OS_WINDOWS */
     134    RT_NOREF(iIcmpCacheLimit);
     135
    133136    if (icmpwin_init(pData) != 0)
    134137        return 1;
     
    618621    struct icmp *icp;
    619622    void *payload;
     623    RT_NOREF(minsize);
    620624
    621625    LogFlow(("icmp_error: msrc = %p, msrc_len = %d\n",
  • trunk/src/VBox/Devices/Network/slirp/ip_output.c

    r62511 r63012  
    174174
    175175        if (!(m->m_flags & M_SKIP_FIREWALL)){
    176             struct m_tag *t;
    177176            STAM_PROFILE_START(&pData->StatALIAS_output, b);
    178177            rc = LibAliasOut(pData->proxy_alias, mtod(m, char *), m_length(m, NULL));
     
    293292send_or_free:
    294293        if (!(m->m_flags & M_SKIP_FIREWALL)){
    295             /* @todo: We can't alias all fragments because the way libalias processing
     294            /** @todo We can't alias all fragments because the way libalias processing
    296295             * the fragments brake the sequence. libalias put alias_address to the source
    297296             * address of IP header of fragment, while IP header of the first packet is
     
    302301             * solution.
    303302             */
    304             struct m_tag *t;
    305303            int rcLa;
    306304
  • trunk/src/VBox/Devices/Network/slirp/misc.c

    r62511 r63012  
    9191{
    9292# ifdef FIONBIO
     93#  ifdef RT_OS_WINDOWS
     94    u_long opt = 1;
     95#  else
    9396    int opt = 1;
    94 
     97#  endif
    9598    ioctlsocket(fd, FIONBIO, &opt);
    9699# else /* !FIONBIO */
     
    171174            rc = 0;
    172175            if (zone->pfInit)
    173                 rc = zone->pfInit(zone->pData, (void *)&it[1], zone->size, M_DONTWAIT);
     176                rc = zone->pfInit(zone->pData, (void *)&it[1], (int /*sigh*/)zone->size, M_DONTWAIT);
    174177            if (rc == 0)
    175178            {
     
    200203         * it into sub-zone conforming chunks.
    201204         */
    202         sub_area = slirp_uma_alloc(zone->master_zone, zone->master_zone->size, NULL, 0);
     205        sub_area = slirp_uma_alloc(zone->master_zone, (int /*sigh*/)zone->master_zone->size, NULL, 0);
    203206        if (!sub_area)
    204207        {
     
    253256    if (zone->pfFini)
    254257    {
    255         zone->pfFini(zone->pData, item, zone->size);
     258        zone->pfFini(zone->pData, item, (int /*sigh*/)zone->size);
    256259    }
    257260    if (zone->pfDtor)
    258261    {
    259         zone->pfDtor(zone->pData, item, zone->size, NULL);
     262        zone->pfDtor(zone->pData, item, (int /*sigh*/)zone->size, NULL);
    260263    }
    261264    LIST_INSERT_HEAD(&zone->free_items, it, list);
     
    388391    }
    389392    RTCritSectEnter(&zone->csZone);
    390     mem = zone->pfAlloc(zone, zone->size, NULL, 0);
     393    mem = zone->pfAlloc(zone, (int /*sigh*/)zone->size, NULL, 0);
    391394    if (mem != NULL)
    392395    {
    393396        if (zone->pfCtor)
    394             zone->pfCtor(zone->pData, mem, zone->size, args, M_DONTWAIT);
     397            zone->pfCtor(zone->pData, mem, (int /*sigh*/)zone->size, args, M_DONTWAIT);
    395398    }
    396399    RTCritSectLeave(&zone->csZone);
     
    494497{
    495498    struct mbuf *m;
    496     size_t size = MCLBYTES;
     499    int size = MCLBYTES;
    497500    LogFlowFunc(("ENTER: cbMin:%d, ppvBuf:%p, pcbBuf:%p\n", cbMin, ppvBuf, pcbBuf));
    498501
  • trunk/src/VBox/Devices/Network/slirp/sbuf.c

    r62511 r63012  
    7777    {
    7878        /* Already alloced, realloc if necessary */
    79         if (sb->sb_datalen != size)
     79        if (sb->sb_datalen != (u_int)size)
    8080        {
    8181            sb->sb_wptr =
  • trunk/src/VBox/Devices/Network/slirp/slirp.h

    r62761 r63012  
    474474int slirp_arp_lookup_ether_by_ip(PNATState, uint32_t, uint8_t *);
    475475
    476 static inline size_t slirp_size(PNATState pData)
     476DECLINLINE(unsigned) slirp_size(PNATState pData)
    477477{
    478478        if (if_mtu < MSIZE)
  • trunk/src/VBox/Devices/Network/slirp/slirp_dns.c

    r62696 r63012  
    3131# include <iprt/win/iphlpapi.h>
    3232
    33 static int get_dns_addr_domain(PNATState pData,
    34                                const char **ppszDomain)
    35 {
    36     ULONG flags = GAA_FLAG_INCLUDE_PREFIX; /*GAA_FLAG_INCLUDE_ALL_INTERFACES;*/ /* all interfaces registered in NDIS */
     33static int get_dns_addr_domain(PNATState pData)
     34{
     35    //ULONG flags = GAA_FLAG_INCLUDE_PREFIX; /*GAA_FLAG_INCLUDE_ALL_INTERFACES;*/ /* all interfaces registered in NDIS */
    3736    PIP_ADAPTER_ADDRESSES pAdapterAddr = NULL;
    3837    PIP_ADAPTER_ADDRESSES pAddr = NULL;
    3938    PIP_ADAPTER_DNS_SERVER_ADDRESS pDnsAddr = NULL;
    4039    ULONG size;
    41     int wlen = 0;
    4240    char *pszSuffix;
    4341    struct dns_domain_entry *pDomain = NULL;
     
    154152#include "resolv_conf_parser.h"
    155153
    156 static int get_dns_addr_domain(PNATState pData, const char **ppszDomain)
     154static int get_dns_addr_domain(PNATState pData)
    157155{
    158156    struct rcp_state st;
     
    222220    }
    223221
    224     if (ppszDomain && st.rcps_domain != 0)
    225         *ppszDomain = RTStrDup(st.rcps_domain);
    226 
    227222    return 0;
    228223}
     
    244239         * so we should other way to configure DNS settings.
    245240         */
    246         if (get_dns_addr_domain(pData, NULL) < 0)
    247         {
     241        if (get_dns_addr_domain(pData) < 0)
    248242            pData->fUseHostResolver = true;
    249         }
    250243        else
    251244        {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette