Socket NKE UDP filter
Socket NKE UDP filter
- Subject: Socket NKE UDP filter
- From: Matt Jaffa <email@hidden>
- Date: Fri, 17 Dec 2004 20:36:34 -0700
Hi,
I have written a Socket NKE filter that filters UDP traffic, in the
send function I want to know
what the foreign ip address is and the port number.
I have tried a couple of ways, and both don't work: Here is what I have
tried:
static int
tl_send2(struct socket *so, struct sockaddr **nam, struct uio **uio,
struct mbuf **m, struct mbuf **control, int *flags, struct kextcb *kp)
{
boolean_t funnel_state;
funnel_state = thread_funnel_set(network_flock, TRUE);
printf("UDP: %d\n",current_proc()->p_pid);
if(nam && *nam) {
struct sockaddr_in * jk = (struct sockaddr_in *)*nam;
printf("Here: %s\n", inet_ntoa(jk->sin_addr));
printf("Sorry: %u\n", jk->sin_addr.s_addr);
} else { // what to do if it falls in the else clause?
printf("Sorry: It is not null jaffa\n");
}
(void)thread_funnel_set(network_flock, funnel_state);
return 0;
}
I need to know what to do if it falls in the else statement of this if
else.
Thanks,
Matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden