Ejemplo n.º 1
0
void uip_xtcpd_send_config(int linknum)
{
    if (uip_ifstate) {
        xtcpd_queue_event(xtcp_links[linknum], linknum, XTCP_IFUP);
    }
    else {
        xtcpd_queue_event(xtcp_links[linknum], linknum, XTCP_IFDOWN);
    }
}
Ejemplo n.º 2
0
/* -----------------------------------------------------------------------------
 * Inform the connect applications about a state change in the state
 * of the link
 * -------------------------------------------------------------------------- */
void xtcpd_uip_checkstate(void)
{
  for (int i=0;i<xtcp_cons.nr;i++) {
    if (uip_ifstate != xtcp_cons.prev_ifstate[i]) {
    	  /* queue configuration change */
    	  if (uip_ifstate) {
    	    xtcpd_queue_event(xtcp_cons.links[i], i, XTCP_IFUP);
    	  }
    	  else {
    	    xtcpd_queue_event(xtcp_cons.links[i], i, XTCP_IFDOWN);
    	  }
      xtcp_cons.prev_ifstate[i] = uip_ifstate;
    }
  }
}