From patchwork Sun Aug 7 14:30:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Aring X-Patchwork-Id: 9266391 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 98D7960754 for ; Sun, 7 Aug 2016 14:33:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B14F26C2F for ; Sun, 7 Aug 2016 14:33:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7ECCB27E5A; Sun, 7 Aug 2016 14:33:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 326F726C2F for ; Sun, 7 Aug 2016 14:33:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbcHGOd0 (ORCPT ); Sun, 7 Aug 2016 10:33:26 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:43972 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751986AbcHGOdD (ORCPT ); Sun, 7 Aug 2016 10:33:03 -0400 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=omega.localdomain) by metis.ext.pengutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1bWP8P-0001Um-Ic; Sun, 07 Aug 2016 16:33:01 +0200 From: Alexander Aring To: linux-wpan@vger.kernel.org Cc: kernel@pengutronix.de, linux-bluetooth@vger.kernel.org, Alexander Aring Subject: [RFCv2 bluetooth-next 05/19] 6lowpan: introduce generic default naming Date: Sun, 7 Aug 2016 16:30:42 +0200 Message-Id: <20160807143056.3116-6-aar@pengutronix.de> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160807143056.3116-1-aar@pengutronix.de> References: <20160807143056.3116-1-aar@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: aar@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wpan@vger.kernel.org Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds a default naming for all 6LoWPAN interfaces. All userspace software should have them as example e.g. for configurations. I see currently many examples which has different interface naming for software which works for 6LoWPAN BTLE and 6LoWPAN 802.15.4. We need to change also all examples outside to this naming stuff, so the interface naming inside such examples doesn't depends on L2. Signed-off-by: Alexander Aring --- include/net/6lowpan.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net/6lowpan.h b/include/net/6lowpan.h index 7f4b63c..2570237 100644 --- a/include/net/6lowpan.h +++ b/include/net/6lowpan.h @@ -78,6 +78,8 @@ #define LOWPAN_DISPATCH_IPHC 0x60 /* 011xxxxx = ... */ #define LOWPAN_DISPATCH_IPHC_MASK 0xe0 +#define LOWPAN_IFNAME_TEMPLATE "6lo%d" + static inline bool lowpan_is_ipv6(u8 dispatch) { return dispatch == LOWPAN_DISPATCH_IPV6;