Deleted Added
sdiff udiff text old ( 11793:ef606668d247 ) new ( 13449:2f7efa89c58b )
full compact
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

--- 37 unchanged lines hidden (view full) ---

46#include "base/inet.hh"
47
48#include <cstddef>
49#include <cstdio>
50#include <sstream>
51#include <string>
52
53#include "base/cprintf.hh"
54#include "base/types.hh"
55
56using namespace std;
57namespace Net {
58
59EthAddr::EthAddr()
60{
61 memset(data, 0, ETH_ADDR_LEN);

--- 171 unchanged lines hidden (view full) ---

233uint16_t
234cksum(const TcpPtr &tcp)
235{
236 if (IpPtr(tcp.packet())) {
237 return __tu_cksum(IpPtr(tcp.packet()));
238 } else if (Ip6Ptr(tcp.packet())) {
239 return __tu_cksum6(Ip6Ptr(tcp.packet()));
240 } else {
241 assert(0);
242 }
243 // Should never reach here
244 return 0;
245}
246
247uint16_t
248cksum(const UdpPtr &udp)
249{
250 if (IpPtr(udp.packet())) {
251 return __tu_cksum(IpPtr(udp.packet()));
252 } else if (Ip6Ptr(udp.packet())) {
253 return __tu_cksum6(Ip6Ptr(udp.packet()));
254 } else {
255 assert(0);
256 }
257 return 0;
258}
259
260bool
261IpHdr::options(vector<const IpOpt *> &vec) const
262{
263 vec.clear();

--- 146 unchanged lines hidden ---