Lines Matching refs:ip

26 #pragma D depends_on provider ip
78 translator ipinfo_t < struct ip * ip > {
79 ip_ver = (ip != NULL) ? ((*(uint8_t *) ip) & 0xf0) >> 4 : 0;
80 ip_plength = (ip != NULL) ?
81 (ntohs(ip->ip_len) - (((*(uint8_t *) ip) & 0x0f) << 2)) : 0;
82 ip_saddr = (ip != NULL) ? inet_ntoa((uint32_t *)&ip->ip_src.s_addr) : "<null>";
83 ip_daddr = (ip != NULL) ? inet_ntoa((uint32_t *)&ip->ip_dst.s_addr) : "<null>";
103 ntohs(((struct ip *)i)->ip_len) -
108 inet_ntoa((uint32_t *)&(((struct ip *)i)->ip_src.s_addr)) :
112 inet_ntoa((uint32_t *)&((struct ip*)i)->ip_dst.s_addr) : ((((*(uint8_t *)i) >> 4) == 6) ?
154 struct ip *ipv4_hdr; /* pointer to raw header */
158 translator ipv4info_t < struct ip *ip > {
159 ipv4_ver = (ip != NULL) ? (*(uint8_t *)ip & 0xf0) >> 4 : 0;
160 ipv4_ihl = (ip != NULL) ? ((*(uint8_t *)ip & 0x0f) << 2) : 0;
161 ipv4_tos = (ip!= NULL) ? ip->ip_tos : 0;
162 ipv4_length = (ip != NULL) ? ntohs(ip->ip_len) : 0;
163 ipv4_ident = (ip != NULL) ? ip->ip_id : 0;
164 ipv4_flags = (ip != NULL) ? (ntohs(ip->ip_off) & 0xe000) : 0;
165 ipv4_offset = (ip != NULL) ? (ntohs(ip->ip_off) & 0x1fff) : 0;
166 ipv4_ttl = (ip != NULL) ? ip->ip_ttl : 0;
167 ipv4_protocol = (ip != NULL) ? ip->ip_p : 0;
168 ipv4_protostr = (ip == NULL) ? "<null>" :
169 (ip->ip_p == 1) ? "ICMP" :
170 (ip->ip_p == 2) ? "IGMP" :
171 (ip->ip_p == 4) ? "IP" :
172 (ip->ip_p == 6) ? "TCP":
173 (ip->ip_p == 17) ? "UDP" :
174 (ip->ip_p == 50) ? "ESP":
175 (ip->ip_p == 51) ? "AH" :
176 (ip->ip_p == 58) ? "ICMPV6" :
177 (ip->ip_p == 255) ? "RAW" : stringof(ip->ip_p);
178 ipv4_checksum = (ip != NULL) ? ntohs(ip->ip_sum) : 0;
179 ipv4_src = (ip != NULL) ? ip->ip_src.s_addr : 0;
180 ipv4_dst = (ip != NULL) ? ip->ip_dst.s_addr : 0;
181 ipv4_saddr = (ip != NULL) ? inet_ntoa((uint32_t *)&ip->ip_src.s_addr) : "<null>";
182 ipv4_daddr = (ip != NULL) ? inet_ntoa((uint32_t *)&ip->ip_dst.s_addr) : "<null>";
183 ipv4_hdr = ip;