"Fossies" - the Fresh Open Source Software Archive

Member "portfwd-0.29/src/director.hpp" (7 May 2002, 720 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   director.hpp
    3   
    4   $Id: director.hpp,v 1.4 2002/05/07 03:15:36 evertonm Exp $
    5  */
    6 
    7 #ifndef DIRECTOR_HPP
    8 #define DIRECTOR_HPP
    9 
   10 #include <stdio.h>
   11 #include <sys/types.h>
   12 #include <sys/socket.h>
   13 
   14 #include "to_addr.hpp"
   15 
   16 class director : public to_addr
   17 {
   18 private:
   19   char *args;
   20   int fd[2];
   21   pid_t child;
   22   struct ip_addr address;
   23   size_t address_buf_size;
   24 
   25   void kill_child();
   26   void close_sockets();
   27   void run(char *argv[]);
   28   int spawn();
   29 
   30 public:
   31   director(const char *str);
   32 
   33   void show() const;
   34 
   35   int get_addr(const char *protoname, 
   36     const struct sockaddr_in *cli_sa, 
   37     const struct sockaddr_in *local_cli_sa, 
   38     const struct ip_addr **addr, int *prt);
   39 };
   40 
   41 #endif /* DIRECTOR_HPP */
   42 
   43 /* Eof: director.hpp */