我有一个基本的问题,我不能为我的生活弄清楚.新来的C所以请耐心等待.
首先,我创建一个结构数组:
struct rule {
int *in; /* ingress flag */
int *out; /* egress flag */
char *actionvalue; /* actionvalue BLOCK or UNBLOCK */
char *proto; /* protocol e.g. UDP TCP ICMP */
char *ip_src; /* source and dest address */
int *srcport; /* src port */
char *net_src; /* source and dest netmask */
char *ip_dst; /* source and dest address */
int *dstport; /* dst port */
char *net_dst; /* source and dest netmask */
} rulelist[10]; …Run Code Online (Sandbox Code Playgroud)