From nobody Wed Jul 31 19:12:46 2024 X-Original-To: freebsd-wireless@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZ1vf1ctfz5R9RY for ; Wed, 31 Jul 2024 19:13:02 +0000 (UTC) (envelope-from artemhevorhian@gmail.com) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZ1vc6R9Tz4STb; Wed, 31 Jul 2024 19:13:00 +0000 (UTC) (envelope-from artemhevorhian@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=eP6DFILg; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of artemhevorhian@gmail.com designates 2a00:1450:4864:20::330 as permitted sender) smtp.mailfrom=artemhevorhian@gmail.com Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-426526d30aaso40415515e9.0; Wed, 31 Jul 2024 12:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722453179; x=1723057979; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hQPgYf7w4ghRsPxpL9uw2AHXe80ZPX9vmoaTfav1CKo=; b=eP6DFILg0J+3NFZWF9y+VK/H+uWhztmzd5xD77eUp8VYOxpOpJzr9tpk1Z/jKBOQ+t x13SYBX+5+L5pRNNOnIrzIoLPEgfYqx3MNzuBNWq4575c5MRzvjkoLN5oys1FUuX/PJU +Y0kz/3bsiR1UHQdJHAUraf9vmB6FvvQNvDkyjpb87eT8l8ZzuhuL9Xk9u24jCJ2yUc5 BAOyCVWpNeEjVqbv7+LWlBk26q2JPa7xrZ47QMVOoJy6yK9znCXp7oJWJUsgDHG6S2N6 isFQ3rFan5nYeM6xv57Vyp7RZoM2iNuKgo+QQEdFsxs5CzTSe2MVrHsboT/79d/sAD6d AOag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722453179; x=1723057979; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hQPgYf7w4ghRsPxpL9uw2AHXe80ZPX9vmoaTfav1CKo=; b=KlXGANp6mP4fxFCkV5S4MBP+bMl7iCLvI2KQYDZQe0wLzL11QENLwA0Gg6eXnZMV0R lhdkSeE8QVq8nPaJ9bPwtsujsUbq8jdot2100yqnoUfnKMH0hn+8xXeo4baqdlxV/FaU KUeBK5nFOyqwPtPeOI9z1itPwgxHax7Uvyj38clcP4kRRfYzWZ5/QD9WkEurwjRHWaOG lib6Z8J30RhAICLJSZVxdqSkEjb1KKofT325utgclebgUyttdF+9bNvj27gzY/uuDBV8 oNQcma+hz3Uyuef06Y0trWA9UelLy63YACTcCrA5hb3KQp+4Jw2/m/kaZbtoczzG6IXk 6/ng== X-Gm-Message-State: AOJu0YzP4EalQpOM6ql9GD/S0UcwlBPYkGxqEaezPvxDIBi3u/wom6ZZ 5vckYMx//HvbFJXeX0z5GxcOaiJCMIo6l+FQ6EGUklnEOTdjxBAtj4V4d6Teu89Usy4dI7L3AI9 jlSrY2AkDhExZmCPn7pB5m1Y9fow45Q== X-Google-Smtp-Source: AGHT+IGdAvaEFfrssa7zB+Eigs9zAMB1HcWsOnez7yzQzUr7+FpVjHctrX8bTgNl8nX/y52H7G8GU+tVNFWxGKLjZds= X-Received: by 2002:a05:600c:468b:b0:426:6f1e:ce93 with SMTP id 5b1f17b1804b1-428b032bc95mr2242235e9.33.1722453178877; Wed, 31 Jul 2024 12:12:58 -0700 (PDT) List-Id: Discussions List-Archive: https://lists.freebsd.org/archives/freebsd-wireless List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-wireless@freebsd.org Sender: owner-freebsd-wireless@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Artem Hevorhian Date: Wed, 31 Jul 2024 22:12:46 +0300 Message-ID: Subject: Re: Support for nl80211.h To: "Bjoern A. Zeeb" Cc: freebsd-wireless@freebsd.org Content-Type: multipart/alternative; boundary="000000000000de8e54061e8fe168" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.92 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.92)[-0.923]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; MLMMJ_DEST(0.00)[freebsd-wireless@freebsd.org]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::330:from]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4WZ1vc6R9Tz4STb --000000000000de8e54061e8fe168 Content-Type: text/plain; charset="UTF-8" Sounds great. But why is it not possible to port nl80211.h? Could you give me the reasons? Also, I would like to tackle this task. Or at least try to do it. If you can help me with that by providing more info on how you think that could be done, I would appreciate it so much. Thanks! On Sat, Jul 27, 2024, 11:58 PM Bjoern A. Zeeb wrote: > On Sat, 27 Jul 2024, Artem Hevorhian wrote: > > Hi, > > > Is there a plan to support nl80211.h in the future? I would like to write > > my own wifi scanner that would talk to kernel module (driver) and get > scan > > information from it. I know it is possible with Linux. Is FreeBSD > planning > > to do a similar thing? Thanks. > > I cannot see a 1:1 nl80211.h implementation for FreeBSD any time soon. > > You can look at ifconfig sources for freebsd how to obtain scan > information; it's simple ioctl. > > I'd start here: > https://cgit.freebsd.org/src/tree/sbin/ifconfig/ifieee80211.c#n3744 > > There rest of the code is in the library you can use as well (and which > ifconfig uses): > https://cgit.freebsd.org/src/tree/lib/lib80211 > > > HTH, > /bz > > -- > Bjoern A. Zeeb r15:7 > --000000000000de8e54061e8fe168 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sounds great. But why is it not possible to port nl80211.= h? Could you give me the reasons? Also, I would like to tackle this task. O= r at least try to do it. If you can help me with that by providing more inf= o on how you think that could be done, I would appreciate it so much. Thank= s!

On Sat, Jul 27, 2024, 11:58 PM Bjoern A. Zeeb <bz@freebsd.org> wrote:
On Sat, 27 Jul 2024, Artem Hevorhian wrote:

Hi,

> Is there a plan to support nl80211.h in the future? I would like to wr= ite
> my own wifi scanner that would talk to kernel module (driver) and get = scan
> information from it. I know it is possible with Linux. Is FreeBSD plan= ning
> to do a similar thing? Thanks.

I cannot see a 1:1 nl80211.h implementation for FreeBSD any time soon.

You can look at ifconfig sources for freebsd how to obtain scan
information; it's simple ioctl.

I'd start here:
https://cgit.freebsd.o= rg/src/tree/sbin/ifconfig/ifieee80211.c#n3744

There rest of the code is in the library you can use as well (and which
ifconfig uses):
https://cgit.freebsd.org/src/tree/lib/lib80= 211


HTH,
/bz

--
Bjoern A. Zeeb=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r15:7
--000000000000de8e54061e8fe168--