VirtualBox

Changeset 1824 in vbox


Ignore:
Timestamp:
Mar 30, 2007 11:41:34 AM (18 years ago)
Author:
vboxsync
Message:

Disable NAT UDP broadcast resend to local address. Removed the inline declarations and the useless _MSC_VER checks. And eliminated a few compiler warnings.

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

Legend:

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

    r1076 r1824  
    104104};
    105105
    106 #ifndef _MSC_VER
    107 inline
    108 #endif
    109106void
    110107insque_32(PNATState pData, void *a, void *b)
     
    120117}
    121118
    122 #ifndef _MSC_VER
    123 inline
    124 #endif
    125119void
    126120remque_32(PNATState pData, void *a)
     
    143137};
    144138
    145 #ifdef _MSC_VER
    146 void
    147 #else
    148 inline void
    149 #endif
     139void
    150140insque(PNATState pData, void *a, void *b)
    151141{
     
    159149}
    160150
    161 #ifdef _MSC_VER
    162 void
    163 #else
    164 inline void
    165 #endif
     151void
    166152remque(PNATState pData, void *a)
    167153{
  • trunk/src/VBox/Devices/Network/slirp/misc.h

    r1076 r1824  
    6666void redir_x _P((u_int32_t, int, int, int));
    6767void getouraddr _P((PNATState));
    68 inline  void slirp_insque  _P((PNATState, void *, void *));
    69 inline  void slirp_remque  _P((PNATState, void *));
     68void slirp_insque  _P((PNATState, void *, void *));
     69void slirp_remque  _P((PNATState, void *));
    7070int add_exec _P((struct ex_list **, int, char *, int, int));
    7171int slirp_openpty _P((int *, int *));
     
    8080int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *));
    8181
    82 #ifdef _MSC_VER
    83 void insque(void *a, void *b);
    84 void remque(void *a);
    8582#endif
    86 
    87 #endif
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r1076 r1824  
    470470                            so->so_state &= ~SS_ISFCONNECTING;
    471471
    472                             ret = send(so->s, &ret, 0, 0);
     472                            ret = send(so->s, (const char *)&ret, 0, 0);
    473473                            if (ret < 0) {
    474474                              /* XXXXX Must fix, zero bytes is a NOP */
  • trunk/src/VBox/Devices/Network/slirp/slirp.h

    r1076 r1824  
    215215#include <sys/stat.h>
    216216
    217 #ifndef _MSC_VER
     217#if 1 /* ndef _MSC_VER */
    218218/* Avoid conflicting with the libc insque() and remque(), which
    219219   have different prototypes. */
     
    306306# define remque_32 remque
    307307#else
    308 # ifdef _MSC_VER
    309  extern void insque_32 _P((PNATState, void *, void *));
    310  extern void remque_32 _P((PNATState, void *));
    311 # else
    312  inline void insque_32 _P((PNATState, void *, void *));
    313  inline void remque_32 _P((PNATState, void *));
    314 # endif
     308extern void insque_32 _P((PNATState, void *, void *));
     309extern void remque_32 _P((PNATState, void *));
    315310#endif
    316311
  • trunk/src/VBox/Devices/Network/slirp/socket.c

    r1796 r1824  
    496496          case CTL_BROADCAST:
    497497            addr.sin_addr.s_addr = INADDR_BROADCAST;
     498#if 0
    498499            /* Send the packet to host to fully emulate broadcast */
    499500            /** @todo r=klaus: on Linux host this causes the host to receive
     
    503504            host_addr.sin_family = AF_INET;
    504505            host_addr.sin_port = so->so_fport;
    505             host_addr.sin_addr = loopback_addr;
     506            host_addr.sin_addr = our_addr;
    506507            sendto(so->s, m->m_data, m->m_len, 0,
    507508                  (struct sockaddr *)&host_addr, sizeof (struct sockaddr));
     509#endif
    508510            break;
    509511          case CTL_DNS:
  • trunk/src/VBox/Devices/Network/slirp/udp.c

    r1796 r1824  
    341341      so->so_expire = curtime + SO_EXPIRE;
    342342      /* enable broadcast for later use */
    343       setsockopt(so->s, SOL_SOCKET, SO_BROADCAST, &opt, sizeof(opt));
     343      setsockopt(so->s, SOL_SOCKET, SO_BROADCAST, (const char *)&opt, sizeof(opt));
    344344      insque(pData, so,&udb);
    345345    }
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