Compare commits
5 Commits
07e991223f
...
master
Author | SHA1 | Date | |
---|---|---|---|
5df38a4e97 | |||
862fb9f944 | |||
8c05336c73 | |||
94e9ba3b57 | |||
ad0966f749 |
5
Makefile
5
Makefile
@@ -40,9 +40,11 @@ install: $(LIB_FILE)
|
|||||||
install -d $(DESTDIR)$(PREFIX)/include
|
install -d $(DESTDIR)$(PREFIX)/include
|
||||||
install -m 644 easysock.h $(DESTDIR)$(PREFIX)/include
|
install -m 644 easysock.h $(DESTDIR)$(PREFIX)/include
|
||||||
|
|
||||||
|
install -m 644 docs/man3/*.gz /usr/share/man/man3/
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm *.o
|
rm easysock.o
|
||||||
rm $(LIB_FILE)
|
rm $(LIB_FILE)
|
||||||
|
|
||||||
|
|
||||||
@@ -50,3 +52,4 @@ clean:
|
|||||||
uninstall:
|
uninstall:
|
||||||
rm $(DESTDIR)$(PREFIX)/lib/$(LIB_FILE)
|
rm $(DESTDIR)$(PREFIX)/lib/$(LIB_FILE)
|
||||||
rm $(DESTDIR)$(PREFIX)/include/easysock.h
|
rm $(DESTDIR)$(PREFIX)/include/easysock.h
|
||||||
|
|
||||||
|
BIN
docs/man3/char_to_socktype.3.gz
Normal file
BIN
docs/man3/char_to_socktype.3.gz
Normal file
Binary file not shown.
BIN
docs/man3/check_ip_ver.3.gz
Normal file
BIN
docs/man3/check_ip_ver.3.gz
Normal file
Binary file not shown.
BIN
docs/man3/create_addr.3.gz
Normal file
BIN
docs/man3/create_addr.3.gz
Normal file
Binary file not shown.
BIN
docs/man3/create_local.3.gz
Normal file
BIN
docs/man3/create_local.3.gz
Normal file
Binary file not shown.
BIN
docs/man3/create_remote.3.gz
Normal file
BIN
docs/man3/create_remote.3.gz
Normal file
Binary file not shown.
BIN
docs/man3/create_socket.3.gz
Normal file
BIN
docs/man3/create_socket.3.gz
Normal file
Binary file not shown.
BIN
docs/man3/easysock.3.gz
Normal file
BIN
docs/man3/easysock.3.gz
Normal file
Binary file not shown.
BIN
docs/man3/inet_to_int.3.gz
Normal file
BIN
docs/man3/inet_to_int.3.gz
Normal file
Binary file not shown.
BIN
docs/man3/int_to_inet.3.gz
Normal file
BIN
docs/man3/int_to_inet.3.gz
Normal file
Binary file not shown.
@@ -62,7 +62,7 @@ int create_local (int network, char transport, char* address, int port,struct so
|
|||||||
} else if (network == 6) {
|
} else if (network == 6) {
|
||||||
addrlen = sizeof(struct sockaddr_in6);
|
addrlen = sizeof(struct sockaddr_in6);
|
||||||
} else {
|
} else {
|
||||||
return -207;
|
return -202;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The value of addrlen should be the size of the 'sockaddr'.
|
/* The value of addrlen should be the size of the 'sockaddr'.
|
||||||
@@ -94,7 +94,7 @@ int create_remote (int network,char transport,char* address,int port,struct sock
|
|||||||
|
|
||||||
err_code = getaddrinfo(address,port_str,&hints,&results);
|
err_code = getaddrinfo(address,port_str,&hints,&results);
|
||||||
if (err_code != 0) {
|
if (err_code != 0) {
|
||||||
exit(err_code);
|
return (-1 * err_code);
|
||||||
}
|
}
|
||||||
remote_addr_struct = results->ai_addr;
|
remote_addr_struct = results->ai_addr;
|
||||||
network = inet_to_int(results->ai_family);
|
network = inet_to_int(results->ai_family);
|
||||||
@@ -113,7 +113,7 @@ int create_remote (int network,char transport,char* address,int port,struct sock
|
|||||||
} else if (network == 6) {
|
} else if (network == 6) {
|
||||||
addrlen = sizeof(struct sockaddr_in6);
|
addrlen = sizeof(struct sockaddr_in6);
|
||||||
} else {
|
} else {
|
||||||
return (-1 * errno);
|
return (-202);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The value of addrlen should be the size of the 'sockaddr'.
|
/* The value of addrlen should be the size of the 'sockaddr'.
|
||||||
@@ -145,7 +145,7 @@ int int_to_inet(int network) {
|
|||||||
} else if (network == 6) {
|
} else if (network == 6) {
|
||||||
return AF_INET6;
|
return AF_INET6;
|
||||||
} else {
|
} else {
|
||||||
return -207;
|
return -202;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user