/src/sys/netmpls/ |
mpls_ttl.c | 162 struct ip *oip = mtod(n, struct ip *), *nip; local in function:mpls_icmp_error 163 unsigned oiplen = oip->ip_hl << 2; 191 if (oip->ip_off &~ htons(IP_MF|IP_DF)) 193 if (oip->ip_p == IPPROTO_ICMP && type != ICMP_REDIRECT && 195 !ICMP_INFOTYPE(((struct icmp *)((char *)oip + oiplen))->icmp_type)) 208 if (icmp_ratelimit(&oip->ip_src, type, code)) 215 icmplen = uimin(ICMP_EXT_OFFSET, ntohs(oip->ip_len)); 218 * Defend against mbuf chains shorter than oip->ip_len - oiplen: 307 nip->ip_src = oip->ip_src; 308 nip->ip_dst = oip->ip_dst [all...] |
/src/sys/net/npf/ |
npf_sendpkt.c | 133 struct ip *oip = npc->npc_ip.v4; local in function:npf_return_tcp 143 ip->ip_src.s_addr = oip->ip_dst.s_addr; 144 ip->ip_dst.s_addr = oip->ip_src.s_addr; 149 struct ip6_hdr *oip = npc->npc_ip.v6; local in function:npf_return_tcp 157 memcpy(&ip6->ip6_src, &oip->ip6_dst, sizeof(struct in6_addr)); 158 memcpy(&ip6->ip6_dst, &oip->ip6_src, sizeof(struct in6_addr));
|
/src/sys/ufs/ffs/ |
ffs_inode.c | 203 * Truncate the inode oip to at most length size, freeing the 210 struct inode *oip = VTOI(ovp); local in function:ffs_truncate 222 struct ufsmount *ump = oip->i_ump; 231 KASSERT(oip->i_size == 0); 246 fs = oip->i_fs; 249 datablocks = DIP(oip, blocks); 250 if (fs->fs_magic == FS_UFS2_MAGIC && oip->i_din2->di_extsize > 0) { 251 extblocks = btodb(ffs_fragroundup(fs, oip->i_din2->di_extsize)); 259 (void) chkdq(oip, -extblocks, NOCRED, FORCE); 261 osize = oip->i_din2->di_extsize [all...] |
/src/sys/ufs/ext2fs/ |
ext2fs_inode.c | 283 * Truncate the inode oip to at most length size, freeing the 291 struct inode *oip = VTOI(ovp); local in function:ext2fs_truncate 302 struct ufsmount *ump = oip->i_ump; 313 (ext2fs_size(oip) < ump->um_maxsymlinklen || 314 (ump->um_maxsymlinklen == 0 && ext2fs_nblock(oip) == 0))) { 316 memset((char *)&oip->i_din.e2fs_din->e2di_shortlink, 0, 317 (u_int)ext2fs_size(oip)); 318 (void)ext2fs_setsize(oip, 0); 321 if (ext2fs_size(oip) == length) { 326 fs = oip->i_e2fs [all...] |
/src/sys/ufs/lfs/ |
lfs_inode.c | 207 * Truncate the inode oip to at most length size, freeing the 216 struct inode *oip = VTOI(ovp); local in function:lfs_truncate 235 KASSERT(oip->i_size == 0); 242 fs = oip->i_lfs; 245 (oip->i_size < fs->um_maxsymlinklen || 247 lfs_dino_getblocks(fs, oip->i_din) == 0))) { 250 memset((char *)SHORTLINK(oip), 0, (u_int)oip->i_size); 251 oip->i_size = 0; 252 lfs_dino_setsize(fs, oip->i_din, 0) [all...] |
/src/sys/netinet/ |
ip_icmp.c | 255 struct ip *oip = mtod(n, struct ip *), *nip; local in function:icmp_error 256 const unsigned oiphlen = oip->ip_hl << 2; 277 if (oip->ip_off &~ htons(IP_MF|IP_DF)) 279 if (oip->ip_p == IPPROTO_ICMP && type != ICMP_REDIRECT && 281 struct icmp *oicp = (struct icmp *)((char *)oip + oiphlen); 291 if (icmp_ratelimit(&oip->ip_src, type, code)) { 301 ntohs(oip->ip_len) - oiphlen); 384 nip->ip_src = oip->ip_src; 385 nip->ip_dst = oip->ip_dst;
|
/src/sys/external/bsd/ipf/netinet/ |
ip_fil_netbsd.c | 842 ip_t *oip; local in function:ipf_send_ip 856 oip = fin->fin_ip; 857 hlen = sizeof(*oip); 862 IP_HL_A(ip, sizeof(*oip) >> 2); 863 ip->ip_tos = oip->ip_tos;
|
ip_state.c | 2636 ip_t *oip; local in function:ipf_checkicmpmatchingstate 2653 oip = (ip_t *)((char *)ic + ICMPERR_ICMPHLEN); 2658 if (fin->fin_plen < ICMPERR_MAXPKTLEN + ((IP_HL(oip) - 5) << 2)) { 2667 if ((len <= 0) || ((IP_HL(oip) << 2) > len)) { 2668 DT2(iss_icmp_len, fr_info_t *, fin, struct ip*, oip); 2688 if ((char *)oip + len > (char *)m->b_wptr) { 2693 if ((char *)oip + len > (char *)fin->fin_ip + m->m_len) { 2718 * watch out here, as ip is in host order and oip in network 2720 * oip->ip_len. 2722 savelen = oip->ip_len [all...] |
ip_nat.c | 3575 ip_t *oip; local in function:ipf_nat_icmperrorlookup 3592 oip = (ip_t *)((char *)fin->fin_dp + 8); 3593 minlen = IP_HL(oip) << 2; 3615 if ((char *)oip + fin->fin_dlen - ICMPERR_ICMPHLEN > 3621 if ((char *)oip + fin->fin_dlen - ICMPERR_ICMPHLEN > 3630 if (fin->fin_daddr != oip->ip_src.s_addr) { 3635 p = oip->ip_p; 3641 orgicmp = (icmphdr_t *)((char *)oip + (IP_HL(oip) << 2)); 3658 oip->ip_dst 3729 ip_t *oip; local in function:ipf_nat_icmperror [all...] |
fil.c | 1214 ip_t *oip; local in function:ipf_pr_icmp 1291 oip = (ip_t *)((char *)fin->fin_dp + ICMPERR_ICMPHLEN); 1292 if ((ntohs(oip->ip_off) & IP_OFFMASK) != 0) { 1294 DT2(ipf_fi_bad_icmp_err, fr_info_t, fin, u_int, (ntohs(oip->ip_off) & IP_OFFMASK)); 1302 if (oip->ip_src.s_addr != fin->fin_daddr) {
|
/src/sys/dist/pf/net/ |
pf.c | 1505 u_int16_t oip = *ip; local in function:pf_change_icmp 1512 *pc = pf_cksum_fixup(*pc, oip, *ip, u); 1513 *ic = pf_cksum_fixup(*ic, oip, *ip, 0);
|