working commit

This commit is contained in:
Олег Бородин
2026-05-18 12:58:08 +02:00
parent 8758efeae8
commit e52e90c222
3 changed files with 4 additions and 27 deletions
+4 -4
View File
@@ -207,7 +207,7 @@ distcleancheck_listfiles = \
ACLOCAL = ${SHELL} '/home/ziggi/Projects/stvpn/missing' aclocal-1.17 ACLOCAL = ${SHELL} '/home/ziggi/Projects/stvpn/missing' aclocal-1.17
AMTAR = $${TAR-tar} AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1 AM_DEFAULT_VERBOSITY = 1
ASTYLE = /usr/bin/astyle ASTYLE = /bin/astyle
AUTOCONF = ${SHELL} '/home/ziggi/Projects/stvpn/missing' autoconf AUTOCONF = ${SHELL} '/home/ziggi/Projects/stvpn/missing' autoconf
AUTOHEADER = ${SHELL} '/home/ziggi/Projects/stvpn/missing' autoheader AUTOHEADER = ${SHELL} '/home/ziggi/Projects/stvpn/missing' autoheader
AUTOMAKE = ${SHELL} '/home/ziggi/Projects/stvpn/missing' automake-1.17 AUTOMAKE = ${SHELL} '/home/ziggi/Projects/stvpn/missing' automake-1.17
@@ -229,7 +229,7 @@ ECHO_N = -n
ECHO_T = ECHO_T =
ETAGS = etags ETAGS = etags
EXEEXT = EXEEXT =
INSTALL = /usr/bin/install -c INSTALL = /bin/install -c
INSTALL_DATA = ${INSTALL} -m 644 INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL} INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL} INSTALL_SCRIPT = ${INSTALL}
@@ -239,7 +239,7 @@ LIBOBJS =
LIBS = -Wl,--as-need -lprotobuf LIBS = -Wl,--as-need -lprotobuf
LTLIBOBJS = LTLIBOBJS =
MAKEINFO = ${SHELL} '/home/ziggi/Projects/stvpn/missing' makeinfo MAKEINFO = ${SHELL} '/home/ziggi/Projects/stvpn/missing' makeinfo
MKDIR_P = /usr/bin/mkdir -p MKDIR_P = /bin/mkdir -p
OBJEXT = o OBJEXT = o
PACKAGE = helmet PACKAGE = helmet
PACKAGE_BUGREPORT = PACKAGE_BUGREPORT =
@@ -249,7 +249,7 @@ PACKAGE_TARNAME = helmet
PACKAGE_URL = PACKAGE_URL =
PACKAGE_VERSION = 0.0.1 PACKAGE_VERSION = 0.0.1
PATH_SEPARATOR = : PATH_SEPARATOR = :
PROTOC = /usr/bin/protoc PROTOC = /bin/protoc
RANLIB = ranlib RANLIB = ranlib
SET_MAKE = SET_MAKE =
SHELL = /bin/bash SHELL = /bin/bash
-13
View File
@@ -11,19 +11,6 @@ extern "C" {
#include <resolver.hpp> #include <resolver.hpp>
Address::Address(std::string iaddress, int ifamily) {
address = iaddress;
family = ifamily;
}
int Address::GetFamily() {
return family;
}
std::string Address::GetAddress() {
return address;
}
std::expected<Address, std::string> Resolver::Resolve(std::string hostname) { std::expected<Address, std::string> Resolver::Resolve(std::string hostname) {
struct sockaddr_in sa; struct sockaddr_in sa;
if (inet_pton(AF_INET, hostname.data(), &(sa.sin_addr)) == 1) { if (inet_pton(AF_INET, hostname.data(), &(sa.sin_addr)) == 1) {
-10
View File
@@ -2,16 +2,6 @@
#include <expected> #include <expected>
#include <string> #include <string>
class Address {
private:
int family;
std::string address;
public:
Address(const std::string iaddress, const int ifamily);
int GetFamily();
std::string GetAddress();
};
class Resolver { class Resolver {
private: private:
int family; int family;