VirtualBox

Changeset 52543 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Aug 31, 2014 11:48:41 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95798
Message:

IntNet: follow up to r85262 - refactor rewriting of link-level address
option in IPv6 Neighbor Discovery datagrams when bridging to wireless.

Ok bird@

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/net.h

    r52519 r52543  
    801801
    802802
    803 /** @todo add ICMPv6 when needed. */
     803/**
     804 * IPv6 ICMP packet header.
     805 */
     806#pragma pack(1)
     807typedef struct RTNETICMPV6HDR
     808{
     809    /** 00 - The ICMPv6 message type. */
     810    uint8_t         icmp6_type;
     811    /** 01 - Type specific code that further qualifies the message. */
     812    uint8_t         icmp6_code;
     813    /** 02 - Checksum of the ICMPv6 message. */
     814    uint16_t        icmp6_cksum;
     815} RTNETICMPV6HDR;
     816#pragma pack()
     817AssertCompileSize(RTNETICMPV6HDR, 4);
     818/** Pointer to an ICMPv6 packet header. */
     819typedef RTNETICMPV6HDR *PRTNETICMPV6HDR;
     820/** Pointer to a const ICMP packet header. */
     821typedef RTNETICMPV6HDR const *PCRTNETICMPV6HDR;
    804822
    805823#define RTNETIPV6_PROT_ICMPV6       (58)
    806 #define RTNETIPV6_ICMPV6_CODE_0     (0)
    807824
    808825/** @name Internet Control Message Protocol version 6 (ICMPv6) message types.
     
    815832/** @} */
    816833
    817 /** @deprecated */
    818 #define RTNETIPV6_ICMP_NS_TYPE      (RTNETIPV6_ICMP_TYPE_NS)
    819 /** @deprecated */
    820 #define RTNETIPV6_ICMP_NA_TYPE      (RTNETIPV6_ICMP_TYPE_NA)
    821 
     834/** @name Neighbor Discovery option types
     835 * @{ */
    822836#define RTNETIPV6_ICMP_ND_SLLA_OPT  (1)
    823837#define RTNETIPV6_ICMP_ND_TLLA_OPT  (2)
    824 #define RTNETIPV6_ICMP_ND_LLA_LEN   (1)
    825 
    826 /** ICMPv6 ND Source Link Layer Address option */
    827 #pragma pack(1)
    828 typedef struct RTNETNDP_SLLA_OPT
     838/** @} */
     839
     840/** ICMPv6 ND Source/Target Link Layer Address option */
     841#pragma pack(1)
     842typedef struct RTNETNDP_LLA_OPT
    829843{
    830844    uint8_t type;
    831845    uint8_t len;
    832     RTMAC slla;
    833 } RTNETNDP_SLLA_OPT;
    834 #pragma pack()
    835 
    836 AssertCompileSize(RTNETNDP_SLLA_OPT, 1+1+6);
    837 
    838 typedef RTNETNDP_SLLA_OPT *PRTNETNDP_SLLA_OPT;
    839 typedef RTNETNDP_SLLA_OPT const *PCRTNETNDP_SLLA_OPT;
     846    RTMAC lla;
     847} RTNETNDP_LLA_OPT;
     848#pragma pack()
     849
     850AssertCompileSize(RTNETNDP_LLA_OPT, 1+1+6);
     851
     852typedef RTNETNDP_LLA_OPT *PRTNETNDP_LLA_OPT;
     853typedef RTNETNDP_LLA_OPT const *PCRTNETNDP_LLA_OPT;
    840854
    841855/** ICMPv6 ND Neighbor Sollicitation */
     
    843857typedef struct RTNETNDP
    844858{
    845     /** ICMPv6 type. */
    846     uint8_t icmp6_type;
    847     /** ICMPv6 code. */
    848     uint8_t icmp6_code;
    849     /** ICMPv6 checksum */
    850     uint16_t icmp6_cksum;
    851     /** reserved */
     859    /** 00 - The ICMPv6 header. */
     860    RTNETICMPV6HDR Hdr;
     861    /** 04 - reserved */
    852862    uint32_t reserved;
    853     /** target address */
     863    /** 08 - target address */
    854864    RTNETADDRIPV6 target_address;
    855865} RTNETNDP;
    856866#pragma pack()
    857 AssertCompileSize(RTNETNDP, 1+1+2+4+16);
     867AssertCompileSize(RTNETNDP, 4+4+16);
    858868/** Pointer to a NDP ND packet. */
    859869typedef RTNETNDP *PRTNETNDP;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette