I have added a new system call that is used to initialize a global variable through userspace program. After initialization, I need to use that global variable in ~/net/ipv6/tcp_ipv6.c file. let say printing the value of that global variable.
So where should I declare that global variable.
Right now I have declare it in system call but the following error occured
CC [M] net/ipv6/tcp_ipv6.o
net/ipv6/tcp_ipv6.c: In function ‘tcp_v6_rcv’:
net/ipv6/tcp_ipv6.c:1313: error: ‘global_fd’ undeclared (first use in this function)
net/ipv6/tcp_ipv6.c:1313: error: (Each undeclared identifier is reported only once
net/ipv6/tcp_ipv6.c:1313: error: for each function it appears in.)
make: *** [net/ipv6/tcp_ipv6.o] Error 1
make: *** [net/ipv6] Error 2
make: *** [net] Error 2