Changeset 1d94e21 in mainline


Ignore:
Timestamp:
2013-07-16T19:39:47Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0845589, 47f5a77
Parents:
159bad57
Message:

cherrypick lp:~as-s/helenos/ipv6

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/ping6/ping6.c

    r159bad57 r1d94e21  
    102102        }
    103103       
    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, "
    105105            "payload size %zu\n", asrc, adest, sdu->seq_no, sdu->size);
    106106       
  • uspace/srv/net/dnsrsrv/dns_std.h

    r159bad57 r1d94e21  
    6565        DTYPE_MX        = 15,
    6666        DTYPE_TXT       = 16,
     67        DTYPE_AAAA      = 28,
    6768        DQTYPE_AXFR     = 252,
    6869        DQTYPE_MAILB    = 253,
  • uspace/srv/net/inetsrv/icmpv6.c

    r159bad57 r1d94e21  
    7878        inet_dgram_t rdgram;
    7979       
    80         rdgram.src = dgram->dest;
     80        inet_get_srcaddr(&dgram->src, 0, &rdgram.src);
    8181        rdgram.dest = dgram->src;
    8282        rdgram.tos = 0;
     
    150150        case ICMPV6_NEIGHBOUR_SOLICITATION:
    151151        case ICMPV6_NEIGHBOUR_ADVERTISEMENT:
    152 #ifdef ACCEPT_RA
    153152        case ICMPV6_ROUTER_ADVERTISEMENT:
    154 #endif
    155153                return ndp_received(dgram);
    156154        default:
  • uspace/srv/net/inetsrv/ndp.c

    r159bad57 r1d94e21  
    3838#include <mem.h>
    3939#include <malloc.h>
     40#include <io/log.h>
    4041#include <net/socket_codes.h>
    4142#include "ntrans.h"
     
    5455    {0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01, 0xff, 0, 0, 0};
    5556
     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 */
    5663static void ndp_solicited_node_mac(addr128_t ip_addr, addr48_t mac_addr)
    5764{
     
    6067}
    6168
     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 */
    6275static void ndp_solicited_node_ip(addr128_t ip_addr,
    6376    addr128_t ip_solicited)
     
    88101int ndp_received(inet_dgram_t *dgram)
    89102{
     103        log_msg(LOG_DEFAULT, LVL_DEBUG, "ndp_received()");
     104       
    90105        ndp_packet_t packet;
    91106        int rc = ndp_pdu_decode(dgram, &packet);
     
    100115       
    101116        inet_addrobj_t *laddr;
     117       
     118        log_msg(LOG_DEFAULT, LVL_DEBUG, "NDP PDU decoded; opcode: %d",
     119            packet.opcode);
    102120       
    103121        switch (packet.opcode) {
     
    138156}
    139157
     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 */
    140169int ndp_translate(addr128_t src_addr, addr128_t ip_addr, addr48_t mac_addr,
    141170    inet_link_t *ilink)
  • uspace/srv/net/inetsrv/pdu.c

    r159bad57 r1d94e21  
    4949#include "pdu.h"
    5050
    51 
    5251/** One's complement addition.
    5352 *
     
    274273}
    275274
     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 */
    276286int inet_pdu_decode(void *data, size_t size, inet_packet_t *packet)
    277287{
     
    337347}
    338348
     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 */
    339360int inet_pdu_decode6(void *data, size_t size, inet_packet_t *packet)
    340361{
     
    416437}
    417438
     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 */
    418447int ndp_pdu_encode(ndp_packet_t *ndp, inet_dgram_t *dgram)
    419448{
     
    468497}
    469498
     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 */
    470508int ndp_pdu_decode(inet_dgram_t *dgram, ndp_packet_t *ndp)
    471509{
Note: See TracChangeset for help on using the changeset viewer.