From patchwork Tue Mar 18 13:05:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Dan_L=C3=BCdtke?= X-Patchwork-Id: 143 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (caibbdcaaahc.dreamhost.com [208.113.200.72]) by wilcox.dreamhost.com (Postfix) with ESMTP id 81BCA3601A1 for ; Tue, 18 Mar 2014 06:05:34 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14307373) id 33DC4408B423B; Tue, 18 Mar 2014 06:05:34 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id D8BE4406A3F07 for ; Tue, 18 Mar 2014 06:05:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; q=dns; s=default; b= FjW7F4m7yeqQfADi4cg//w2i4F/y4coQYHVkTC3E++HHjDTlw/5cW6OtbvHN7scm ib/Q+fhoMN31sizj3+BedxxoOH61WPXkJKWBhgzfe3KMaTMpfSJqN2E65ti+nq+M yGPBnxSqeQad1nH31sr0U0xVXCZQTZW3pDHupQz63xw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; s=default; bh=wzkbJe 5zRiV5dm3vI3x/2L4CD6I=; b=wjL25CYLNbZburJtjiXwWPTzP7KiNwZz8t7Phs /GDmnkm7/WO9BD7JFDK1iD3LPO8N2D+3SjgOKYuGawq1pG9HE7UUGUvgz3IMZPod KzlGpTDziGbyC8GZMd/CpMD9dqPopd9PlXK3LCR/4Lq9NM4iP+STGl/g3ELiOSIQ uxLdw= Received: (qmail 29537 invoked by alias); 18 Mar 2014 13:05:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29524 invoked by uid 89); 18 Mar 2014 13:05:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f42.google.com X-Received: by 10.194.6.106 with SMTP id z10mr23172959wjz.1.1395147924461; Tue, 18 Mar 2014 06:05:24 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?Q?Dan_L=C3=BCdtke?= Date: Tue, 18 Mar 2014 14:05:04 +0100 Message-ID: Subject: [PING][PATCH] Add missing ICMPv6 flags and options To: libc-alpha@sourceware.org Cc: =?UTF-8?Q?Dan_L=C3=BCdtke?= X-DH-Original-To: glibc@patchwork.siddhesh.in As already discussed in: Message-Id: <1392230153-23499-1-git-send-email-danrl@danrl.de> Message-Id: <1392240088-6992-1-git-send-email-danrl@danrl.de> --- ChangeLog | 24 ++++++++++++++++++++++++ inet/netinet/icmp6.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) { @@ -231,6 +242,45 @@ struct nd_opt_mtu /* MTU option */ uint32_t nd_opt_mtu_mtu; }; +#define ND_OPT_RI_RTPREF_LOW 0x18 +#define ND_OPT_RI_RTPREF_MEDIUM 0x00 +#define ND_OPT_RI_RTPREF_HIGH 0x08 +#define ND_OPT_RI_RTPREF_MASK 0x18 +#define ND_OPT_RI_RTPREF_RSV 0x10 + +struct nd_opt_route_info /* route information option */ + { + uint8_t nd_opt_ri_type; + uint8_t nd_opt_ri_len; + uint8_t nd_opt_ri_prefix_len; + uint8_t nd_opt_ri_pref_reserved; + uint32_t nd_opt_ri_lifetime; + /* followed by prefixes */ + }; + +struct nd_opt_rdnss /* RDNSS option */ + { + uint8_t nd_opt_rdnss_type; + uint8_t nd_opt_rdnss_len; + uint16_t nd_opt_rdnss_reserved; + uint32_t nd_opt_rdnss_lifetime; + /* followed by recursive DNS servers */ + }; + +#define ND_OPT_AR_STATUS_SUCCESS 0x00 +#define ND_OPT_AR_STATUS_DUPLICATE 0x01 +#define ND_OPT_AR_STATUS_CACHEFULL 0x02 + +struct nd_opt_address_reg /* address registration option */ + { + uint8_t nd_opt_ar_type; + uint8_t nd_opt_ar_len; + uint8_t nd_opt_ar_status; + uint8_t nd_opt_ar_reserved1; + uint16_t nd_opt_ar_reserved2; + uint64_t nd_opt_ar_eui64; + }; + struct mld_hdr { struct icmp6_hdr mld_icmp6_hdr; -- 1.9.0 diff --git a/ChangeLog b/ChangeLog index 45eb5ab..9c12a74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2014-03-01 Dan Luedtke + + * inet/netinet/icmp6.h (ND_RA_FLAG_RTPREF_LOW): Define. + (ND_RA_FLAG_RTPREF_MEDIUM): Likewise. + (ND_RA_FLAG_RTPREF_HIGH): Likewise. + (ND_RA_FLAG_RTPREF_MASK): Likewise. + (ND_RA_FLAG_RTPREF_RSV): Likewise. + (ND_RA_FLAG_PROXY): Likewise. + (ND_RA_FLAG_HA): Likewise. + (ND_OPT_ROUTE_INFO): Likewise. + (ND_OPT_RDNSS): Likewise. + (ND_OPT_ADDRESS_REGISTRATION): Likewise. + (ND_OPT_RI_RTPREF_LOW): Likewise. + (ND_OPT_RI_RTPREF_MEDIUM): Likewise. + (ND_OPT_RI_RTPREF_HIGH): Likewise. + (ND_OPT_RI_RTPREF_MASK): Likewise. + (ND_OPT_RI_RTPREF_RSV): Likewise. + (ND_OPT_AR_STATUS_SUCCESS): Likewise. + (ND_OPT_AR_STATUS_DUPLICATE): Likewise. + (ND_OPT_AR_STATUS_CACHEFULL): Likewise. + (nd_opt_route_info): New structure. + (nd_opt_rdnss): Likewise. + (nd_opt_address_reg): Likewise. + 2014-02-28 Ondřej Bílka * benchtest/bench-strtok.c (simple_strtok): Delete. diff --git a/inet/netinet/icmp6.h b/inet/netinet/icmp6.h index baaeb26..86e45b2 100644 --- a/inet/netinet/icmp6.h +++ b/inet/netinet/icmp6.h @@ -135,6 +135,14 @@ struct nd_router_advert /* router advertisement */ #define ND_RA_FLAG_MANAGED 0x80 #define ND_RA_FLAG_OTHER 0x40 #define ND_RA_FLAG_HOME_AGENT 0x20 +/* For compatibility with BSD. */ +#define ND_RA_FLAG_HA ND_RA_FLAG_HOME_AGENT +#define ND_RA_FLAG_RTPREF_LOW 0x18 +#define ND_RA_FLAG_RTPREF_MEDIUM 0x00 +#define ND_RA_FLAG_RTPREF_HIGH 0x08 +#define ND_RA_FLAG_RTPREF_MASK 0x18 +#define ND_RA_FLAG_RTPREF_RSV 0x10 +#define ND_RA_FLAG_PROXY 0x04 #define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] struct nd_neighbor_solicit /* neighbor solicitation */ @@ -197,6 +205,9 @@ struct nd_opt_hdr /* Neighbor discovery option header */ #define ND_OPT_MTU 5 #define ND_OPT_RTR_ADV_INTERVAL 7 #define ND_OPT_HOME_AGENT_INFO 8 +#define ND_OPT_ROUTE_INFO 24 +#define ND_OPT_RDNSS 25 +#define ND_OPT_ADDRESS_REGISTRATION 33 struct nd_opt_prefix_info /* prefix information */