From owner-freebsd-net@FreeBSD.ORG Mon Jul 25 13:10:34 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 625871065673 for ; Mon, 25 Jul 2011 13:10:34 +0000 (UTC) (envelope-from monthadar@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 294DE8FC14 for ; Mon, 25 Jul 2011 13:10:33 +0000 (UTC) Received: by gwb15 with SMTP id 15so3074969gwb.13 for ; Mon, 25 Jul 2011 06:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=dqv18d5ZuBS5c30USzvRH/trLXLSfPeX1aO0w3THSYk=; b=rCTWhB77/VNdHCci2ah2ozp6OOTsX3nspMCjvLvjlZOE1HvQzNB6q8Y5u6gOaPGUdM 1OMwFwGnZdGRqhN1gUQA31gACrBvv4/Rice1F1SH5Oudy3MegonL281bsSflInsjGY5U ddlkFCxHAG45tSguMvTa1zL8dWQ7FVZnbuB0I= MIME-Version: 1.0 Received: by 10.150.40.15 with SMTP id n15mr4381406ybn.305.1311597577790; Mon, 25 Jul 2011 05:39:37 -0700 (PDT) Received: by 10.151.101.4 with HTTP; Mon, 25 Jul 2011 05:39:37 -0700 (PDT) Date: Mon, 25 Jul 2011 14:39:37 +0200 Message-ID: From: Monthadar Al Jaberi To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Clarification request about mesh_parse_meshpeering_action() X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2011 13:10:34 -0000 Hi, I hope someone can explain to me the following: in ieee80211_mesh.c in function mesh_parse_meshpeering_action(). The last argument uint8_t subtype is supposed to tell the type of Mesh Peer Managment Action frame. The weird thing is that inside the function subtype is checked if it is equal to IEEE80211_MESH_PEER_LINK_CLOSE and a bit lower in the code it is checked if it is not equal to IEEE80211_ACTION_MESHPEERING_CLOSE. These two enums represent two different things. One is an InformationElement while the other is an Action Frame that contains Information elements. How come? br, //Monthadar Al Jaberi