removed some useless spaces; not very important, I know :)
[senf.git] / Socket / Protocols / Raw / PacketSocketHandle.cc
index ca9a07a..05eef45 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
@@ -51,21 +51,15 @@ prefix_ void senf::PacketProtocol::init_client(SocketType type, int protocol)
     int sock = ::socket(PF_PACKET, socktype, htons(protocol));
     if (sock < 0)
         throwErrno();
-    body().fd(sock);
-}
-
-prefix_ std::auto_ptr<senf::SocketProtocol> senf::PacketProtocol::clone()
-    const
-{
-    return std::auto_ptr<SocketProtocol>(new PacketProtocol());
+    fd(sock);
 }
 
 prefix_ unsigned senf::PacketProtocol::available()
     const
 {
-    if (! body().readable())
+    if (! fh().readable())
         return 0;
-    ssize_t l = ::recv(body().fd(),0,0,MSG_PEEK | MSG_TRUNC);
+    ssize_t l = ::recv(fd(),0,0,MSG_PEEK | MSG_TRUNC);
     if (l < 0)
         throwErrno();
     return l;
@@ -100,14 +94,14 @@ prefix_ void senf::PacketProtocol::mcAdd(std::string const & interface,
                                          MACAddress const & address)
     const
 {
-    do_mc(body().fd(),interface,address,true);
+    do_mc(fd(),interface,address,true);
 }
 
 prefix_ void senf::PacketProtocol::mcDrop(std::string const & interface,
                                           MACAddress const & address)
     const
 {
-    do_mc(body().fd(),interface,address,false);
+    do_mc(fd(),interface,address,false);
 }
 
 ///////////////////////////////cc.e////////////////////////////////////////