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.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) \ |
86 trace(&ifp->int_input, src, \ 87 &packet[sizeof(struct ipx)], size, \ |
88 ntohl(ifp->int_metric)); \ 89 } \ 90 if (tracepackets && ftrace) \ |
91 dumppacket(ftrace, "from", src, \ 92 &packet[sizeof(struct ipx)], size); \ |
93 } 94#define TRACE_OUTPUT(ifp, dst, size) { \ 95 if (tracing) { \ 96 ifp = if_iflookup(dst); \ 97 if (ifp) \ |
98 trace(&ifp->int_output, dst, \ 99 &packet[sizeof(struct ipx)], \ 100 size, ifp->int_metric); \ |
101 } \ 102 if (tracepackets && ftrace) \ |
103 dumppacket(ftrace, "to", dst, \ 104 &packet[sizeof(struct ipx)], size); \ |
105 } 106 107#define TRACE_SAP_OUTPUT(ifp, dst, size) { \ 108 if (tracing) { \ 109 ifp = if_iflookup(dst); \ 110 if (ifp) \ |
111 trace(&ifp->int_output, dst, \ 112 &packet[sizeof(struct ipx)], \ 113 size, ifp->int_metric); \ |
114 } \ 115 if (tracepackets && ftrace) \ |
116 dumpsappacket(ftrace, "to", dst, \ 117 &packet[sizeof(struct ipx)], size); \ |
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 |