Changeset 1d94e21 in mainline for uspace/srv/net/inetsrv/ndp.c


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.