[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] Fwd: lwip tcp socket in mini-os in xen 4.6.6
I have some trouble with lwip in minios-devel. Hope someone to help me to sovle this.
I have set up a tcp/ip server listening in the dom0. I want to use lwip to connect to the server. I can`t use the tcp/ip to connect which is in dom0. the error is that: Initialising scheduler Thread "Idle": pointer: 0x0x2000802050, stack: 0x0x110000 Thread "xenstore": pointer: 0x0x2000802800, stack: 0x0x120000 xenbus initialised on irq 1 mfn 0x1196ef Thread "shutdown": pointer: 0x0x2000802fb0, stack: 0x0x130000 main.c: dummy main: start_info=0xc8be0 Thread "main": pointer: 0x0x2000803760, stack: 0x0x140000 [main] Waiting for network. ************************ NETFRONT for device/vif/0 ********** net TX ring size 256 net RX ring size 256 backend at /local/domain/0/backend/vif/3/ mac is 00:16:3e:68:43:99 ************************** [main] IP ac150512 netmask ffff0000 gateway 0. [main] TCP/IP bringup begins. Thread "tcpip_thread": pointer: 0x0x20008064e0, stack: 0x0x250000 [tcpip_thread] TCP/IP bringup ends. [main] Network is ready. "main" Hello, world! 0 7e0515ac socket -> 3 connect error!: Software caused connection abort close(0) close(1) close(2) close(3) main returned -1 close network: backend at /local/domain/0/backend/vif/3/ Do_exit called! base is 0x14fee0 caller is 0x65d04 base is 0x14fef0 caller is 0x4b087 base is 0x14ff10 caller is 0x4b93a base is 0x14ff40 caller is 0x668ab base is 0x14ff60 caller is 0x4b8b5 base is 0x14ffe0 caller is 0x3423 my environment is below: my dom0 has xenbr0. xenbr0 : ip is 172.21.5.126 the minios.conf is below: ------------------------------ name="minios" kernel="/home/huanghaoxiang/ memory=8 vif=['mac=00:16:3e:68:43:99, #disk=["file:/home/test/vtpm/ #_on_crash_='preserve' ------------------------------ Im write a tcp connection to test the connectivity in Xen-Release-4.6.6 /stubdom/c/ ------------------------------ CONFIG_LWIP=y CONFIG_XC=y ------------------------------ int main(void) { struct sockaddr_in sockaddr; int sockfd, connectfd, ret; sleep(2); printf("Hello, world!\n"); sockfd = connectfd = -1; ret = 0; sleep(5); bzero(&sockaddr, sizeof(sockaddr)); sockaddr.sin_family = AF_INET; sockaddr.sin_port = htons(13000); printf("%0x\n", sockaddr.sin_addr.s_addr); if ((ret = inet_aton("172.21.5.126", &sockaddr.sin_addr)) < 0) { perror("ip"); return -1; } printf("%0x\n", sockaddr.sin_addr.s_addr); if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket"); return -1; } if ((connectfd = connect(sockfd, (struct sockaddr *)&sockaddr, sizeof(sockaddr))) < 0) { perror("connect error!"); return -1; } else { printf("connnect succuse\n"); } close(connectfd); while (1) { sleep(2); printf("Hello, world!\n"); } return 0; } ------------------------------ _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |