Lines Matching refs:skb
1490 * @skb: the packet
1497 unsigned char *cipso_v4_optptr(const struct sk_buff *skb)
1499 const struct iphdr *iph = ip_hdr(skb);
1500 unsigned char *optptr = (unsigned char *)&(ip_hdr(skb)[1]);
1528 * @skb: the packet
1546 int cipso_v4_validate(const struct sk_buff *skb, unsigned char **option)
1663 * userspace so reject it if skb is NULL. */
1664 if (!skb || !(skb->dev->flags & IFF_LOOPBACK)) {
1691 * @skb: the packet
1716 void cipso_v4_error(struct sk_buff *skb, int error, u32 gateway)
1722 if (ip_hdr(skb)->protocol == IPPROTO_ICMP || error != -EACCES)
1731 opt->optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr);
1733 res = __ip_options_compile(dev_net(skb->dev), opt, skb, NULL);
1740 __icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_ANO, 0, opt);
1742 __icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_ANO, 0, opt);
2152 * @skb: the packet
2161 int cipso_v4_skbuff_setattr(struct sk_buff *skb,
2167 struct ip_options *opt = &IPCB(skb)->opt;
2189 ret_val = skb_cow(skb, skb_headroom(skb) + len_delta);
2196 iph = ip_hdr(skb);
2197 skb_push(skb, len_delta);
2199 skb_reset_network_header(skb);
2200 iph = ip_hdr(skb);
2202 iph = ip_hdr(skb);
2205 iph = ip_hdr(skb);
2223 iph_set_totlen(iph, skb->len);
2232 * @skb: the packet
2239 int cipso_v4_skbuff_delattr(struct sk_buff *skb)
2243 struct ip_options *opt = &IPCB(skb)->opt;
2250 ret_val = skb_cow(skb, skb_headroom(skb));
2258 iph = ip_hdr(skb);