X-Git-Url: https://git.syn-net.org/debian/?a=blobdiff_plain;f=src%2Fanyrtpproxy%2FportWindow.h;h=d552ae136894277bc49d128e49bc861071cce392;hb=bd02a5f6be4815d46524d613f727199ca756c971;hp=f3bdffbb0a1e1553890195672258b06538bda083;hpb=058ae090a970436caec3b3059e9e18b310dd6b0d;p=anytun.git diff --git a/src/anyrtpproxy/portWindow.h b/src/anyrtpproxy/portWindow.h index f3bdffb..d552ae1 100644 --- a/src/anyrtpproxy/portWindow.h +++ b/src/anyrtpproxy/portWindow.h @@ -11,14 +11,15 @@ * 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 * * 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 @@ -39,26 +40,26 @@ class PortWindow { public: - typedef std::set PortSet; + typedef std::set PortSet; - PortWindow(u_int16_t,u_int16_t); + PortWindow(uint16_t,uint16_t); ~PortWindow(); PortSet::size_type getLength(); - bool hasPort(u_int16_t); - bool freePort(u_int16_t); - u_int16_t newPort(); + bool hasPort(uint16_t); + bool freePort(uint16_t); + uint16_t newPort(); void clear(); private: - u_int16_t start_port_; - u_int16_t end_port_; + uint16_t start_port_; + uint16_t end_port_; ::Mutex mutex_; - PortSet ports_; + PortSet ports_; - PortWindow(const PortWindow &s); - void operator=(const PortWindow &s); + PortWindow(const PortWindow& s); + void operator=(const PortWindow& s); }; #endif