ip_options.h (1829d5da5355930d5cfa8ec8add8ff47dc0bebab) | ip_options.h (ef39adf007d3a9125dc4a03ece5a586c1519e8b8) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1993 | 1/* 2 * Copyright (c) 1982, 1986, 1993 |
3 * The Regents of the University of California. 4 * Copyright (c) 2005 Andre Oppermann, Internet Business Solutions AG. 5 * All rights reserved. | 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 2005 5 * Andre Oppermann, Internet Business Solutions AG. All right reserved. |
6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the --- 15 unchanged lines hidden (view full) --- 29 * SUCH DAMAGE. 30 * 31 * $FreeBSD$ 32 */ 33 34#ifndef _NETINET_IP_OPTIONS_H_ 35#define _NETINET_IP_OPTIONS_H_ 36 | 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the --- 15 unchanged lines hidden (view full) --- 29 * SUCH DAMAGE. 30 * 31 * $FreeBSD$ 32 */ 33 34#ifndef _NETINET_IP_OPTIONS_H_ 35#define _NETINET_IP_OPTIONS_H_ 36 |
37/* 38 * Structure stored in mbuf in inpcb.ip_options 39 * and passed to ip_output when ip options are in use. 40 * The actual length of the options (including ipopt_dst) 41 * is in m_len. 42 */ 43#define MAX_IPOPTLEN 40 44 |
|
37struct ipoptrt { 38 struct in_addr dst; /* final destination */ 39 char nop; /* one NOP to align */ 40 char srcopt[IPOPT_OFFSET + 1]; /* OPTVAL, OLEN and OFFSET */ 41 struct in_addr route[MAX_IPOPTLEN/sizeof(struct in_addr)]; 42}; 43 44struct ipopt_tag { 45 struct m_tag tag; /* m_tag */ 46 int ip_nhops; 47 struct ipoptrt ip_srcrt; 48}; 49 | 45struct ipoptrt { 46 struct in_addr dst; /* final destination */ 47 char nop; /* one NOP to align */ 48 char srcopt[IPOPT_OFFSET + 1]; /* OPTVAL, OLEN and OFFSET */ 49 struct in_addr route[MAX_IPOPTLEN/sizeof(struct in_addr)]; 50}; 51 52struct ipopt_tag { 53 struct m_tag tag; /* m_tag */ 54 int ip_nhops; 55 struct ipoptrt ip_srcrt; 56}; 57 |
58struct ipoption { 59 struct in_addr ipopt_dst; /* first-hop dst if source routed */ 60 char ipopt_list[MAX_IPOPTLEN]; /* options proper */ 61}; 62 |
|
50extern int ip_doopts; /* process or ignore IP options */ 51 | 63extern int ip_doopts; /* process or ignore IP options */ 64 |
52int ip_checkrouteralert(struct mbuf *); 53int ip_dooptions(struct mbuf *, int); 54struct mbuf *ip_insertoptions(struct mbuf *, struct mbuf *, int *); 55int ip_optcopy(struct ip *, struct ip *); 56int ip_pcbopts(struct inpcb *, int, struct mbuf *); 57void ip_stripoptions(struct mbuf *, struct mbuf *); 58struct mbuf *ip_srcroute(struct mbuf *); | 65int ip_dooptions(struct mbuf *, int); 66struct mbuf * 67 ip_insertoptions(struct mbuf *, struct mbuf *, int *); 68int ip_optcopy(struct ip *, struct ip *); 69int ip_pcbopts(struct inpcb *, int, struct mbuf *); 70void ip_stripoptions(struct mbuf *, struct mbuf *); 71struct mbuf * 72 ip_srcroute(struct mbuf *); |
59 60#endif /* !_NETINET_IP_OPTIONS_H_ */ | 73 74#endif /* !_NETINET_IP_OPTIONS_H_ */ |