ipv6.h (c0981b863a31a1891aa2719957983f4297770f87) | ipv6.h (73f156a6e8c1074ac6327e0abd1169e95eb66463) |
---|---|
1/* 2 * Linux INET6 implementation 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 99 unchanged lines hidden (view full) --- 108 __u8 reserved; 109 __be16 frag_off; 110 __be32 identification; 111}; 112 113#define IP6_MF 0x0001 114#define IP6_OFFSET 0xFFF8 115 | 1/* 2 * Linux INET6 implementation 3 * 4 * Authors: 5 * Pedro Roque <roque@di.fc.ul.pt> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 99 unchanged lines hidden (view full) --- 108 __u8 reserved; 109 __be16 frag_off; 110 __be32 identification; 111}; 112 113#define IP6_MF 0x0001 114#define IP6_OFFSET 0xFFF8 115 |
116#define IP6_REPLY_MARK(net, mark) \ 117 ((net)->ipv6.sysctl.fwmark_reflect ? (mark) : 0) 118 |
|
116#include <net/sock.h> 117 118/* sysctls */ 119extern int sysctl_mld_max_msf; 120 121#define _DEVINC(net, statname, modifier, idev, field) \ 122({ \ 123 struct inet6_dev *_idev = (idev); \ --- 454 unchanged lines hidden (view full) --- 578 * Check for a RFC 4843 ORCHID address 579 * (Overlay Routable Cryptographic Hash Identifiers) 580 */ 581static inline bool ipv6_addr_orchid(const struct in6_addr *a) 582{ 583 return (a->s6_addr32[0] & htonl(0xfffffff0)) == htonl(0x20010010); 584} 585 | 119#include <net/sock.h> 120 121/* sysctls */ 122extern int sysctl_mld_max_msf; 123 124#define _DEVINC(net, statname, modifier, idev, field) \ 125({ \ 126 struct inet6_dev *_idev = (idev); \ --- 454 unchanged lines hidden (view full) --- 581 * Check for a RFC 4843 ORCHID address 582 * (Overlay Routable Cryptographic Hash Identifiers) 583 */ 584static inline bool ipv6_addr_orchid(const struct in6_addr *a) 585{ 586 return (a->s6_addr32[0] & htonl(0xfffffff0)) == htonl(0x20010010); 587} 588 |
589static inline bool ipv6_addr_is_multicast(const struct in6_addr *addr) 590{ 591 return (addr->s6_addr32[0] & htonl(0xFF000000)) == htonl(0xFF000000); 592} 593 |
|
586static inline void ipv6_addr_set_v4mapped(const __be32 addr, 587 struct in6_addr *v4mapped) 588{ 589 ipv6_addr_set(v4mapped, 590 0, 0, 591 htonl(0x0000FFFF), 592 addr); 593} --- 61 unchanged lines hidden (view full) --- 655 return __ipv6_addr_diff32(token1, token2, addrlen); 656} 657 658static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2) 659{ 660 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); 661} 662 | 594static inline void ipv6_addr_set_v4mapped(const __be32 addr, 595 struct in6_addr *v4mapped) 596{ 597 ipv6_addr_set(v4mapped, 598 0, 0, 599 htonl(0x0000FFFF), 600 addr); 601} --- 61 unchanged lines hidden (view full) --- 663 return __ipv6_addr_diff32(token1, token2, addrlen); 664} 665 666static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2) 667{ 668 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); 669} 670 |
663void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt); 664 | |
665int ip6_dst_hoplimit(struct dst_entry *dst); 666 | 671int ip6_dst_hoplimit(struct dst_entry *dst); 672 |
673static inline int ip6_sk_dst_hoplimit(struct ipv6_pinfo *np, struct flowi6 *fl6, 674 struct dst_entry *dst) 675{ 676 int hlimit; 677 678 if (ipv6_addr_is_multicast(&fl6->daddr)) 679 hlimit = np->mcast_hops; 680 else 681 hlimit = np->hop_limit; 682 if (hlimit < 0) 683 hlimit = ip6_dst_hoplimit(dst); 684 return hlimit; 685} 686 |
|
667/* 668 * Header manipulation 669 */ 670static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, 671 __be32 flowlabel) 672{ 673 *(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | flowlabel; 674} --- 180 unchanged lines hidden --- | 687/* 688 * Header manipulation 689 */ 690static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, 691 __be32 flowlabel) 692{ 693 *(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | flowlabel; 694} --- 180 unchanged lines hidden --- |