ok my application is

struct example2_state {
  enum {WELCOME_SENT, WELCOME_ACKED} state;
};

void example2_init(void) {
  uip_listen 
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00147.html#gdd1ab3704ecd4900eec61a6897d32dc8>(HTONS
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00148.html#g69a7a4951ff21b302267532c21ee78fc>(2345));
}

void example2_app(void) {
  struct example2_state *s;

  s = (struct example2_state *)uip_conn
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00088.html>->appstate;

  if(uip_connected
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00147.html#gdb971fb1525d0c5002f52125b05f3218>())
{
     s->state = WELCOME_SENT;
     uip_send 
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00147.html#g04b053a623aac7cd4195157d470661b3>("Welcome!\n",
9);
     return;
  }

  if(uip_acked
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00147.html#gde6634974418e3240c212b9b16864368>()
&& s->state == WELCOME_SENT) {
     s->state = WELCOME_ACKED;
  }

  if(uip_newdata
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00147.html#g26a14b8dae3f861830af9e7cf1e03725>())
{
     uip_send 
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00147.html#g04b053a623aac7cd4195157d470661b3>("ok\n",
3);
  }

  if(uip_rexmit
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00147.html#ga8933ad15a2e2947dae4a5cff50e6007>())
{
     switch(s->state) {
     case WELCOME_SENT:
        uip_send
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00147.html#g04b053a623aac7cd4195157d470661b3>("Welcome!\n",
9);
        break;
     case WELCOME_ACKED:
        uip_send
<http://www.sics.se/%7Eadam/uip/uip-1.0-refman/a00147.html#g04b053a623aac7cd4195157d470661b3>("ok\n",
3);
        break;
     }
  }
}

and for this application i am using the main and uip i ve sent to u
I just want to know will this work.
Or what modifications to code has to be done.............
If modifications are to be done can u give me some idea about the
changes to be made



On 2/14/07, Fabio Giovagnini <[EMAIL PROTECTED]> wrote:

Your question is now clear;
but it is not interesting to read main.c ed uip.c; It could be interesting
to
read your application code.


Alle 10:13, mercoledì 14 febbraio 2007, Richa Malhotra ha scritto:
> Thanx for your response. Basically i have written an application myself
>
> The application knows that as long as the "Welcome!" message has not
been
> acknowledged by the remote host, it might have been dropped in the
network.
> But once the remote host has sent an acknowledgment back, the
application
> can be sure that the welcome has been received and knows that any lost
data
> must be an "ok" message. Thus the application can be in either of two
> states: either in the WELCOME-SENT state where the "Welcome!" has been
sent
> but not acknowledged, or in the WELCOME-ACKED state where the "Welcome!"
> has been acknowledged.
> I am attaching my main code and uip.c code with this mail.
>
> I just can see in the code comparisions are being made, *whether
connected
> then do this* however if uip_connected is set that means  a connection
is
> established however for connection establishment there shoud be some
> handshaking..........or does it consider all connections are already
closed
>
> Secondly i cannot see where the Destination IP address is being
> taken...........
>
> On 2/14/07, Fabio Giovagnini <[EMAIL PROTECTED]> wrote:
> > Hi Richa,
> > 1) Could you be more detailed about what yuor exectly tring to do?
> > 2) the macros uip_conneted(); uip_timeout(); uip_acked(); tell you in
> > your application which is the event or the events (some of them could
be
> > simultaneus) you need to serve.
> >
> > Regards
> >
> > Alle 06:21, mercoledì 14 febbraio 2007, Richa Malhotra ha scritto:
> > > The code UIP-0.9 how much is it sufficient in itself.  it require
some
> > > configuration changes before it can work.
> > > If so then please tell me what changes are required.
> > > till now i have only used my independent application and apart from
> > > that
> >
> > i
> >
> > > am using everything w/o any modification.
> > >
> > > Please do reply to me....
> >
> > --
> > Fabio Giovagnini
> >
> > Aurion s.r.l.
> > via degli orti 11,
> > 40050 Funo di Argelato (BO)
> > Tel. +39.335.8350919
> > Fax +39.051.8659009
> >
> > www.aurion-tech.com
> >
> > account telefono VoIP skype (www.skype.com):
> > aurion.giovagnini

--
Fabio Giovagnini

Aurion s.r.l.
via degli orti 11,
40050 Funo di Argelato (BO)
Tel. +39.335.8350919
Fax +39.051.8659009

www.aurion-tech.com

account telefono VoIP skype (www.skype.com):
aurion.giovagnini




--
Regards
Richa Malhotra

Reply via email to