mirror of
https://github.com/ChronosX88/netsukuku.git
synced 2024-11-26 04:02:19 +00:00
ntk: Clean up console spawning
* Fix a few incorrect header dependencies
This commit is contained in:
parent
c92713f4d5
commit
cf9063f92b
@ -35,7 +35,8 @@ sources_netsukuku = Split("""accept.c llist.c ipv6-gmp.c inet.c request.c map.c
|
|||||||
dnslib.c andns.c andns_net.c andns_snsd.c
|
dnslib.c andns.c andns_net.c andns_snsd.c
|
||||||
ll_map.c libnetlink.c if.c krnl_route.c krnl_rule.c
|
ll_map.c libnetlink.c if.c krnl_route.c krnl_rule.c
|
||||||
iptunnel.c route.c conf.c dns_wrapper.c igs.c mark.c
|
iptunnel.c route.c conf.c dns_wrapper.c igs.c mark.c
|
||||||
libiptc/libip4tc.c libping.c netsukuku.c""") + sources_common
|
libiptc/libip4tc.c libping.c ntk-console-server.c
|
||||||
|
netsukuku.c""") + sources_common
|
||||||
sources_ntkresolv = sources_common + Split("""andns_lib.c ntkresolv.c andns_net.c
|
sources_ntkresolv = sources_common + Split("""andns_lib.c ntkresolv.c andns_net.c
|
||||||
crypto.c snsd_cache.c inet.c
|
crypto.c snsd_cache.c inet.c
|
||||||
ll_map.c libnetlink.c
|
ll_map.c libnetlink.c
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#ifndef GMAP_H
|
#ifndef GMAP_H
|
||||||
#define GMAP_H
|
#define GMAP_H
|
||||||
|
|
||||||
|
#include "includes.h"
|
||||||
#include "llist.c"
|
#include "llist.c"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#ifndef MAP_H
|
#ifndef MAP_H
|
||||||
#define MAP_H
|
#define MAP_H
|
||||||
|
|
||||||
|
#include "includes.h"
|
||||||
#include "inet.h"
|
#include "inet.h"
|
||||||
|
|
||||||
/* Generic map defines */
|
/* Generic map defines */
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include "radar.h"
|
#include "radar.h"
|
||||||
#include "hook.h"
|
#include "hook.h"
|
||||||
#include "rehook.h"
|
#include "rehook.h"
|
||||||
#include "ntk-console-bindings.c"
|
#include "ntk-console-server.h"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
|
||||||
@ -420,16 +420,14 @@ check_excluded();
|
|||||||
freeifaddrs(addrs);
|
freeifaddrs(addrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *console_recv_send1(void *void_ptr){
|
|
||||||
console_recv_send();
|
|
||||||
}
|
|
||||||
|
|
||||||
int ntk_thread_creatation(void) {
|
void
|
||||||
|
ntk_thread_creatation(void) {
|
||||||
int x;
|
int x;
|
||||||
pthread_t console_recv_send_thread;
|
pthread_t console_recv_send_thread;
|
||||||
if(pthread_create(&console_recv_send_thread, NULL, console_recv_send1, &x)) {
|
if(pthread_create(&console_recv_send_thread, NULL, &console_recv_send, &x)) {
|
||||||
fprintf(stderr, "Error creating thread\n");
|
fprintf(stderr, "Error creating thread\n");
|
||||||
return -1;
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <utmp.h>
|
#include <utmp.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@ -203,9 +204,13 @@ wait_session(int server_fd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void*
|
||||||
console_recv_send(void)
|
console_recv_send(void *arg)
|
||||||
{
|
{
|
||||||
|
char* uargv;
|
||||||
|
|
||||||
opensocket();
|
opensocket();
|
||||||
wait_session(serverfd);
|
wait_session(serverfd);
|
||||||
|
|
||||||
|
return uargv;
|
||||||
}
|
}
|
8
src/ntk-console-server.h
Normal file
8
src/ntk-console-server.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef NTKCONSOLESERVER_H
|
||||||
|
#define NTKCONSOLESERVER_H
|
||||||
|
|
||||||
|
|
||||||
|
void* console_recv_send(void *arg);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* NTKCONSOLESERVER_H */
|
Loading…
Reference in New Issue
Block a user