Lines Matching refs:slip
6 int slip_proto_read(int fd, void *buf, int len, struct slip_proto *slip) in slip_proto_read() argument
10 if(slip->more > 0){ in slip_proto_read()
12 while(i < slip->more){ in slip_proto_read()
13 size = slip_unesc(slip->ibuf[i++], slip->ibuf, in slip_proto_read()
14 &slip->pos, &slip->esc); in slip_proto_read()
16 memcpy(buf, slip->ibuf, size); in slip_proto_read()
17 memmove(slip->ibuf, &slip->ibuf[i], in slip_proto_read()
18 slip->more - i); in slip_proto_read()
19 slip->more = slip->more - i; in slip_proto_read()
23 slip->more = 0; in slip_proto_read()
26 n = net_read(fd, &slip->ibuf[slip->pos], in slip_proto_read()
27 sizeof(slip->ibuf) - slip->pos); in slip_proto_read()
31 start = slip->pos; in slip_proto_read()
33 size = slip_unesc(slip->ibuf[start + i], slip->ibuf,&slip->pos, in slip_proto_read()
34 &slip->esc); in slip_proto_read()
36 memcpy(buf, slip->ibuf, size); in slip_proto_read()
37 memmove(slip->ibuf, &slip->ibuf[start+i+1], in slip_proto_read()
39 slip->more = n - (i + 1); in slip_proto_read()
46 int slip_proto_write(int fd, void *buf, int len, struct slip_proto *slip) in slip_proto_write() argument
50 actual = slip_esc(buf, slip->obuf, len); in slip_proto_write()
51 n = net_write(fd, slip->obuf, actual); in slip_proto_write()