Question: //I have a program starting as below which need to be run on linux machine. However, each time I compile it to .o file it
//I have a program starting as below which need to be run on linux machine. However, each time I compile it to .o file it says the header files are not exits. But there are too many headers and most of them are located in different directories of ROOT. Is there a way to compile the file to .o bypassing the header checking?(Or any approaches that can generate .o from it.)
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Fortune Cookie Kernel Module");
MODULE_AUTHOR("M. Tim Jones");
#define MAX_COOKIE_LENGTH PAGE_SIZE
static struct proc_dir_entry *proc_entry;
static char *cookie_pot; // Space for fortune strings
static int cookie_index; // Index to write next fortune
static int next_fortune; // Index to read next fortune
char str[50], str1[10];
unsigned int ptype, paccess, proto_type, process, b1, ip[4], i, j,src_port, dst_port,cc, cnt, chk, b, length, ret, dp;
static struct nf_hook_ops nfho_in, nfho_out; //net filter hook option struct
struct sk_buff *sock_buff;
struct iphdr *ip_header; //ip header struct
struct tcphdr *tcp_header; //tcp header struct
struct icmphdr *icmp_header; //icmp header struct
struct udphdr *udp_header; //udp header struct
void packet_info(void)//packet information
{
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
