All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH v4] batman-adv: Snoop DHCPACKs for DAT
Date: Fri, 18 May 2018 23:46:56 +0200	[thread overview]
Message-ID: <1566281.z125QuZFdt@sven-edge> (raw)
In-Reply-To: <20180515155908.23839-1-linus.luessing@c0d3.blue>

[-- Attachment #1: Type: text/plain, Size: 1537 bytes --]

On Dienstag, 15. Mai 2018 17:59:08 CEST Linus Lüssing wrote:
[...]
> diff --git a/include/uapi/linux/batadv_packet.h b/include/uapi/linux/
batadv_packet.h
> index 894d8d2f..6a48f36c 100644
> --- a/include/uapi/linux/batadv_packet.h
> +++ b/include/uapi/linux/batadv_packet.h
> @@ -630,6 +630,46 @@ struct batadv_tvlv_mcast_data {
>  	__u8 reserved[3];
>  };
>  
> +enum batadv_bootpop {
> +	BATADV_BOOTREPLY	= 2,
> +};
> +
> +enum batadv_boothtype {
> +	BATADV_HTYPE_ETHERNET	= 1,
> +};
> +
> +enum batadv_dhcpoptioncode {
> +	BATADV_DHCP_OPT_PAD		= 0,
> +	BATADV_DHCP_OPT_MSG_TYPE	= 53,
> +	BATADV_DHCP_OPT_END		= 255,
> +};
> +
> +enum batadv_dhcptype {
> +	BATADV_DHCPACK		= 5,
> +};
> +
> +/* { 99, 130, 83, 99 } */
> +#define BATADV_DHCP_MAGIC 1669485411
> +
> +struct batadv_dhcp_packet {
> +	__u8 op;
> +	__u8 htype;
> +	__u8 hlen;
> +	__u8 hops;
> +	__be32 xid;
> +	__be16 secs;
> +	__be16 flags;
> +	__be32 ciaddr;
> +	__be32 yiaddr;
> +	__be32 siaddr;
> +	__be32 giaddr;
> +	__u8 chaddr[16];
> +	__u8 sname[64];
> +	__u8 file[128];
> +	__be32 magic;
> +	__u8 options[0];
> +};
> +
>  #pragma pack()
>  
>  #endif /* _UAPI_LINUX_BATADV_PACKET_H_ */

Please correct me but it doesn't look like these things have anything to do 
with the batman-adv packet format. And userspace should also not use the 
bootp_pkt/batadv_dhcp_packet definition from batman-adv.

And what about the basically duplicated bootp_pkt definition in net/ipv4/
ipconfig.c?

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-05-18 21:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 15:59 [B.A.T.M.A.N.] [PATCH v4] batman-adv: Snoop DHCPACKs for DAT Linus Lüssing
2018-05-18 21:46 ` Sven Eckelmann [this message]
2018-05-21 10:49   ` Linus Lüssing
2018-05-21 14:32     ` Sven Eckelmann
2018-05-18 22:08 ` Sven Eckelmann
2018-05-21 11:04   ` Linus Lüssing

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=1566281.z125QuZFdt@sven-edge \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.