trace.h (11820) | trace.h (11840) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Copyright (c) 1995 John Hay. All rights reserved. 6 * 7 * This file includes significant work done at Cornell University by 8 * Bill Nesheim. That work included by permission. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)trace.h 8.1 (Berkeley) 6/5/93 39 * | 1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Copyright (c) 1995 John Hay. All rights reserved. 6 * 7 * This file includes significant work done at Cornell University by 8 * Bill Nesheim. That work included by permission. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)trace.h 8.1 (Berkeley) 6/5/93 39 * |
40 * $Id: trace.h,v 1.4 1995/10/11 18:57:34 jhay Exp $ | 40 * $Id: trace.h,v 1.1 1995/10/26 21:28:30 julian Exp $ |
41 */ 42 43/* 44 * IPX Routing Information Protocol. 45 */ 46 47/* 48 * Trace record format. --- 29 unchanged lines hidden (view full) --- 78#define TRACE_ACTION(action, route) { \ 79 if (tracing) \ 80 traceaction(ftrace, "action", route); \ 81 } 82#define TRACE_INPUT(ifp, src, size) { \ 83 if (tracing) { \ 84 ifp = if_iflookup(src); \ 85 if (ifp) \ | 41 */ 42 43/* 44 * IPX Routing Information Protocol. 45 */ 46 47/* 48 * Trace record format. --- 29 unchanged lines hidden (view full) --- 78#define TRACE_ACTION(action, route) { \ 79 if (tracing) \ 80 traceaction(ftrace, "action", route); \ 81 } 82#define TRACE_INPUT(ifp, src, size) { \ 83 if (tracing) { \ 84 ifp = if_iflookup(src); \ 85 if (ifp) \ |
86 trace(&ifp->int_input, src, &packet[sizeof(struct ipxdp)], size, \ | 86 trace(&ifp->int_input, src, \ 87 &packet[sizeof(struct ipx)], size, \ |
87 ntohl(ifp->int_metric)); \ 88 } \ 89 if (tracepackets && ftrace) \ | 88 ntohl(ifp->int_metric)); \ 89 } \ 90 if (tracepackets && ftrace) \ |
90 dumppacket(ftrace, "from", src, &packet[sizeof(struct ipxdp)], size); \ | 91 dumppacket(ftrace, "from", src, \ 92 &packet[sizeof(struct ipx)], size); \ |
91 } 92#define TRACE_OUTPUT(ifp, dst, size) { \ 93 if (tracing) { \ 94 ifp = if_iflookup(dst); \ 95 if (ifp) \ | 93 } 94#define TRACE_OUTPUT(ifp, dst, size) { \ 95 if (tracing) { \ 96 ifp = if_iflookup(dst); \ 97 if (ifp) \ |
96 trace(&ifp->int_output, dst, &packet[sizeof(struct ipxdp)], size, ifp->int_metric); \ | 98 trace(&ifp->int_output, dst, \ 99 &packet[sizeof(struct ipx)], \ 100 size, ifp->int_metric); \ |
97 } \ 98 if (tracepackets && ftrace) \ | 101 } \ 102 if (tracepackets && ftrace) \ |
99 dumppacket(ftrace, "to", dst, &packet[sizeof(struct ipxdp)], size); \ | 103 dumppacket(ftrace, "to", dst, \ 104 &packet[sizeof(struct ipx)], size); \ |
100 } 101 102#define TRACE_SAP_OUTPUT(ifp, dst, size) { \ 103 if (tracing) { \ 104 ifp = if_iflookup(dst); \ 105 if (ifp) \ | 105 } 106 107#define TRACE_SAP_OUTPUT(ifp, dst, size) { \ 108 if (tracing) { \ 109 ifp = if_iflookup(dst); \ 110 if (ifp) \ |
106 trace(&ifp->int_output, dst, &packet[sizeof(struct ipxdp)], size, ifp->int_metric); \ | 111 trace(&ifp->int_output, dst, \ 112 &packet[sizeof(struct ipx)], \ 113 size, ifp->int_metric); \ |
107 } \ 108 if (tracepackets && ftrace) \ | 114 } \ 115 if (tracepackets && ftrace) \ |
109 dumpsappacket(ftrace, "to", dst, &packet[sizeof(struct ipxdp)], size); \ | 116 dumpsappacket(ftrace, "to", dst, \ 117 &packet[sizeof(struct ipx)], size); \ |
110 } 111 112void traceinit(struct interface *); 113void traceon(char *file); 114void traceoff(void); 115void traceaction(FILE *, char *, struct rt_entry *); 116void trace(struct ifdebug *, struct sockaddr *, char *, int, int); 117void dumppacket(FILE *, char *, struct sockaddr *, char *, int); 118void dumpsappacket(FILE *, char *, struct sockaddr *, char *, int); 119void dumpsaptable(FILE *fd, struct sap_hash *sh); 120 121char *ipxdp_nettoa(union ipx_net); 122char *ipxdp_ntoa(struct ipx_addr *); 123 | 118 } 119 120void traceinit(struct interface *); 121void traceon(char *file); 122void traceoff(void); 123void traceaction(FILE *, char *, struct rt_entry *); 124void trace(struct ifdebug *, struct sockaddr *, char *, int, int); 125void dumppacket(FILE *, char *, struct sockaddr *, char *, int); 126void dumpsappacket(FILE *, char *, struct sockaddr *, char *, int); 127void dumpsaptable(FILE *fd, struct sap_hash *sh); 128 129char *ipxdp_nettoa(union ipx_net); 130char *ipxdp_ntoa(struct ipx_addr *); 131 |