* The problem has been solved thanks so much.* --ZN
On Sat, Jan 4, 2014 at 1:53 PM, Ali Saidi <[email protected]> wrote: > Do you have a loopback interface up? > > try: > > ifconfig lo 127.0.0.1 > > before running your program. > > Ali > > On Jan 4, 2014, at 1:48 PM, Zohreh Naghibi <[email protected]> > wrote: > > Thanks.. > Yes, I have /etc/hosts and these lines are in it: > > # IPv4 and IPv6 localhost aliases > 127.0.0.1 localhost > ::1 localhost > .... > > > On Sat, Jan 4, 2014 at 11:38 AM, Ali Saidi <[email protected]> wrote: > >> Do you have a /etc/hosts file with 127.0.0.1 in it? Ali >> >> On Jan 4, 2014, at 12:53 PM, Zohreh Naghibi <[email protected]> >> wrote: >> >> I have bound the server to 127.0.0.1. I have got this error: >> >> UDP server - socket() is OK >> UDP server - bind() *error: Cannot assign requested address* >> UDP Client - socket() is OK! >> UDP Client - gethostname() of the server is OK... >> Connected to UDP server >> UDP Client - sendto() error: Network is unreachable >> >> >> >> >> On Sat, Jan 4, 2014 at 6:41 AM, Hossein Nikoonia <[email protected]>wrote: >> >>> I mean binding the server to 127.0.0.1 >>> Are you doing that? >>> >>> >>> >>> >>> On Sat, Jan 4, 2014 at 5:24 PM, Zohreh Naghibi <[email protected] >>> > wrote: >>> >>>> Thanks for your quick reply.. >>>> I have tested it but I've got the same error. >>>> >>>> >>>> On Sat, Jan 4, 2014 at 5:50 AM, Hossein Nikoonia <[email protected]>wrote: >>>> >>>>> what about binding to 127.0.0.1 instead of 0.0.0.0 ? >>>>> >>>>> >>>>> On Sat, Jan 4, 2014 at 5:12 PM, Zohreh Naghibi < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi all >>>>>> I have implemented UDP socket programming in c code. It sends packets >>>>>> (1 KB) via UDP port. The code works correctly in my own linux but >>>>>> NOT in gem5's Linux. Here's my output and the error: >>>>>> >>>>>> ./server : >>>>>> ********************************************** >>>>>> UDP server - socket() is OK >>>>>> >>>>>> Using IP 0.0.0.0 and port 15107 >>>>>> >>>>>> UDP server - Listening... >>>>>> ****************************************** >>>>>> ./client localhost 15107 (this port is free) >>>>>> >>>>>> UDP Client - socket() is OK! >>>>>> >>>>>> UDP Client - gethostname() of the server is OK... >>>>>> >>>>>> Connected to UDP server >>>>>> >>>>>> UDP Client - sendto() error: *Network is unreachable * >>>>>> >>>>>> ************************************************************** >>>>>> >>>>>> Any help would be appreciated... >>>>>> >>>>>> _______________________________________________ >>>>>> gem5-users mailing list >>>>>> [email protected] >>>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> gem5-users mailing list >>>>> [email protected] >>>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>>>> >>>> >>>> >>>> _______________________________________________ >>>> gem5-users mailing list >>>> [email protected] >>>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>>> >>> >>> >>> _______________________________________________ >>> gem5-users mailing list >>> [email protected] >>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>> >> >> _______________________________________________ >> gem5-users mailing list >> [email protected] >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> >> >> >> _______________________________________________ >> gem5-users mailing list >> [email protected] >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> > > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > > > > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
