Changeset 1d94e21 in mainline
- Timestamp:
- 2013-07-16T19:39:47Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0845589, 47f5a77
- Parents:
- 159bad57
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/ping6/ping6.c
r159bad57 r1d94e21 102 102 } 103 103 104 printf("Received ICMP echo reply: from %s to %s, seq. no %u, "104 printf("Received ICMPv6 echo reply: from %s to %s, seq. no %u, " 105 105 "payload size %zu\n", asrc, adest, sdu->seq_no, sdu->size); 106 106 -
uspace/srv/net/dnsrsrv/dns_std.h
r159bad57 r1d94e21 65 65 DTYPE_MX = 15, 66 66 DTYPE_TXT = 16, 67 DTYPE_AAAA = 28, 67 68 DQTYPE_AXFR = 252, 68 69 DQTYPE_MAILB = 253, -
uspace/srv/net/inetsrv/icmpv6.c
r159bad57 r1d94e21 78 78 inet_dgram_t rdgram; 79 79 80 rdgram.src = dgram->dest;80 inet_get_srcaddr(&dgram->src, 0, &rdgram.src); 81 81 rdgram.dest = dgram->src; 82 82 rdgram.tos = 0; … … 150 150 case ICMPV6_NEIGHBOUR_SOLICITATION: 151 151 case ICMPV6_NEIGHBOUR_ADVERTISEMENT: 152 #ifdef ACCEPT_RA153 152 case ICMPV6_ROUTER_ADVERTISEMENT: 154 #endif155 153 return ndp_received(dgram); 156 154 default: -
uspace/srv/net/inetsrv/ndp.c
r159bad57 r1d94e21 38 38 #include <mem.h> 39 39 #include <malloc.h> 40 #include <io/log.h> 40 41 #include <net/socket_codes.h> 41 42 #include "ntrans.h" … … 54 55 {0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01, 0xff, 0, 0, 0}; 55 56 57 /** Compute solicited node MAC multicast address from target IPv6 address 58 * 59 * @param ip_addr Target IPv6 address 60 * @param mac_addr Solicited MAC address to be assigned 61 * 62 */ 56 63 static void ndp_solicited_node_mac(addr128_t ip_addr, addr48_t mac_addr) 57 64 { … … 60 67 } 61 68 69 /** Compute solicited node IPv6 multicast address from target IPv6 address 70 * 71 * @param ip_addr Target IPv6 address 72 * @param ip_solicited Solicited IPv6 address to be assigned 73 * 74 */ 62 75 static void ndp_solicited_node_ip(addr128_t ip_addr, 63 76 addr128_t ip_solicited) … … 88 101 int ndp_received(inet_dgram_t *dgram) 89 102 { 103 log_msg(LOG_DEFAULT, LVL_DEBUG, "ndp_received()"); 104 90 105 ndp_packet_t packet; 91 106 int rc = ndp_pdu_decode(dgram, &packet); … … 100 115 101 116 inet_addrobj_t *laddr; 117 118 log_msg(LOG_DEFAULT, LVL_DEBUG, "NDP PDU decoded; opcode: %d", 119 packet.opcode); 102 120 103 121 switch (packet.opcode) { … … 138 156 } 139 157 158 /** Translate IPv6 to MAC address 159 * 160 * @param src Source IPv6 address 161 * @param dest Destination IPv6 address 162 * @param mac Target MAC address to be assigned 163 * @param link Network interface 164 * 165 * @return EOK on success 166 * @return ENOENT when NDP translation failed 167 * 168 */ 140 169 int ndp_translate(addr128_t src_addr, addr128_t ip_addr, addr48_t mac_addr, 141 170 inet_link_t *ilink) -
uspace/srv/net/inetsrv/pdu.c
r159bad57 r1d94e21 49 49 #include "pdu.h" 50 50 51 52 51 /** One's complement addition. 53 52 * … … 274 273 } 275 274 275 /** Decode IPv4 datagram 276 * 277 * @param data Serialized IPv4 datagram 278 * @param size Length of serialized IPv4 datagram 279 * @param packet IP datagram structure to be filled 280 * 281 * @return EOK on success 282 * @return EINVAL if the datagram is invalid or damaged 283 * @return ENOMEM if not enough memory 284 * 285 */ 276 286 int inet_pdu_decode(void *data, size_t size, inet_packet_t *packet) 277 287 { … … 337 347 } 338 348 349 /** Decode IPv6 datagram 350 * 351 * @param data Serialized IPv6 datagram 352 * @param size Length of serialized IPv6 datagram 353 * @param packet IP datagram structure to be filled 354 * 355 * @return EOK on success 356 * @return EINVAL if the datagram is invalid or damaged 357 * @return ENOMEM if not enough memory 358 * 359 */ 339 360 int inet_pdu_decode6(void *data, size_t size, inet_packet_t *packet) 340 361 { … … 416 437 } 417 438 439 /** Encode NDP packet 440 * 441 * @param ndp NDP packet structure to be serialized 442 * @param dgram IPv6 datagram structure to be filled 443 * 444 * @return EOK on success 445 * 446 */ 418 447 int ndp_pdu_encode(ndp_packet_t *ndp, inet_dgram_t *dgram) 419 448 { … … 468 497 } 469 498 499 /** Decode NDP packet 500 * 501 * @param dgram Incoming IPv6 datagram encapsulating NDP packet 502 * @param ndp NDP packet structure to be filled 503 * 504 * @return EOK on success 505 * @return EINVAL if the Datagram is invalid 506 * 507 */ 470 508 int ndp_pdu_decode(inet_dgram_t *dgram, ndp_packet_t *ndp) 471 509 {
Note:
See TracChangeset
for help on using the changeset viewer.