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