NEW FILE HEADER / COPYRIGHT FORMAT
[senf.git] / Socket / BufferingPolicy.cc
index 780b2a2..888062a 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS) 
+// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+//     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <errno.h>
-#include "Utils/Exception.hh"
+#include "../Utils/Exception.hh"
 
 //#include "BufferingPolicy.mpp"
 #define prefix_
@@ -42,7 +42,7 @@ prefix_ unsigned senf::SocketBufferingPolicy::rcvbuf(FileHandle handle)
     unsigned size;
     socklen_t len (sizeof(size));
     if (::getsockopt(handle.fd(),SOL_SOCKET,SO_RCVBUF,&size,&len) < 0)
-        throw SystemException(errno);
+        throwErrno();
     // Linux doubles the bufer size on setting the RCVBUF to cater for internal
     // headers. We fix this up here .. (see lkml FAQ)
     return size/2;
@@ -51,7 +51,7 @@ prefix_ unsigned senf::SocketBufferingPolicy::rcvbuf(FileHandle handle)
 prefix_ void senf::SocketBufferingPolicy::rcvbuf(FileHandle handle, unsigned size)
 {
     if (::setsockopt(handle.fd(),SOL_SOCKET,SO_RCVBUF,&size,sizeof(size)) < 0)
-        throw SystemException(errno);
+        throwErrno();
 }
 
 prefix_ unsigned senf::SocketBufferingPolicy::sndbuf(FileHandle handle)
@@ -59,7 +59,7 @@ prefix_ unsigned senf::SocketBufferingPolicy::sndbuf(FileHandle handle)
     unsigned size;
     socklen_t len (sizeof(size));
     if (::getsockopt(handle.fd(),SOL_SOCKET,SO_SNDBUF,&size,&len) < 0)
-        throw SystemException(errno);
+        throwErrno();
     // Linux doubles the bufer size on setting the SNDBUF to cater for internal
     // headers. We fix this up here .. (see lkml FAQ)
     return size/2;
@@ -69,7 +69,7 @@ prefix_ unsigned senf::SocketBufferingPolicy::sndbuf(FileHandle handle)
 prefix_ void senf::SocketBufferingPolicy::sndbuf(FileHandle handle, unsigned size)
 {
     if (::setsockopt(handle.fd(),SOL_SOCKET,SO_SNDBUF,&size,sizeof(size)) < 0)
-        throw SystemException(errno);
+        throwErrno();
 }
 
 ///////////////////////////////cc.e////////////////////////////////////////
@@ -83,4 +83,6 @@ prefix_ void senf::SocketBufferingPolicy::sndbuf(FileHandle handle, unsigned siz
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: