| version 1.210, 2005/02/02 21:41:55 |
version 1.211, 2005/02/03 22:56:42 |
| Line 283 static __inline int ipq_lock_try(void); |
|
| Line 283 static __inline int ipq_lock_try(void); |
|
| static __inline void ipq_unlock(void); |
static __inline void ipq_unlock(void); |
| |
|
| static __inline int |
static __inline int |
| ipq_lock_try() |
ipq_lock_try(void) |
| { |
{ |
| int s; |
int s; |
| |
|
|
|
| } |
} |
| |
|
| static __inline void |
static __inline void |
| ipq_unlock() |
ipq_unlock(void) |
| { |
{ |
| int s; |
int s; |
| |
|
| Line 395 ip_nmbclusters_changed(void) |
|
| Line 395 ip_nmbclusters_changed(void) |
|
| * All protocols not implemented in kernel go to raw IP protocol handler. |
* All protocols not implemented in kernel go to raw IP protocol handler. |
| */ |
*/ |
| void |
void |
| ip_init() |
ip_init(void) |
| { |
{ |
| const struct protosw *pr; |
const struct protosw *pr; |
| int i; |
int i; |
| Line 452 struct route ipforward_rt; |
|
| Line 452 struct route ipforward_rt; |
|
| * IP software interrupt routine |
* IP software interrupt routine |
| */ |
*/ |
| void |
void |
| ipintr() |
ipintr(void) |
| { |
{ |
| int s; |
int s; |
| struct mbuf *m; |
struct mbuf *m; |
|
|
| * is given as fp; otherwise have to make a chain. |
* is given as fp; otherwise have to make a chain. |
| */ |
*/ |
| struct mbuf * |
struct mbuf * |
| ip_reass(ipqe, fp, ipqhead) |
ip_reass(struct ipqent *ipqe, struct ipq *fp, struct ipqhead *ipqhead) |
| struct ipqent *ipqe; |
|
| struct ipq *fp; |
|
| struct ipqhead *ipqhead; |
|
| { |
{ |
| struct mbuf *m = ipqe->ipqe_m; |
struct mbuf *m = ipqe->ipqe_m; |
| struct ipqent *nq, *p, *q; |
struct ipqent *nq, *p, *q; |
|
|
| * associated datagrams. |
* associated datagrams. |
| */ |
*/ |
| void |
void |
| ip_freef(fp) |
ip_freef(struct ipq *fp) |
| struct ipq *fp; |
|
| { |
{ |
| struct ipqent *q, *p; |
struct ipqent *q, *p; |
| u_int nfrags = 0; |
u_int nfrags = 0; |
| Line 1345 ip_reass_drophalf(void) |
|
| Line 1341 ip_reass_drophalf(void) |
|
| * queue, discard it. |
* queue, discard it. |
| */ |
*/ |
| void |
void |
| ip_slowtimo() |
ip_slowtimo(void) |
| { |
{ |
| static u_int dropscanidx = 0; |
static u_int dropscanidx = 0; |
| u_int i; |
u_int i; |
|
|
| * Drain off all datagram fragments. |
* Drain off all datagram fragments. |
| */ |
*/ |
| void |
void |
| ip_drain() |
ip_drain(void) |
| { |
{ |
| |
|
| /* |
/* |
|
|
| * 0 if the packet should be processed further. |
* 0 if the packet should be processed further. |
| */ |
*/ |
| int |
int |
| ip_dooptions(m) |
ip_dooptions(struct mbuf *m) |
| struct mbuf *m; |
|
| { |
{ |
| struct ip *ip = mtod(m, struct ip *); |
struct ip *ip = mtod(m, struct ip *); |
| u_char *cp, *cp0; |
u_char *cp, *cp0; |
|
|
| * return internet address info of interface to be used to get there. |
* return internet address info of interface to be used to get there. |
| */ |
*/ |
| struct in_ifaddr * |
struct in_ifaddr * |
| ip_rtaddr(dst) |
ip_rtaddr(struct in_addr dst) |
| struct in_addr dst; |
|
| { |
{ |
| struct sockaddr_in *sin; |
struct sockaddr_in *sin; |
| |
|
|
|
| * to be picked up later by ip_srcroute if the receiver is interested. |
* to be picked up later by ip_srcroute if the receiver is interested. |
| */ |
*/ |
| void |
void |
| save_rte(option, dst) |
save_rte(u_char *option, struct in_addr dst) |
| u_char *option; |
|
| struct in_addr dst; |
|
| { |
{ |
| unsigned olen; |
unsigned olen; |
| |
|
| Line 1711 save_rte(option, dst) |
|
| Line 1703 save_rte(option, dst) |
|
| * The first hop is placed before the options, will be removed later. |
* The first hop is placed before the options, will be removed later. |
| */ |
*/ |
| struct mbuf * |
struct mbuf * |
| ip_srcroute() |
ip_srcroute(void) |
| { |
{ |
| struct in_addr *p, *q; |
struct in_addr *p, *q; |
| struct mbuf *m; |
struct mbuf *m; |
|
|
| * XXX should be deleted; last arg currently ignored. |
* XXX should be deleted; last arg currently ignored. |
| */ |
*/ |
| void |
void |
| ip_stripoptions(m, mopt) |
ip_stripoptions(struct mbuf *m, struct mbuf *mopt) |
| struct mbuf *m; |
|
| struct mbuf *mopt; |
|
| { |
{ |
| int i; |
int i; |
| struct ip *ip = mtod(m, struct ip *); |
struct ip *ip = mtod(m, struct ip *); |
| Line 1827 const int inetctlerrmap[PRC_NCMDS] = { |
|
| Line 1817 const int inetctlerrmap[PRC_NCMDS] = { |
|
| * via a source route. |
* via a source route. |
| */ |
*/ |
| void |
void |
| ip_forward(m, srcrt) |
ip_forward(struct mbuf *m, int srcrt) |
| struct mbuf *m; |
|
| int srcrt; |
|
| { |
{ |
| struct ip *ip = mtod(m, struct ip *); |
struct ip *ip = mtod(m, struct ip *); |
| struct sockaddr_in *sin; |
struct sockaddr_in *sin; |
| Line 2057 ip_forward(m, srcrt) |
|
| Line 2045 ip_forward(m, srcrt) |
|
| } |
} |
| |
|
| void |
void |
| ip_savecontrol(inp, mp, ip, m) |
ip_savecontrol(struct inpcb *inp, struct mbuf **mp, struct ip *ip, |
| struct inpcb *inp; |
struct mbuf *m) |
| struct mbuf **mp; |
|
| struct ip *ip; |
|
| struct mbuf *m; |
|
| { |
{ |
| |
|
| if (inp->inp_socket->so_options & SO_TIMESTAMP) { |
if (inp->inp_socket->so_options & SO_TIMESTAMP) { |