Changeset 16443 in vbox for trunk/src/VBox/Devices/Network/slirp/debug.c
- Timestamp:
- Jan 31, 2009 7:16:03 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/debug.c
r15683 r16443 185 185 char buff[256]; 186 186 int n; 187 struct socket *so ;187 struct socket *so, *so_next; 188 188 189 189 lprint(" \n"); … … 192 192 "Proto[state] Sock Local Address, Port Remote Address, Port RecvQ SendQ\n"); 193 193 194 for (so = tcb.so_next; so != &tcb; so = so->so_next)195 {194 QSOCKET_FOREACH(so, so_next, tcp) 195 /* { */ 196 196 n = sprintf(buff, "tcp[%s]", so->so_tcpcb?tcpstates[so->so_tcpcb->t_state]:"NONE"); 197 197 while (n < 17) … … 203 203 inet_ntoa(so->so_faddr), ntohs(so->so_fport), 204 204 so->so_rcv.sb_cc, so->so_snd.sb_cc); 205 LOOP_LABEL(tcp, so, so_next); 205 206 } 206 207 207 for (so = udb.so_next; so != &udb; so = so->so_next)208 {208 QSOCKET_FOREACH(so, so_next, udp) 209 /* { */ 209 210 n = sprintf(buff, "udp[%d sec]", (so->so_expire - curtime) / 1000); 210 211 while (n < 17) … … 216 217 inet_ntoa(so->so_faddr), ntohs(so->so_fport), 217 218 so->so_rcv.sb_cc, so->so_snd.sb_cc); 219 LOOP_LABEL(udp, so, so_next); 218 220 } 219 221 } … … 248 250 249 251 AssertReturn(strcmp(pszType, "natsock") == 0, 0); 250 252 if (so->so_state == SS_NOFDREF || so->s == -1) 253 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "socket SS_NODREF"); 251 254 status = getsockname(so->s, &addr, &socklen); 252 255 … … 257 260 "state=%04x ip=" IP4_ADDR_PRINTF_FORMAT ":%d name=" IP4_ADDR_PRINTF_FORMAT ":%d", 258 261 so->s, so->so_type, so->so_state, IP4_ADDR_PRINTF_DECOMP(ip), ntohs(so->so_fport), 259 IP4_ADDR_PRINTF_DECOMP( ((struct sockaddr_in *)&addr)->sin_addr.s_addr),262 IP4_ADDR_PRINTF_DECOMP(ntohl(((struct sockaddr_in *)&addr)->sin_addr.s_addr)), 260 263 ntohs(((struct sockaddr_in *)&addr)->sin_port)); 261 264 }
Note:
See TracChangeset
for help on using the changeset viewer.