diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-25 20:54:47 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:14 -0400 |
commit | 0660e03f6b18f19b6bbafe7583265a51b90daf36 (patch) | |
tree | 82cc819ead5ab7858ba211ee8719a3e6d2bb984f /net/ipv6/datagram.c | |
parent | d0a92be05ed4aea7d35c2b257e3f9173565fe4eb (diff) |
[SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h
Now the skb->nh union has just one member, .raw, i.e. it is just like the
skb->mac union, strange, no? I'm just leaving it like that till the transport
layer is done with, when we'll rename skb->mac.raw to skb->mac_header (or
->mac_header_offset?), ditto for ->{h,nh}.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/datagram.c')
-rw-r--r-- | net/ipv6/datagram.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index ac95d3bfdfb..f429290c2c3 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -254,7 +254,7 @@ void ipv6_local_error(struct sock *sk, int err, struct flowi *fl, u32 info) | |||
254 | 254 | ||
255 | skb_put(skb, sizeof(struct ipv6hdr)); | 255 | skb_put(skb, sizeof(struct ipv6hdr)); |
256 | skb_reset_network_header(skb); | 256 | skb_reset_network_header(skb); |
257 | iph = skb->nh.ipv6h; | 257 | iph = ipv6_hdr(skb); |
258 | ipv6_addr_copy(&iph->daddr, &fl->fl6_dst); | 258 | ipv6_addr_copy(&iph->daddr, &fl->fl6_dst); |
259 | 259 | ||
260 | serr = SKB_EXT_ERR(skb); | 260 | serr = SKB_EXT_ERR(skb); |
@@ -340,7 +340,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len) | |||
340 | sin->sin6_flowinfo = 0; | 340 | sin->sin6_flowinfo = 0; |
341 | sin->sin6_scope_id = 0; | 341 | sin->sin6_scope_id = 0; |
342 | if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) { | 342 | if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP6) { |
343 | ipv6_addr_copy(&sin->sin6_addr, &skb->nh.ipv6h->saddr); | 343 | ipv6_addr_copy(&sin->sin6_addr, &ipv6_hdr(skb)->saddr); |
344 | if (np->rxopt.all) | 344 | if (np->rxopt.all) |
345 | datagram_recv_ctl(sk, msg, skb); | 345 | datagram_recv_ctl(sk, msg, skb); |
346 | if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL) | 346 | if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL) |
@@ -391,17 +391,17 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) | |||
391 | struct in6_pktinfo src_info; | 391 | struct in6_pktinfo src_info; |
392 | 392 | ||
393 | src_info.ipi6_ifindex = opt->iif; | 393 | src_info.ipi6_ifindex = opt->iif; |
394 | ipv6_addr_copy(&src_info.ipi6_addr, &skb->nh.ipv6h->daddr); | 394 | ipv6_addr_copy(&src_info.ipi6_addr, &ipv6_hdr(skb)->daddr); |
395 | put_cmsg(msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info); | 395 | put_cmsg(msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info); |
396 | } | 396 | } |
397 | 397 | ||
398 | if (np->rxopt.bits.rxhlim) { | 398 | if (np->rxopt.bits.rxhlim) { |
399 | int hlim = skb->nh.ipv6h->hop_limit; | 399 | int hlim = ipv6_hdr(skb)->hop_limit; |
400 | put_cmsg(msg, SOL_IPV6, IPV6_HOPLIMIT, sizeof(hlim), &hlim); | 400 | put_cmsg(msg, SOL_IPV6, IPV6_HOPLIMIT, sizeof(hlim), &hlim); |
401 | } | 401 | } |
402 | 402 | ||
403 | if (np->rxopt.bits.rxtclass) { | 403 | if (np->rxopt.bits.rxtclass) { |
404 | int tclass = (ntohl(*(__be32 *)skb->nh.ipv6h) >> 20) & 0xff; | 404 | int tclass = (ntohl(*(__be32 *)ipv6_hdr(skb)) >> 20) & 0xff; |
405 | put_cmsg(msg, SOL_IPV6, IPV6_TCLASS, sizeof(tclass), &tclass); | 405 | put_cmsg(msg, SOL_IPV6, IPV6_TCLASS, sizeof(tclass), &tclass); |
406 | } | 406 | } |
407 | 407 | ||
@@ -428,7 +428,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) | |||
428 | * IPV6_RECVDSTOPTS is more generic. --yoshfuji | 428 | * IPV6_RECVDSTOPTS is more generic. --yoshfuji |
429 | */ | 429 | */ |
430 | unsigned int off = sizeof(struct ipv6hdr); | 430 | unsigned int off = sizeof(struct ipv6hdr); |
431 | u8 nexthdr = skb->nh.ipv6h->nexthdr; | 431 | u8 nexthdr = ipv6_hdr(skb)->nexthdr; |
432 | 432 | ||
433 | while (off <= opt->lastopt) { | 433 | while (off <= opt->lastopt) { |
434 | unsigned len; | 434 | unsigned len; |
@@ -466,11 +466,11 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) | |||
466 | struct in6_pktinfo src_info; | 466 | struct in6_pktinfo src_info; |
467 | 467 | ||
468 | src_info.ipi6_ifindex = opt->iif; | 468 | src_info.ipi6_ifindex = opt->iif; |
469 | ipv6_addr_copy(&src_info.ipi6_addr, &skb->nh.ipv6h->daddr); | 469 | ipv6_addr_copy(&src_info.ipi6_addr, &ipv6_hdr(skb)->daddr); |
470 | put_cmsg(msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info); | 470 | put_cmsg(msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info); |
471 | } | 471 | } |
472 | if (np->rxopt.bits.rxohlim) { | 472 | if (np->rxopt.bits.rxohlim) { |
473 | int hlim = skb->nh.ipv6h->hop_limit; | 473 | int hlim = ipv6_hdr(skb)->hop_limit; |
474 | put_cmsg(msg, SOL_IPV6, IPV6_2292HOPLIMIT, sizeof(hlim), &hlim); | 474 | put_cmsg(msg, SOL_IPV6, IPV6_2292HOPLIMIT, sizeof(hlim), &hlim); |
475 | } | 475 | } |
476 | if (np->rxopt.bits.ohopopts && opt->hop) { | 476 | if (np->rxopt.bits.ohopopts && opt->hop) { |