| version 1.19, 1995/06/12 06:24:22 |
version 1.20, 1995/06/12 06:46:40 |
| Line 365 udp_ctlinput(cmd, sa, ip) |
|
| Line 365 udp_ctlinput(cmd, sa, ip) |
|
| { |
{ |
| register struct udphdr *uh; |
register struct udphdr *uh; |
| extern struct in_addr zeroin_addr; |
extern struct in_addr zeroin_addr; |
| extern u_char inetctlerrmap[]; |
extern int inetctlerrmap[], errno; |
| void (*notify) __P((struct inpcb *, int)) = udp_notify; |
void (*notify) __P((struct inpcb *, int)) = udp_notify; |
| |
|
| |
if ((unsigned)cmd >= PRC_NCMDS) |
| |
return; |
| |
errno = inetctlerrmap[cmd]; |
| if (PRC_IS_REDIRECT(cmd)) |
if (PRC_IS_REDIRECT(cmd)) |
| notify = in_rtchange, ip = 0; |
notify = in_rtchange, ip = 0; |
| else if (cmd == PRC_HOSTDEAD) |
else if (cmd == PRC_HOSTDEAD) |
| ip = 0; |
ip = 0; |
| else if ((unsigned)cmd >= PRC_NCMDS || inetctlerrmap[cmd] == 0) |
else if (errno = 0) |
| return; |
return; |
| if (ip) { |
if (ip) { |
| uh = (struct udphdr *)((caddr_t)ip + (ip->ip_hl << 2)); |
uh = (struct udphdr *)((caddr_t)ip + (ip->ip_hl << 2)); |
| in_pcbnotify(&udbtable, sa, uh->uh_dport, ip->ip_src, |
in_pcbnotify(&udbtable, sa, uh->uh_dport, ip->ip_src, |
| uh->uh_sport, cmd, notify); |
uh->uh_sport, errno, notify); |
| } else |
} else |
| in_pcbnotifyall(&udbtable, sa, cmd, notify); |
in_pcbnotifyall(&udbtable, sa, errno, notify); |
| } |
} |
| |
|
| int |
int |