struct telnet_state *s = (struct telnet_state *)ts;
DISPATCHER_UIPCALL(telnet_app, ts){  DISPATCHER_UIPCALL_ARG(ts);  struct telnet_state *s = (struct telnet_state *)ts;      if(uip_connected()) {    s->flags = 0;    telnet_connected(s);    senddata(s);    return;  }    if(uip_closed()) {    telnet_closed(s);  }    if(uip_aborted()) {    telnet_aborted(s);  }  if(uip_timedout()) {    telnet_timedout(s);  }  if(s->flags & FLAG_CLOSE) {    uip_close();    return;  }  if(s->flags & FLAG_ABORT) {    uip_abort();    return;  }  if(uip_acked()) {    acked(s);  }  if(uip_newdata()) {    telnet_newdata(s, (char *)uip_appdata, uip_datalen());  }  if(uip_rexmit() ||     uip_newdata() ||     uip_acked()) {    senddata(s);  } else if(uip_poll()) {        senddata(s);  }}