View | Details | Raw Unified | Return to bug 2497
Collapse All | Expand All

(-)a/src/internet/model/arp-cache.h (-3 / +3 lines)
 Lines 22-27    Link Here 
22
22
23
#include <stdint.h>
23
#include <stdint.h>
24
#include <list>
24
#include <list>
25
#include <unordered_map>
25
#include "ns3/simulator.h"
26
#include "ns3/simulator.h"
26
#include "ns3/callback.h"
27
#include "ns3/callback.h"
27
#include "ns3/packet.h"
28
#include "ns3/packet.h"
 Lines 32-38    Link Here 
32
#include "ns3/ptr.h"
33
#include "ns3/ptr.h"
33
#include "ns3/object.h"
34
#include "ns3/object.h"
34
#include "ns3/traced-callback.h"
35
#include "ns3/traced-callback.h"
35
#include "ns3/sgi-hashmap.h"
36
#include "ns3/output-stream-wrapper.h"
36
#include "ns3/output-stream-wrapper.h"
37
37
38
namespace ns3 {
38
namespace ns3 {
 Lines 311-321    Link Here 
311
  /**
311
  /**
312
   * \brief ARP Cache container
312
   * \brief ARP Cache container
313
   */
313
   */
314
  typedef sgi::hash_map<Ipv4Address, ArpCache::Entry *, Ipv4AddressHash> Cache;
314
  typedef std::unordered_map<Ipv4Address, ArpCache::Entry *, Ipv4AddressHash> Cache;
315
  /**
315
  /**
316
   * \brief ARP Cache container iterator
316
   * \brief ARP Cache container iterator
317
   */
317
   */
318
  typedef sgi::hash_map<Ipv4Address, ArpCache::Entry *, Ipv4AddressHash>::iterator CacheI;
318
  typedef std::unordered_map<Ipv4Address, ArpCache::Entry *, Ipv4AddressHash>::iterator CacheI;
319
319
320
  virtual void DoDispose (void);
320
  virtual void DoDispose (void);
321
321
(-)a/src/internet/model/ndisc-cache.h (-3 / +3 lines)
 Lines 23-28    Link Here 
23
23
24
#include <stdint.h>
24
#include <stdint.h>
25
#include <list>
25
#include <list>
26
#include <unordered_map>
26
27
27
#include "ns3/packet.h"
28
#include "ns3/packet.h"
28
#include "ns3/nstime.h"
29
#include "ns3/nstime.h"
 Lines 30-36    Link Here 
30
#include "ns3/ipv6-address.h"
31
#include "ns3/ipv6-address.h"
31
#include "ns3/ptr.h"
32
#include "ns3/ptr.h"
32
#include "ns3/timer.h"
33
#include "ns3/timer.h"
33
#include "ns3/sgi-hashmap.h"
34
#include "ns3/output-stream-wrapper.h"
34
#include "ns3/output-stream-wrapper.h"
35
35
36
namespace ns3
36
namespace ns3
 Lines 403-413    Link Here 
403
  /**
403
  /**
404
   * \brief Neighbor Discovery Cache container
404
   * \brief Neighbor Discovery Cache container
405
   */
405
   */
406
  typedef sgi::hash_map<Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash> Cache;
406
  typedef std::unordered_map<Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash> Cache;
407
  /**
407
  /**
408
   * \brief Neighbor Discovery Cache container iterator
408
   * \brief Neighbor Discovery Cache container iterator
409
   */
409
   */
410
  typedef sgi::hash_map<Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash>::iterator CacheI;
410
  typedef std::unordered_map<Ipv6Address, NdiscCache::Entry *, Ipv6AddressHash>::iterator CacheI;
411
411
412
  /**
412
  /**
413
   * \brief Copy constructor.
413
   * \brief Copy constructor.
(-)a/src/network/utils/sgi-hashmap.h (-67 lines)
 Lines 1-67    Link Here 
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
 * Copyright (c) 2006 INRIA
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License version 2 as
7
 * published by the Free Software Foundation;
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 *
18
 * Author: Mathieu Lacage <mathieu.lacage@cutebugs.net>
19
 */
20
21
/* This code snippet was ripped out of the gcc 
22
 * documentation and slightly modified to work
23
 * with gcc 4.x
24
 */
25
#ifndef SGI_HASHMAP_H
26
#define SGI_HASHMAP_H
27
28
/* To use gcc extensions.
29
 */
30
#ifdef __GNUC__
31
  #if __GNUC__ < 3 // GCC 2.x
32
    #include <hash_map.h>
33
    namespace sgi { using ::hash_map; }; // inherit globals
34
  #else
35
    #if __GNUC__ < 4 // GCC 3.x
36
      #include <ext/hash_map>
37
      #if __GNUC_MINOR__ == 0
38
        namespace sgi = std; // GCC 3.0
39
      #else
40
        namespace sgi = ::__gnu_cxx; // GCC 3.1 and later
41
      #endif
42
    #else
43
       #if __GNUC__ < 5 // GCC 4.x
44
         #if __GNUC_MINOR__ < 3 // GCC 4.0, 4.1 and 4.2
45
           #ifdef __clang__ // Clang identifies as GCC 4.2
46
             #undef __DEPRECATED
47
           #endif
48
           #include <ext/hash_map>
49
           namespace sgi = ::__gnu_cxx;
50
         #else
51
           #undef __DEPRECATED
52
           #include <backward/hash_map>
53
           namespace sgi = ::__gnu_cxx;
54
         #endif
55
       #else // GCC 5.x
56
         #undef __DEPRECATED
57
         #include <backward/hash_map>
58
         namespace sgi = ::__gnu_cxx;
59
       #endif
60
     #endif
61
  #endif
62
#else      // ...  there are other compilers, right?
63
namespace sgi = std;
64
#endif
65
66
67
#endif /* SGI_HASHMAP_H */
(-)a/src/network/wscript (-1 lines)
 Lines 137-143    Link Here 
137
        'utils/queue-limits.h',
137
        'utils/queue-limits.h',
138
        'utils/radiotap-header.h',
138
        'utils/radiotap-header.h',
139
        'utils/sequence-number.h',
139
        'utils/sequence-number.h',
140
        'utils/sgi-hashmap.h',
141
        'utils/simple-channel.h',
140
        'utils/simple-channel.h',
142
        'utils/simple-net-device.h',
141
        'utils/simple-net-device.h',
143
        'utils/sll-header.h',
142
        'utils/sll-header.h',

Return to bug 2497