Changes in uspace/srv/net/slip/slip.c [a17356fd:02a09ed] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/slip/slip.c
ra17356fd r02a09ed 58 58 static int slip_close(iplink_srv_t *); 59 59 static int slip_send(iplink_srv_t *, iplink_sdu_t *); 60 static int slip_send6(iplink_srv_t *, iplink_sdu6_t *);61 60 static int slip_get_mtu(iplink_srv_t *, size_t *); 62 static int slip_get_mac48(iplink_srv_t *, addr48_t *);63 61 static int slip_addr_add(iplink_srv_t *, inet_addr_t *); 64 62 static int slip_addr_remove(iplink_srv_t *, inet_addr_t *); … … 70 68 .close = slip_close, 71 69 .send = slip_send, 72 .send6 = slip_send6,73 70 .get_mtu = slip_get_mtu, 74 .get_mac48 = slip_get_mac48,75 71 .addr_add = slip_addr_add, 76 72 .addr_remove = slip_addr_remove … … 126 122 int slip_send(iplink_srv_t *srv, iplink_sdu_t *sdu) 127 123 { 128 log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_send()");129 130 124 async_sess_t *sess = (async_sess_t *) srv->arg; 131 125 uint8_t *data = sdu->data; 132 126 unsigned i; 127 128 log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_send()"); 129 133 130 /* 134 * Strictly speaking, this is not prescribed by the RFC, but the RFC135 * suggests to start with sending a SLIP_END byte as a synchronization136 * measure for dealing with previous possible noise on the line.137 */131 * Strictly speaking, this is not prescribed by the RFC, but the RFC 132 * suggests to start with sending a SLIP_END byte as a synchronization 133 * measure for dealing with previous possible noise on the line. 134 */ 138 135 write_buffered(sess, SLIP_END); 139 140 for ( size_ti = 0; i < sdu->size; i++) {136 137 for (i = 0; i < sdu->size; i++) { 141 138 switch (data[i]) { 142 139 case SLIP_END: … … 153 150 } 154 151 } 155 156 152 write_buffered(sess, SLIP_END); 157 153 write_flush(sess); 158 159 return EOK; 160 } 161 162 int slip_send6(iplink_srv_t *srv, iplink_sdu6_t *sdu) 163 { 164 log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_send6()"); 165 166 return ENOTSUP; 154 155 return EOK; 167 156 } 168 157 … … 172 161 *mtu = SLIP_MTU; 173 162 return EOK; 174 }175 176 int slip_get_mac48(iplink_srv_t *src, addr48_t *mac)177 {178 log_msg(LOG_DEFAULT, LVL_DEBUG, "slip_get_mac48()");179 return ENOTSUP;180 163 } 181 164
Note:
See TracChangeset
for help on using the changeset viewer.