From nobody Sun Jul 26 22:54:30 2026 X-Original-To: freebsd-hackers@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 4h7cVq3XfHz6m3Jw for ; Sun, 26 Jul 2026 22:54:43 +0000 (UTC) (envelope-from paigeadele@gmail.com) Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (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 4h7cVp1pTGz3tsj for ; Sun, 26 Jul 2026 22:54:42 +0000 (UTC) (envelope-from paigeadele@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20251104 header.b=ZUu2Bd+J; arc=pass ("google.com:s=arc-20260327:i=1"); spf=pass (mx1.freebsd.org: domain of paigeadele@gmail.com designates 2a00:1450:4864:20::22f as permitted sender) smtp.mailfrom=paigeadele@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-39c86945164so16404301fa.1 for ; Sun, 26 Jul 2026 15:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1785106475; cv=none; d=google.com; s=arc-20260327; b=dFqgkowAqMud6UIjz8VAeDY0x4CEWpZS5jzOiuHTb/kb+3uXRy1kGuAd7QpM1UMTgG Q/sawGWNOAqCHuAXvSVYKSod3okHUZN01wviOKXsJRbqKRkm3KoraO3tOB4NNE+iPTO1 1PiQ4vL7YonsWjtreweVrJkGdLRobsIzPhvpUVpILrfTovmRTccsbNlj0XkpnLgnMOAZ tYxunC2G/pf8MhceeaezROZ5ynV46OsJnoKQ4SjjofYPJfI+eo055n/iHfGbYWolFZBl /v8wgOn+Ckvs4kgz5iqqqDpNnqAHZ8fIPQ+PaLGPYWHKGvqTj1RWMFLa9TWs+ctwTZvk 9O2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=d0Wirdf1YrITmZh659zpqB38eOHExi7gwmz2bz/l17c=; fh=BGnlq/Bnk5yuHoIOHmeKjbe0R0Wn0sUc6aL/mCAMBkg=; b=qZJZYKXBtolMfv/tzsEOIiAtpRjjPFfLc1kZU74C//BHt/+VLFdWIkcOirLIAvaUo7 ZUAFYAPr/iowxpep4I7iZyy8YLczc4GupEqF2Xnxxumuursecc8q8Ii95iwAQRkRXvbi tQQAtSONDykG4l41XZrqXQEU2ptkirCiUA7zv4DX0NVGvcUxdqPz2qI7h4oSV69CvQxY Zng/DxNgOSivzjknsOG/pWeySbhj5eRAGf4gFnUgIRYcwKKL757KinXNwkOA6WFnioGN MrHxznY9J4UFqTUC6lqjqcRMPI82a8KiLSC2h/UPq5d1MEDkQss+m88apNuk5W0doG/H 80aQ==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785106475; x=1785711275; darn=freebsd.org; h=content-type:to:subject:message-id:date:from:mime-version:from:to :cc:subject:date:message-id:reply-to:content-type; bh=d0Wirdf1YrITmZh659zpqB38eOHExi7gwmz2bz/l17c=; b=ZUu2Bd+JAI5drVzpQOUSvdlCSq8abm3qMabpeytZfQTAlNeXz+cmAPAABPkw6jX5bE 2/BGGP/RmBGWosW2Y11wFU/Vzk5flVK4UaKMBKzVcF2g9deq3D1Ce7AuLyn+BFg0Y0r3 2hENkXeqsdFo0Z7Uy9BlpzD7VRKf301ov7ezAUHYESXsKCFJzwK/Pco/9RBx9b75s1zN Ih+SQ5tQPYb3vspoPv8lj0X0+2bUIvjh8uHZY9v7LXeneStiIXKIQqhCCCx4RF3IxszK n06lZ46sGAhKI9+whD7ZV7eEd0XyUmD9lICiVl1222T5vHLY/KXIRJmbuYKjbVJPZQpf YhPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785106475; x=1785711275; h=content-type:to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=d0Wirdf1YrITmZh659zpqB38eOHExi7gwmz2bz/l17c=; b=QFRPMvQ6B2Ll98DogBbmzMAWgjqp+/SSNEwaF6yF76+S/rNT4BTtpD60PATWM3Soj5 tspLdwJ9nSdkwezP1B+jPTayIW7zFoHAJ3ZFybFHqtHuEef2ClmF0noeEIQi9nrK+M5y clgPd/lxi4cMBa3Z1s6JE8c1WCeSPMMLJjgBUiM53KWJBhBSVLLKUF400f6NgdMvVhCO F62bgEC5L/Ni2tQDW+ZmAVf1VX+JQDW8NytIQ4KFmGVN5nW+nh9g0Mz5Hl+U4w3qYzIV YqLGpMRLL8+O5SVO/N7UDCD/Y5zMkgHrZ+vOpDVTQsl41OflBC0/IYfX/bR18BKNpZ8S xLwQ== X-Gm-Message-State: AOJu0Yxzdp5VlBggCanE+ZRfYMMWkEAbnG5kFgI+ji02J6geE+9QYDKx LsTE74E9b3TSIoMvb7NETd2d7Bh2z0vkgRVfVj9/wtQ8ZWTeh1wIGE+w2kbmDbAqN3p1/VldwEC phBkMu0MQDYsFNpNkt6BH+SA+ZJr8tnAqtLtDPrU= X-Gm-Gg: AR+sD11rH3EVcCBiOnGCgtjcdNqP4S3zlMWmqDrjxgyX+4eWMknPfDlWGHwCZR7J3FK Fhrl7KIdB1AFZ3xYCggoFzH5RUrid7Sv8zJRKeohK/qea88+4MR6ztSXe14IDczEMKQ7sAXlJR4 LvvFDdx9LwehNba4rPaimLAs+q4xpHs107pH1f/zjquZsDSpz3Fm23mAufkT2KAGXMt9XbAcnvk 735IW1JgBgNGyx5rUVx2iV4e10MX6IbsOuxw47ltOgfMD9+RE/iFzAlgGo8sTOxV6P96w7Nwg7L 9p/B87TOlwqS+ni6 X-Received: by 2002:a05:651c:b1f:b0:39b:9fc:eb4e with SMTP id 38308e7fff4ca-39f28790d80mr10286131fa.17.1785106474984; Sun, 26 Jul 2026 15:54:34 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 From: Paige Thompson Date: Sun, 26 Jul 2026 22:54:30 +0000 X-Gm-Features: AUfX_mygKgpYtyvKP5FvEWizLZ9tC5SbekqYFggLfnsdERZebB4LjhSzxUkpfXo Message-ID: Subject: ifconfig patch that introduces --libxo To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-5.00 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20251104]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4864::/56]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22f:from] X-Rspamd-Queue-Id: 4h7cVp1pTGz3tsj X-Spamd-Bar: ---- Hi, I have a patch for sbin/ifconfig in the works that I'd like to eventually submit at some point. The patch covers the full summary of interfaces and allows you to export interface data as JSON, XML or HTML. It uses a library that is already in-tree and used by netstat (you can export route tables in JSON / XML or HTML already. This patch does pretty much the same thing for ifconfig but it's obviously a little more complicated considering the number of options it had to cover: fconfig_libxo_support.patch: https://gist.github.com/paigeadelethompson/5dd1b998d599ed7d147fd37a6aa90b2e I've also done my best to ensure that it doesn't change how ifconfig normally displays summaries; it still uses libxo but defaults to --libxo text if you don't specify --libxo as an argument and I've maintained the same output format that it had with all of the printf statements. I've been testing it thoroughly, and all of the work I'm doing going forward I've been tracking on this gist, I've also updated the original patch file a couple of times. I've never submitted a patch to FreeBSD before, but I'm really okay with this taking as long as it needs to because I think it's particularly useful and I'd prefer to get it right the first time rather than have it ruin somebody's day. I'm also interested in submitting two other patches that I haven't started yet: - Another for ifconfig; specifically one that would allow you to configure networking interfaces from an XML file (it would use the expat / bsdxml.h parser to read in ifconfig data exported with `ifconfig --libxo xml` (example: https://termbin.com/efqhl ) - a patch for route which can restore routing tables; I made a little proof of concept that kind of does this with netstat / jq awhile ago: https://gist.github.com/paigeadelethompson/d99e6bb0aab4ae2fa6a066217831840c but rather the way I have in mind would essentially be: netstat --libxo xml -nr -F 1 > 1.xml route --restore-from 1.xml and the patch to route would also use the in-tree expat (bsdxml.h) parser that's available. The problem that it solves from my perspective is that its a step towards eliminating the amount of complex networking configuration that I have to maintain in my rc.conf which for me and I'm sure for anybody who has tried to build segmented networks for jails, and virtual machines it has potential to get pretty ridiculous, especially routes: https://termbin.com/lrt80 And even if I didn't have to use epairs and could use something like say... if_mpe if it existed, rc.conf would still be less than ideal for static protocol routing; BGP isn't even an option here yet that's something else I want to work towards. I have to run, I've been working on this all morning, and made lots of progress testing. I'll follow up this evening.