netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kiernan George <kbg98@vt.edu>
To: netfilter@vger.kernel.org
Subject: Programmatically adding an element into a map using libnftnl
Date: Thu, 30 Mar 2023 15:41:01 -0400	[thread overview]
Message-ID: <CAOg40qhcAoSdiTV5ievXf5wrQfoh_ZfF+GDVHqZ-Bhpf_JgCPQ@mail.gmail.com> (raw)

I have a map of the following format:

{ type ipv4_addr . inet_service : ipv4_addr }

How do I add an element into the map using the libnftnl API? I see the
example nft-set-elem-add.c, but it is not clear on how to modify this
for different types of elements like concatenated IP/port above or
IPV6.

I hate to ask again, but is there documentation for the library somewhere?

             reply	other threads:[~2023-03-30 19:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 19:41 Kiernan George [this message]
2023-03-30 20:17 ` Programmatically adding an element into a map using libnftnl Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOg40qhcAoSdiTV5ievXf5wrQfoh_ZfF+GDVHqZ-Bhpf_JgCPQ@mail.gmail.com \
    --to=kbg98@vt.edu \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).