public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: gerardo.rossi@studenti.univr.it
To: ecos-discuss@sourceware.org
Cc: mirkomassi@tiscali.it
Subject: [ECOS] networking on eCos
Date: Sat, 29 Oct 2005 09:50:00 -0000	[thread overview]
Message-ID: <20051029114642.w41nraah5jc0go8g@mail.studenti.univr.it> (raw)

Hello there,
again that 2 italian students  with some problems about eCos...

We have 2 applications that use sockets, 1 transmitter that runs on eCos
transmitting data on port 2000 and 1 receiver(non-eCos application) that reads
data on the same port(all that on localhost momentarily).

1) Using the function gethostbyname() we have our error-message:

"Unable to find host 127.0.0.1" but we resolve this introducing
"init_all_network_interfaces()" and setting CYGDAT_NS_DNS_DEFAULT_SERVER via
configtool with our dns-ip, but this function is so slow and we try to use
"cyg_dns_res_init(struct in_addr *dns_server)".
Can you help we about what we have to pass to this function? Which are the
field-types of this structure?
...
hp=(struct hostent *)gethostbyname(cyg_hal_sys_argv[1]);
...

2) Another problem: the transmitter sends data without errors but the receiver
receives nothing and blocks on recv():
...
while (1) {
  n = recv(sock, buf, RTPSIZE, 0);
  ...
}
We preput that without eCos the applications communicate correctly.
What may be the cause?

3) For last(please!)

The full set of arguments can be accessed through the variables cyg_hal_sys_argc
and cyg_hal_sys_argv, but which function we have to pass them? Which header we
have to include? And how we have to pass our arguments to the application?

Thanks a lot and excuse to us for our bad english.

  Mirko, Gerardo.












----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

             reply	other threads:[~2005-10-29  9:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-29  9:50 gerardo.rossi [this message]
2005-10-30 18:55 ` Andrew Lunn
2005-10-31  8:25   ` David N. Welton
2005-10-31 17:32 gerardo.rossi
2005-10-31 18:32 ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051029114642.w41nraah5jc0go8g@mail.studenti.univr.it \
    --to=gerardo.rossi@studenti.univr.it \
    --cc=ecos-discuss@sourceware.org \
    --cc=mirkomassi@tiscali.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).