src/internet-stack/netfilter-tuple-hash.h
author Qasim Javed <qasimj@gmail.com>
Thu Aug 06 01:55:49 2009 +0600 (2009-08-06)
changeset 4638 19aa5f9b4bdf
parent 4635 91e75d702791
permissions -rw-r--r--
Source NAT working! Run (examples/netfilter-example.cc)
qasimj@4634
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
qasimj@4634
     2
/* 
qasimj@4634
     3
 * Copyright (c) 2009 University of Texas at Dallas
qasimj@4634
     4
 * 
qasimj@4634
     5
 * This program is free software; you can redistribute it and/or modify
qasimj@4634
     6
 * it under the terms of the GNU General Public License version 2 as
qasimj@4634
     7
 * published by the Free Software Foundation;
qasimj@4634
     8
 *
qasimj@4634
     9
 * This program is distributed in the hope that it will be useful,
qasimj@4634
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
qasimj@4634
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
qasimj@4634
    12
 * GNU General Public License for more details.
qasimj@4634
    13
 *
qasimj@4634
    14
 * You should have received a copy of the GNU General Public License
qasimj@4634
    15
 * along with this program; if not, write to the Free Software
qasimj@4634
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
qasimj@4634
    17
 * 
qasimj@4634
    18
 * Author: Qasim Javed <qasim@utdallas.edu>
qasimj@4634
    19
 */
qasimj@4634
    20
#ifndef NETFILTER_TUPLE_HASH
qasimj@4634
    21
#define NETFILTER_TUPLE_HASH
qasimj@4634
    22
qasimj@4634
    23
#include "netfilter-conntrack-tuple.h"
qasimj@4634
    24
#include "ip-conntrack-info.h"
qasimj@4634
    25
#include "sgi-hashmap.h"
qasimj@4634
    26
qasimj@4634
    27
namespace ns3 {
qasimj@4634
    28
  typedef sgi::hash_map<NetfilterConntrackTuple, IpConntrackInfo, ConntrackTupleHash> TupleHash;
qasimj@4634
    29
  typedef sgi::hash_map<NetfilterConntrackTuple, IpConntrackInfo, ConntrackTupleHash>::iterator TupleHashI;
qasimj@4635
    30
  
qasimj@4638
    31
  typedef sgi::hash_map<NetfilterConntrackTuple, NetfilterConntrackTuple, ConntrackTupleHash> TranslationMap;
qasimj@4638
    32
  typedef sgi::hash_map<NetfilterConntrackTuple, NetfilterConntrackTuple, ConntrackTupleHash>::iterator TranslationMapI;
qasimj@4638
    33
  
qasimj@4634
    34
  class NetfilterTupleHash {
qasimj@4634
    35
    public:
qasimj@4634
    36
qasimj@4634
    37
    private:
qasimj@4634
    38
      TupleHash m_tupleHash;
qasimj@4634
    39
  };
qasimj@4634
    40
}
qasimj@4634
    41
qasimj@4634
    42
#endif /* NETFILTER_TUPLE_HASH */