1 /* 2 * Copyright 2011 Daniel Drown 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 * dump.h - debug functions 17 */ 18 #ifndef __DUMP_H__ 19 #define __DUMP_H__ 20 21 void dump_ip(struct iphdr *header); 22 void dump_icmp(struct icmphdr *icmp); 23 void dump_udp(const struct udphdr *udp, const struct iphdr *ip, 24 const uint8_t *payload, size_t payload_size); 25 void dump_tcp(const struct tcphdr *tcp, const struct iphdr *ip, 26 const uint8_t *payload, size_t payload_size, 27 const char *options, size_t options_size); 28 29 void dump_ip6(struct ip6_hdr *header); 30 void dump_icmp6(struct icmp6_hdr *icmp6); 31 void dump_udp6(const struct udphdr *udp, const struct ip6_hdr *ip6, 32 const uint8_t *payload, size_t payload_size); 33 void dump_tcp6(const struct tcphdr *tcp, const struct ip6_hdr *ip6, 34 const uint8_t *payload, size_t payload_size, 35 const char *options, size_t options_size); 36 37 void logcat_hexdump(const char *info, const uint8_t *data, size_t len); 38 void dump_iovec(const struct iovec *iov, int iov_len); 39 40 #endif /* __DUMP_H__ */ 41