1 /*******************************************************************************
2 ********************************************************************************
4 Copyright (c) 2008 Ahmed S. Badran
6 Licensed under the FreeBSD License (see LICENSE)
9 Description: Implementation.
10 Created: 12/26/2008 04:40:59 PM PST
11 Author: Ahmed S. Badran (Ahmed B.), ahmed.badran@gmail.com
13 ********************************************************************************
14 *******************************************************************************/
16 #include <sys/socket.h>
17 #include <netinet/in.h>
18 #include <arpa/inet.h>
20 using namespace simple_comm
;
22 addr_ip::addr_ip (u8 a_
, u8 b_
, u8 c_
, u8 d_
):
23 a(a_
), b(b_
), c(c_
), d(d_
)
26 addr
.s_addr
= (a
<< 24) | (b
<< 16) | (c
<< 8) | d
;
27 name
= inet_ntoa(addr
);
37 addr_ip::clone () const
39 return new addr_ip(a
, b
, c
, d
);