X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FBSDSocketProtocol.hh;h=715837f4a26b72d80ec42bcb6812c0725b1ef4a8;hb=bd9f9d3fd6fbcff0112a7bf48ab9284da9576b11;hp=3b800c1b929f08941dee9bd6e470638d27119cf5;hpb=8d2d26f114d3df0a60c5c516fcf40671b1e55558;p=senf.git diff --git a/Socket/Protocols/BSDSocketProtocol.hh b/Socket/Protocols/BSDSocketProtocol.hh index 3b800c1..715837f 100644 --- a/Socket/Protocols/BSDSocketProtocol.hh +++ b/Socket/Protocols/BSDSocketProtocol.hh @@ -1,9 +1,9 @@ // $Id$ // // Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // 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 @@ -23,12 +23,12 @@ /** \file \brief BSDSocketProtocol public header */ -#ifndef HH_BSDSocketProtocol_ -#define HH_BSDSocketProtocol_ 1 +#ifndef HH_SENF_Socket_Protocols_BSDSocketProtocol_ +#define HH_SENF_Socket_Protocols_BSDSocketProtocol_ 1 // Custom includes -#include #include "../../Socket/SocketProtocol.hh" +#include //#include "BSDSocketProtocol.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -59,15 +59,42 @@ namespace senf { forever. \param[in] enable \c true to activate linger \param[in] timeout linger timeout in seconds */ - - struct timeval timestamp() const; ///< Return packet timestamp of last packet - /**< The returned timestamp represents the time, at which - the last network packet passed to the user has been - received from the network. This allows precise network - timing. - \returns timestamp when packet was received - \todo Move this to DatagramSocketProtocol class */ - }; + boost::uint8_t priority() const; ///< Get packet priority assigned to outgoing packets + /**< This call will return the priority value assigned to + packets sent via this socket. Depending on the + protocol, this value may also be placed inside the + packet headers (for IPv4, this is the TOS value). + \returns current socket priority */ + void priority(boost::uint8_t value) const; ///< Set packet priority (e.g. TOS) + /**< Changes the packet queueing priority. Additionally may + set protocol specific options. For IPv4 sockets, it + sets the TOS field. + \param[in] value new socket priority */ + + int error() const; ///< Get and clear pending socket error + /**< This call will get and clear a pending socket + error. This includes asynchronous errors received via + the network (e.g. via ICMP). */ + + unsigned rcvbuf() const; ///< Check receive buffer size + /**< \returns size of receive buffer in bytes + \internal Linux doubles the buffer size internally when + changing it to cater for additional space needed by + the linux kernel. This call will therefore return + only half the value reported by the kernel. */ + void rcvbuf(unsigned size) const; ///< Change receive buffer size + /**< \param[in] size new receive buffer size */ + + unsigned sndbuf() const; ///< Check send buffer size + /**< \returns size of send buffer in bytes + \internal Linux doubles the buffer size internally when + changing it to cater for additional space needed by + the linux kernel. This call will therefore return + only half the value reported by the kernel. */ + void sndbuf(unsigned size) const; ///< Change size of send buffer + /**< \param[in] size new send buffer size */ + + }; /** \brief Protocol facet providing basic connection oriented BSD socket functions