Changes in uspace/srv/net/loopip/loopip.c [a17356fd:b688fd8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/loopip/loopip.c
ra17356fd rb688fd8 40 40 #include <inet/iplink_srv.h> 41 41 #include <inet/addr.h> 42 #include <net/socket_codes.h>43 42 #include <io/log.h> 44 43 #include <loc.h> 45 44 #include <stdio.h> 46 45 #include <stdlib.h> 46 #include <task.h> 47 47 48 48 #define NAME "loopip" … … 76 76 link_t link; 77 77 78 uint16_t af; 78 /* XXX Version should be part of SDU */ 79 ip_ver_t ver; 79 80 iplink_recv_sdu_t sdu; 80 81 } rqueue_entry_t; … … 88 89 list_get_instance(link, rqueue_entry_t, link); 89 90 90 (void) iplink_ev_recv(&loopip_iplink, &rqe->sdu, rqe-> af);91 (void) iplink_ev_recv(&loopip_iplink, &rqe->sdu, rqe->ver); 91 92 92 93 free(rqe->sdu.data); … … 99 100 static int loopip_init(void) 100 101 { 101 async_set_ client_connection(loopip_client_conn);102 async_set_fallback_port_handler(loopip_client_conn, NULL); 102 103 103 104 int rc = loc_server_register(NAME); … … 174 175 * Clone SDU 175 176 */ 176 rqe-> af = AF_INET;177 rqe->ver = ip_v4; 177 178 rqe->sdu.data = malloc(sdu->size); 178 179 if (rqe->sdu.data == NULL) { … … 203 204 * Clone SDU 204 205 */ 205 rqe-> af = AF_INET6;206 rqe->ver = ip_v6; 206 207 rqe->sdu.data = malloc(sdu->size); 207 208 if (rqe->sdu.data == NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.