Changeset 048cd69 in mainline for uspace/srv/net/inetsrv/inet_link.c
- Timestamp:
- 2015-06-07T15:41:04Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 204ba47
- Parents:
- 4d11204 (diff), c3f7d37 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inetsrv/inet_link.c
r4d11204 r048cd69 73 73 { 74 74 memcpy(ip_addr, link_local_node_ip, 16); 75 75 76 76 ip_addr[8] = mac_addr[0] ^ 0x02; 77 77 ip_addr[9] = mac_addr[1]; … … 85 85 { 86 86 log_msg(LOG_DEFAULT, LVL_DEBUG, "inet_iplink_recv()"); 87 87 88 88 int rc; 89 89 inet_packet_t packet; 90 90 inet_link_t *ilink; 91 92 ilink = (inet_link_t *)iplink_get_userptr(iplink); 93 91 94 switch (ver) { 92 95 case ip_v4: 93 rc = inet_pdu_decode(sdu->data, sdu->size, &packet); 96 rc = inet_pdu_decode(sdu->data, sdu->size, ilink->svc_id, 97 &packet); 94 98 break; 95 99 case ip_v6: 96 rc = inet_pdu_decode6(sdu->data, sdu->size, &packet); 100 rc = inet_pdu_decode6(sdu->data, sdu->size, ilink->svc_id, 101 &packet); 97 102 break; 98 103 default: … … 100 105 return EINVAL; 101 106 } 102 107 103 108 if (rc != EOK) { 104 109 log_msg(LOG_DEFAULT, LVL_DEBUG, "failed decoding PDU"); 105 110 return rc; 106 111 } 107 112 113 log_msg(LOG_DEFAULT, LVL_NOTE, "inet_iplink_recv: link_id=%zu", packet.link_id); 108 114 log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet()"); 109 115 rc = inet_recv_packet(&packet); 110 116 log_msg(LOG_DEFAULT, LVL_DEBUG, "call inet_recv_packet -> %d", rc); 111 117 free(packet.data); 112 118 113 119 return rc; 114 120 } … … 177 183 } 178 184 179 rc = iplink_open(ilink->sess, &inet_iplink_ev_ops, &ilink->iplink);185 rc = iplink_open(ilink->sess, &inet_iplink_ev_ops, ilink, &ilink->iplink); 180 186 if (rc != EOK) { 181 187 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed opening IP link '%s'",
Note:
See TracChangeset
for help on using the changeset viewer.