Move net/agr/ieee8023_slowprotocols.h to net/ether_slowprotocols.h

Definitions related to slowprotocols are duplicated between
agr/ieee8023ad_slowprotocols.h and lagg/if_lagg_lacp.h
Therefore, the contents are moved to added file.

Note: currently, there are just LACP and Marker protocol,
however slowprotocols is independent of them.
This commit is contained in:
yamaguchi 2021-11-30 01:17:02 +00:00
parent a99ea20b58
commit 39a10a7057
14 changed files with 42 additions and 50 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp.c,v 1.12 2021/09/30 03:15:25 yamaguchi Exp $ */
/* $NetBSD: ieee8023ad_lacp.c,v 1.13 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.12 2021/09/30 03:15:25 yamaguchi Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.13 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -40,10 +40,10 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.12 2021/09/30 03:15:25 yamaguc
#include <net/if_dl.h>
#include <net/if_ether.h>
#include <net/if_media.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/if_agrvar_impl.h>
#include <net/agr/if_agrsubr.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad.h>
#include <net/agr/ieee8023ad_lacp.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp_debug.c,v 1.6 2011/07/17 20:54:52 joerg Exp $ */
/* $NetBSD: ieee8023ad_lacp_debug.c,v 1.7 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_debug.c,v 1.6 2011/07/17 20:54:52 joerg Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_debug.c,v 1.7 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -35,8 +35,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_debug.c,v 1.6 2011/07/17 20:54:52 jo
#include <net/if.h>
#include <net/if_ether.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad_lacp.h>
#include <net/agr/ieee8023ad_lacp_impl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp_select.c,v 1.5 2007/02/22 06:20:16 thorpej Exp $ */
/* $NetBSD: ieee8023ad_lacp_select.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_select.c,v 1.5 2007/02/22 06:20:16 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_select.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -36,9 +36,9 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_select.c,v 1.5 2007/02/22 06:20:16 t
#include <net/if.h>
#include <net/if_ether.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/if_agrvar_impl.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad_lacp.h>
#include <net/agr/ieee8023ad_lacp_impl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $ */
/* $NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -36,8 +36,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_mux.c,v 1.4 2007/02/21 23:00:07 t
#include <net/if.h>
#include <net/if_ether.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad_lacp.h>
#include <net/agr/ieee8023ad_lacp_impl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.3 2005/12/11 12:24:54 christos Exp $ */
/* $NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.4 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.3 2005/12/11 12:24:54 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.4 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -36,8 +36,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_ptx.c,v 1.3 2005/12/11 12:24:54 c
#include <net/if.h>
#include <net/if_ether.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad_lacp.h>
#include <net/agr/ieee8023ad_lacp_impl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $ */
/* $NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -36,8 +36,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_rx.c,v 1.4 2007/02/21 23:00:07 th
#include <net/if.h>
#include <net/if_ether.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad_lacp.h>
#include <net/agr/ieee8023ad_lacp_impl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.4 2020/05/15 19:28:10 maxv Exp $ */
/* $NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.4 2020/05/15 19:28:10 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.5 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -37,8 +37,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.4 2020/05/15 19:28:10 ma
#include <net/if.h>
#include <net/if_ether.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad_lacp.h>
#include <net/agr/ieee8023ad_lacp_impl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp_timer.c,v 1.5 2006/10/22 03:39:43 uebayasi Exp $ */
/* $NetBSD: ieee8023ad_lacp_timer.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_timer.c,v 1.5 2006/10/22 03:39:43 uebayasi Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_timer.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -35,8 +35,8 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_timer.c,v 1.5 2006/10/22 03:39:43 ue
#include <net/if.h>
#include <net/if_ether.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad_lacp.h>
#include <net/agr/ieee8023ad_lacp_impl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_marker.c,v 1.5 2021/09/30 03:15:25 yamaguchi Exp $ */
/* $NetBSD: ieee8023ad_marker.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_marker.c,v 1.5 2021/09/30 03:15:25 yamaguchi Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_marker.c,v 1.6 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -36,9 +36,9 @@ __KERNEL_RCSID(0, "$NetBSD: ieee8023ad_marker.c,v 1.5 2021/09/30 03:15:25 yamagu
#include <net/if.h>
#include <net/if_ether.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/if_agrvar_impl.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad.h>
#include <net/agr/ieee8023ad_marker.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_agrether.c,v 1.11 2019/11/10 21:16:38 chs Exp $ */
/* $NetBSD: if_agrether.c,v 1.12 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_agrether.c,v 1.11 2019/11/10 21:16:38 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_agrether.c,v 1.12 2021/11/30 01:17:02 yamaguchi Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -38,12 +38,12 @@ __KERNEL_RCSID(0, "$NetBSD: if_agrether.c,v 1.11 2019/11/10 21:16:38 chs Exp $")
#include <net/if_dl.h>
#include <net/if_ether.h>
#include <net/if_media.h>
#include <net/ether_slowprotocols.h>
#include <net/agr/if_agrvar_impl.h>
#include <net/agr/if_agrethervar.h>
#include <net/agr/if_agrsubr.h>
#include <net/agr/ieee8023_slowprotocols.h>
#include <net/agr/ieee8023_tlv.h>
#include <net/agr/ieee8023ad.h>
#include <net/agr/ieee8023ad_lacp.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023_slowprotocols.h,v 1.2 2005/12/10 23:21:39 elad Exp $ */
/* $NetBSD: ether_slowprotocols.h,v 1.1 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -26,15 +26,13 @@
* SUCH DAMAGE.
*/
#ifndef _NET_AGR_IEEE8023_SLOWPROTOCOLS_H_
#define _NET_AGR_IEEE8023_SLOWPROTOCOLS_H_
#ifndef _NET_ETHER_SLOWPROTOCOLS_H_
#define _NET_ETHER_SLOWPROTOCOLS_H_
/*
* IEEE802.3 slow protocols
*
* protocol (on-wire) definitions.
*
* XXX should be elsewhere.
*/
#define SLOWPROTOCOLS_SUBTYPE_LACP 1
@ -45,4 +43,4 @@ struct slowprothdr {
uint8_t sph_version;
} __packed;
#endif /* !_NET_AGR_IEEE8023_SLOWPROTOCOLS_H_ */
#endif /* !_NET_ETHER_SLOWPROTOCOLS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ethersubr.c,v 1.305 2021/11/25 00:49:34 msaitoh Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.306 2021/11/30 01:17:02 yamaguchi Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.305 2021/11/25 00:49:34 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.306 2021/11/30 01:17:02 yamaguchi Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -120,7 +120,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.305 2021/11/25 00:49:34 msaitoh E
#endif
#if NAGR > 0
#include <net/agr/ieee8023_slowprotocols.h> /* XXX */
#include <net/ether_slowprotocols.h>
#include <net/agr/ieee8023ad.h>
#include <net/agr/if_agrvar.h>
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_lagg_lacp.c,v 1.8 2021/11/16 04:48:43 yamaguchi Exp $ */
/* $NetBSD: if_lagg_lacp.c,v 1.9 2021/11/30 01:17:02 yamaguchi Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-NetBSD
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.8 2021/11/16 04:48:43 yamaguchi Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.9 2021/11/30 01:17:02 yamaguchi Exp $");
#ifdef _KERNEL_OPT
#include "opt_lagg.h"
@ -52,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.8 2021/11/16 04:48:43 yamaguchi E
#include <net/if_ether.h>
#include <net/if_media.h>
#include <net/ether_slowprotocols.h>
#include <net/lagg/if_lagg.h>
#include <net/lagg/if_laggproto.h>
#include <net/lagg/if_lagg_lacp.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_lagg_lacp.h,v 1.2 2021/05/24 06:08:28 yamaguchi Exp $ */
/* $NetBSD: if_lagg_lacp.h,v 1.3 2021/11/30 01:17:02 yamaguchi Exp $ */
/*
* Copyright (c) 2021 Internet Initiative Japan Inc.
@ -48,14 +48,6 @@
LACP_STATE_DISTRIBUTING)
#define LACP_PARTNER_ADMIN_STRICT 0
#define SLOWPROTOCOLS_SUBTYPE_LACP 1
#define SLOWPROTOCOLS_SUBTYPE_MARKER 2
struct slowprothdr {
uint8_t sph_subtype;
uint8_t sph_version;
} __packed;
#define TLV_TYPE_TERMINATE 0
#define LACP_TYPE_TERMINATE TLV_TYPE_TERMINATE