* tunneling and relaying of packets of any protocol.
*
*
- * Copyright (C) 2007-2008 Othmar Gsenger, Erwin Nindl,
+ * Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl,
* Christian Pointner <satp@wirdorange.org>
*
* This file is part of Anytun.
*
* Anytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
*
* Anytun is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "../datatypes.h"
#include "../connectionParam.h"
#include "../networkAddress.h"
-typedef std::map<u_int16_t, ConnectionParam> ConnectionMap;
+typedef std::map<uint16_t, ConnectionParam> ConnectionMap;
class ConnectionList
{
public:
- ConnectionList();
- ~ConnectionList();
- void addConnection(ConnectionParam &conn, u_int16_t mux);
- const ConnectionMap::iterator getConnection(u_int16_t mux);
- const ConnectionMap::iterator getEnd();
- ConnectionMap::iterator getEndUnlocked();
- ConnectionMap::iterator getBeginUnlocked();
- ConnectionParam & getOrNewConnectionUnlocked(u_int16_t mux);
- bool empty();
- void clear();
+ ConnectionList();
+ ~ConnectionList();
+ void addConnection(ConnectionParam& conn, uint16_t mux);
+ const ConnectionMap::iterator getConnection(uint16_t mux);
+ const ConnectionMap::iterator getEnd();
+ ConnectionMap::iterator getEndUnlocked();
+ ConnectionMap::iterator getBeginUnlocked();
+ ConnectionParam& getOrNewConnectionUnlocked(uint16_t mux);
+ bool empty();
+ void clear();
Mutex& getMutex();
private:
- ConnectionList(const ConnectionList &s);
- void operator=(const ConnectionList &s);
- ConnectionMap connections_;
+ ConnectionList(const ConnectionList& s);
+ void operator=(const ConnectionList& s);
+ ConnectionMap connections_;
Mutex mutex_;
};