"Fossies" - the Fresh Open Source Software Archive

Member "portfwd-0.29/src/from_addr.hpp" (15 May 2001, 618 Bytes) of package /linux/privat/old/portfwd-0.29.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2   from_addr.hpp
    3   
    4   $Id: from_addr.hpp,v 1.1.1.1 2001/05/15 00:25:00 evertonm Exp $
    5  */
    6 
    7 #ifndef FROM_ADDR_HPP
    8 #define FROM_ADDR_HPP
    9 
   10 #include <stdio.h>
   11 #include <sys/types.h>
   12 #include <sys/socket.h>
   13 #include "port_pair.h"
   14 #include "net_portion.h"
   15 
   16 class from_addr
   17 {
   18 private:
   19   net_portion *np;
   20   port_pair   *pp;
   21 
   22   void pipe(const struct ip_addr *ip, int port) const;
   23 
   24 public:
   25   from_addr(net_portion *portion, port_pair *pair)
   26     {
   27       np = portion;
   28       pp = pair;
   29     }
   30 
   31   void show() const;
   32 
   33   int match(const struct ip_addr *ip, int port) const;
   34 };
   35 
   36 #endif /* FROM_ADDR_HPP */
   37 
   38 /* Eof: from_addr.hpp */