hi all,

i like to use a multi application scenario,
i tried to implement the example from the application documentation.

but i get an error if i compile it. and my knowledge of c is quit low. so maybe is only a c knowledge problem .

hope somone can help.

regards
kai

here my header file of the switch application who shell be called from the stack.

#ifndef __UIP_APP_ROUTER_H__
#define __UIP_APP_ROUTER_H__

#include <uip/uipopt.h>

//struct uip_router_state {
//  u8_t state;
//};

struct uip_router_state {
  enum {WELCOME_SENT, WELCOME_ACKED} state;
};
^   "empty declaration" <<<<<<<<<< error is here <<<<<<<<<<<<<<

//typedef struct uip_router_state uip_tcp_appstate_t;

#ifndef UIP_APPCALL
#define UIP_APPCALL     uip_router_appcall
#endif

/* Finally we define the application function to be called by uIP. */
void uip_router_appcall(void);
void uip_router_init(void);
#endif /* __TELNETD_H__ */

and here the c file:

#include <global.h>
#include <uip/uip.h>

void uip_router_init(void){
 telnetd_init();
 cmd_server_init();
}

void uip_router_appcall(void){

 struct uip_router_state *s;
 s = (struct uip_router_state *)uip_conn->appstate;
//  struct uip_router_state *s = &(uip_conn->appstate);

  switch(uip_conn->lport) {
//   case HTONS(23):
//      telnetd_appcall();
//      break;
//   case HTONS(86):
//      cmd_server_appcall();
//      break;
  }
}

Reply via email to