inet.cc (9955:5d8722ab804b) | inet.cc (10251:878f2f30b12d) |
---|---|
1/* 2 * Copyright (c) 2013 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 48 unchanged lines hidden (view full) --- 57 58EthAddr::EthAddr() 59{ 60 memset(data, 0, ETH_ADDR_LEN); 61} 62 63EthAddr::EthAddr(const uint8_t ea[ETH_ADDR_LEN]) 64{ | 1/* 2 * Copyright (c) 2013 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 48 unchanged lines hidden (view full) --- 57 58EthAddr::EthAddr() 59{ 60 memset(data, 0, ETH_ADDR_LEN); 61} 62 63EthAddr::EthAddr(const uint8_t ea[ETH_ADDR_LEN]) 64{ |
65 *data = *ea; | 65 for (int i = 0; i < ETH_ADDR_LEN; ++i) 66 data[i] = ea[i]; |
66} 67 68EthAddr::EthAddr(const eth_addr &ea) 69{ | 67} 68 69EthAddr::EthAddr(const eth_addr &ea) 70{ |
70 *data = *ea.data; | 71 for (int i = 0; i < ETH_ADDR_LEN; ++i) 72 data[i] = ea.data[i]; |
71} 72 73EthAddr::EthAddr(const std::string &addr) 74{ 75 parse(addr); 76} 77 78const EthAddr & --- 328 unchanged lines hidden --- | 73} 74 75EthAddr::EthAddr(const std::string &addr) 76{ 77 parse(addr); 78} 79 80const EthAddr & --- 328 unchanged lines hidden --- |