[Cbe-oss-dev] PS3 stops receiving network packets
Akinobu Mita
mita at fixstars.com
Wed Jun 24 11:36:03 EST 2009
> Did you ever get this behavior using something other than busybox?
Unfortunately, I can reproduce it without busybox.
This is simplified steps to reproduce it (no busybox required)
Connect PS3 and PC with Ethernet crossover cable with 1000Mbit connection.
setup PS3:
1. reboot with runlevel 1
2. ifconfig lo 127.0.0.1 up
3. ifconfig eth0 192.168.222.100 up
setup PC:
1. ifdown eth0
2. /sbin/ifconfig eth0 192.168.222.101 up
3. ./udp-stress
(*) udp-stress.c
#include <netinet/in.h>
#include <unistd.h>
#include <stdlib.h>
int main()
{
struct sockaddr_in addr;
int r;
char *buffer = malloc(1024*1024);
addr.sin_family = AF_INET;
addr.sin_port = htons(21347);
addr.sin_addr.s_addr = inet_addr("192.168.222.100");
int sock = socket(PF_INET, SOCK_DGRAM, 0);
if (sock < 0) {
perror("socket");
return 1;
}
while (1) {
int r = sendto(sock, buffer, 1, 0,
(struct sockaddr*)&addr, sizeof(addr));
if (r < 0) {
perror("sendto");
return 1;
}
}
return 1;
}
More information about the cbe-oss-dev
mailing list