Updated current fallback_interface(s) to return int.
This commit is contained in:
parent
b3f6019924
commit
561e70b18e
6 changed files with 17 additions and 10 deletions
|
@ -222,13 +222,15 @@ tun_init()
|
|||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
static int
|
||||
tun_output(uint8_t *data, int len)
|
||||
{
|
||||
/* fprintf(stderr, "*** Writing to tun...%d\n", len); */
|
||||
if(write(tunfd, data, len) != len) {
|
||||
err(1, "serial_to_tun: write");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
|
@ -246,13 +248,14 @@ init(void)
|
|||
{
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
static int
|
||||
output(void)
|
||||
{
|
||||
PRINTF("SUT: %u\n", uip_len);
|
||||
if(uip_len > 0) {
|
||||
tun_output(&uip_buf[UIP_LLH_LEN], uip_len);
|
||||
return tun_output(&uip_buf[UIP_LLH_LEN], uip_len);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue