Changeset 8565a42 in mainline for uspace/srv/net/inetsrv/ndp.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (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.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/inetsrv/ndp.c

    r3061bc1 r8565a42  
    6868        inet_dgram_t dgram;
    6969        ndp_pdu_encode(packet, &dgram);
    70        
     70
    7171        inet_link_send_dgram6(link, packet->target_hw_addr, &dgram,
    7272            IP_PROTO_ICMPV6, INET6_HOP_LIMIT_MAX, 0);
    73        
     73
    7474        free(dgram.data);
    75        
     75
    7676        return EOK;
    7777}
     
    8686{
    8787        log_msg(LOG_DEFAULT, LVL_DEBUG, "ndp_received()");
    88        
     88
    8989        ndp_packet_t packet;
    9090        errno_t rc = ndp_pdu_decode(dgram, &packet);
    9191        if (rc != EOK)
    9292                return rc;
    93        
     93
    9494        inet_addr_t sender;
    9595        inet_addr_set6(packet.sender_proto_addr, &sender);
    96        
     96
    9797        inet_addr_t target;
    9898        inet_addr_set6(packet.target_proto_addr, &target);
    99        
     99
    100100        inet_addrobj_t *laddr;
    101        
     101
    102102        log_msg(LOG_DEFAULT, LVL_DEBUG, "NDP PDU decoded; opcode: %d",
    103103            packet.opcode);
    104        
     104
    105105        switch (packet.opcode) {
    106106        case ICMPV6_NEIGHBOUR_SOLICITATION:
     
    111111                        if (rc != EOK)
    112112                                return rc;
    113                        
     113
    114114                        ndp_packet_t reply;
    115                        
     115
    116116                        reply.opcode = ICMPV6_NEIGHBOUR_ADVERTISEMENT;
    117117                        addr48(laddr->ilink->mac, reply.sender_hw_addr);
     
    119119                        addr48(packet.sender_hw_addr, reply.target_hw_addr);
    120120                        addr128(packet.sender_proto_addr, reply.target_proto_addr);
    121                        
     121
    122122                        ndp_send_packet(laddr->ilink, &reply);
    123123                }
    124                
     124
    125125                break;
    126126        case ICMPV6_NEIGHBOUR_ADVERTISEMENT:
     
    129129                        return ntrans_add(packet.sender_proto_addr,
    130130                            packet.sender_hw_addr);
    131                
     131
    132132                break;
    133133        case ICMPV6_ROUTER_ADVERTISEMENT:
     
    136136                return ENOTSUP;
    137137        }
    138        
     138
    139139        return EOK;
    140140}
     
    159159                return EOK;
    160160        }
    161        
     161
    162162        errno_t rc = ntrans_lookup(ip_addr, mac_addr);
    163163        if (rc == EOK)
    164164                return EOK;
    165        
     165
    166166        ndp_packet_t packet;
    167        
     167
    168168        packet.opcode = ICMPV6_NEIGHBOUR_SOLICITATION;
    169169        addr48(ilink->mac, packet.sender_hw_addr);
     
    172172        addr48_solicited_node(ip_addr, packet.target_hw_addr);
    173173        ndp_solicited_node_ip(ip_addr, packet.target_proto_addr);
    174        
     174
    175175        rc = ndp_send_packet(ilink, &packet);
    176176        if (rc != EOK)
    177177                return rc;
    178        
     178
    179179        (void) ntrans_wait_timeout(NDP_REQUEST_TIMEOUT);
    180        
     180
    181181        return ntrans_lookup(ip_addr, mac_addr);
    182182}
Note: See TracChangeset for help on using the changeset viewer.