Changeset 1824 in vbox
- Timestamp:
- Mar 30, 2007 11:41:34 AM (18 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/misc.c
r1076 r1824 104 104 }; 105 105 106 #ifndef _MSC_VER107 inline108 #endif109 106 void 110 107 insque_32(PNATState pData, void *a, void *b) … … 120 117 } 121 118 122 #ifndef _MSC_VER123 inline124 #endif125 119 void 126 120 remque_32(PNATState pData, void *a) … … 143 137 }; 144 138 145 #ifdef _MSC_VER 146 void 147 #else 148 inline void 149 #endif 139 void 150 140 insque(PNATState pData, void *a, void *b) 151 141 { … … 159 149 } 160 150 161 #ifdef _MSC_VER 162 void 163 #else 164 inline void 165 #endif 151 void 166 152 remque(PNATState pData, void *a) 167 153 { -
trunk/src/VBox/Devices/Network/slirp/misc.h
r1076 r1824 66 66 void redir_x _P((u_int32_t, int, int, int)); 67 67 void getouraddr _P((PNATState)); 68 inlinevoid slirp_insque _P((PNATState, void *, void *));69 inlinevoid slirp_remque _P((PNATState, void *));68 void slirp_insque _P((PNATState, void *, void *)); 69 void slirp_remque _P((PNATState, void *)); 70 70 int add_exec _P((struct ex_list **, int, char *, int, int)); 71 71 int slirp_openpty _P((int *, int *)); … … 80 80 int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *)); 81 81 82 #ifdef _MSC_VER83 void insque(void *a, void *b);84 void remque(void *a);85 82 #endif 86 87 #endif -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r1076 r1824 470 470 so->so_state &= ~SS_ISFCONNECTING; 471 471 472 ret = send(so->s, &ret, 0, 0);472 ret = send(so->s, (const char *)&ret, 0, 0); 473 473 if (ret < 0) { 474 474 /* XXXXX Must fix, zero bytes is a NOP */ -
trunk/src/VBox/Devices/Network/slirp/slirp.h
r1076 r1824 215 215 #include <sys/stat.h> 216 216 217 #if ndef _MSC_VER217 #if 1 /* ndef _MSC_VER */ 218 218 /* Avoid conflicting with the libc insque() and remque(), which 219 219 have different prototypes. */ … … 306 306 # define remque_32 remque 307 307 #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 308 extern void insque_32 _P((PNATState, void *, void *)); 309 extern void remque_32 _P((PNATState, void *)); 315 310 #endif 316 311 -
trunk/src/VBox/Devices/Network/slirp/socket.c
r1796 r1824 496 496 case CTL_BROADCAST: 497 497 addr.sin_addr.s_addr = INADDR_BROADCAST; 498 #if 0 498 499 /* Send the packet to host to fully emulate broadcast */ 499 500 /** @todo r=klaus: on Linux host this causes the host to receive … … 503 504 host_addr.sin_family = AF_INET; 504 505 host_addr.sin_port = so->so_fport; 505 host_addr.sin_addr = loopback_addr;506 host_addr.sin_addr = our_addr; 506 507 sendto(so->s, m->m_data, m->m_len, 0, 507 508 (struct sockaddr *)&host_addr, sizeof (struct sockaddr)); 509 #endif 508 510 break; 509 511 case CTL_DNS: -
trunk/src/VBox/Devices/Network/slirp/udp.c
r1796 r1824 341 341 so->so_expire = curtime + SO_EXPIRE; 342 342 /* 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)); 344 344 insque(pData, so,&udb); 345 345 }
Note:
See TracChangeset
for help on using the changeset viewer.