"Fossies" - the Fresh Open Source Software Archive 
Member "portfwd-0.29/src/dst_addr.hpp" (7 May 2002, 721 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 dst_addr.hpp
3
4 $Id: dst_addr.hpp,v 1.3 2002/05/07 03:15:36 evertonm Exp $
5 */
6
7 #ifndef DST_ADDR_HPP
8 #define DST_ADDR_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 dst_addr : public to_addr
17 {
18 private:
19 char *name;
20 struct ip_addr address;
21 int port;
22
23 public:
24 dst_addr(char *hostname, struct ip_addr addr, int prt)
25 {
26 name = hostname;
27 address = addr;
28 port = prt;
29 }
30
31 void show() const;
32
33 int get_addr(const char *protoname,
34 const struct sockaddr_in *cli_sa,
35 const struct sockaddr_in *local_cli_sa,
36 const struct ip_addr **addr, int *prt);
37 };
38
39 #endif /* DST_ADDR_HPP */
40
41 /* Eof: dst_addr.hpp */