head	1.4;
access;
symbols
	netbsd-11-0-RC6:1.4
	netbsd-11-0-RC5:1.4
	netbsd-11-0-RC4:1.4
	netbsd-11-0-RC3:1.4
	netbsd-11-0-RC2:1.4
	netbsd-11-0-RC1:1.4
	perseant-exfatfs-base-20250801:1.4
	netbsd-11:1.4.0.2
	netbsd-11-base:1.4
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.10
	perseant-exfatfs-base:1.3
	netbsd-8-3-RELEASE:1.2
	netbsd-9-4-RELEASE:1.2
	netbsd-10-0-RELEASE:1.3
	netbsd-10-0-RC6:1.3
	netbsd-10-0-RC5:1.3
	netbsd-10-0-RC4:1.3
	netbsd-10-0-RC3:1.3
	netbsd-10-0-RC2:1.3
	netbsd-10-0-RC1:1.3
	netbsd-10:1.3.0.8
	netbsd-10-base:1.3
	netbsd-9-3-RELEASE:1.2
	cjep_sun2x-base1:1.3
	cjep_sun2x:1.3.0.6
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	netbsd-9-2-RELEASE:1.2
	cjep_staticlib_x:1.3.0.4
	cjep_staticlib_x-base:1.3
	netbsd-9-1-RELEASE:1.2
	phil-wifi-20200421:1.3
	phil-wifi-20200411:1.3
	is-mlppp:1.3.0.2
	is-mlppp-base:1.3
	phil-wifi-20200406:1.3
	netbsd-8-2-RELEASE:1.2
	netbsd-9-0-RELEASE:1.2
	netbsd-9-0-RC2:1.2
	netbsd-9-0-RC1:1.2
	phil-wifi-20191119:1.2
	netbsd-9:1.2.0.12
	netbsd-9-base:1.2
	phil-wifi-20190609:1.2
	netbsd-8-1-RELEASE:1.2
	netbsd-8-1-RC1:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	netbsd-8-0-RELEASE:1.2
	phil-wifi:1.2.0.10
	phil-wifi-base:1.2
	pgoyette-compat-0625:1.2
	netbsd-8-0-RC2:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	netbsd-8-0-RC1:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.8
	pgoyette-compat-base:1.2
	matt-nb8-mediatek:1.2.0.6
	matt-nb8-mediatek-base:1.2
	perseant-stdc-iso10646:1.2.0.4
	perseant-stdc-iso10646-base:1.2
	netbsd-8:1.2.0.2
	netbsd-8-base:1.2
	prg-localcount2-base3:1.1
	prg-localcount2-base2:1.1
	prg-localcount2-base1:1.1
	prg-localcount2:1.1.0.4
	prg-localcount2-base:1.1
	pgoyette-localcount-20170426:1.1
	bouyer-socketcan-base1:1.1
	pgoyette-localcount-20170320:1.1
	bouyer-socketcan:1.1.0.2;
locks; strict;
comment	@# @;


1.4
date	2024.12.11.19.57.13;	author andvar;	state Exp;
branches;
next	1.3;
commitid	j9a3Rtx3SvF7z7BF;

1.3
date	2020.03.01.18.08.16;	author christos;	state Exp;
branches
	1.3.10.1;
next	1.2;
commitid	M7sRI2w4ldl05JYB;

1.2
date	2017.05.27.21.02.56;	author bouyer;	state Exp;
branches
	1.2.10.1;
next	1.1;
commitid	5Vp3aAWVaRrdt4Tz;

1.1
date	2017.01.15.20.29.01;	author bouyer;	state dead;
branches
	1.1.2.1;
next	;
commitid	GRqkKeE4iYVqx6Cz;

1.3.10.1
date	2025.08.02.05.58.10;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.2.10.1
date	2020.04.08.14.09.11;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;

1.1.2.1
date	2017.01.15.20.29.01;	author bouyer;	state Exp;
branches;
next	1.1.2.2;
commitid	GRqkKeE4iYVqx6Cz;

1.1.2.2
date	2017.02.04.22.26.16;	author bouyer;	state Exp;
branches;
next	1.1.2.3;
commitid	50J75YVV1I8MxGEz;

1.1.2.3
date	2017.02.05.10.56.12;	author bouyer;	state Exp;
branches;
next	;
commitid	WGaWljLk0yW3HKEz;


desc
@@


1.4
log
@s/inclued/included/ in comment.
@
text
@# $NetBSD: Makefile,v 1.3 2020/03/01 18:08:16 christos Exp $
#

.include <bsd.own.mk>

TESTSDIR=	${TESTSBASE}/net/can

TESTS_C=	t_can t_canfilter

SRCS.t_can=		t_can.c h_canutils.c

SRCS.t_canfilter=	t_canfilter.c h_canutils.c

# XXX we don't use INET here, but we need rumpnet_netinet anyway:
# common code in if.c is compiled with -DINET and will dereference ip_pktq,
# which is NULL if rumpnet_netinet is not included.
# 
LDADD+=		-lrumpnet_netcan -lrumpnet_netinet -lrumpnet_net -lrumpnet
LDADD+=		${LIBRUMPBASE}

.include <bsd.test.mk>
@


1.3
log
@Centralize the base rump libraries into a variable used by all the other
Makefiles so that we can make changes to it centrally as needed and have
less mess. Fixes the sun2 build that needs rumpvfs after librump after
the latest changes.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2017/05/27 21:02:56 bouyer Exp $
d16 1
a16 1
# which is NULL if rumpnet_netinet is not inclued.
@


1.3.10.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2024/12/11 19:57:13 andvar Exp $
d16 1
a16 1
# which is NULL if rumpnet_netinet is not included.
@


1.2
log
@merge the bouyer-socketcan branch to HEAD.

CAN stands for Controller Area Network, a broadcast network used
in automation and automotive fields. For example, the NMEA2000 standard
developped for marine devices uses a CAN network as the link layer.

This is an implementation of the linux socketcan API:
https://www.kernel.org/doc/Documentation/networking/can.txt
you can also see can(4).

This adds a new socket family (AF_CAN) and protocol (PF_CAN),
as well as the canconfig(8) utility, used to set timing parameter of
CAN hardware. Also inclued is a driver for the CAN controller
found in the allwinner A20 SoC (I tested it with an Olimex lime2 board,
connected with PIC18-based CAN devices).

There is also the canloop(4) pseudo-device, which allows to use
the socketcan API without CAN hardware.

At this time the CANFD part of the linux socketcan API is not implemented.
Error frames are not implemented either. But I could get the cansend and
canreceive utilities from the canutils package to build and run with minimal
changes. tcpudmp(8) can also be used to record frames, which can be
decoded with etherreal.
@
text
@d1 1
a1 1
# $NetBSD$
d19 1
a19 1
LDADD+=		-lrump -lrumpuser -lrump -lpthread -lrumpdev -lrumpvfs
@


1.2.10.1
log
@Merge changes from current as of 20200406
@
text
@d19 1
a19 1
LDADD+=		${LIBRUMPBASE}
@


1.1
log
@file Makefile was initially added on branch bouyer-socketcan.
@
text
@d1 21
@


1.1.2.1
log
@Basic tests for our SocketCAN implementation (using rump)
@
text
@a0 17
# $NetBSD: Makefile,v 1.9 2016/11/24 09:06:09 ozaki-r Exp $
#

.include <bsd.own.mk>

TESTSDIR=	${TESTSBASE}/net/can

TESTS_C=	t_can

# XXX we don't use INET here, but we need rumpnet_netinet anyway:
# common code in if.c is compiled with -DINET and will dereference ip_pktq,
# which is NULL if rumpnet_netinet is not inclued.
# 
LDADD+=		-lrumpnet_netcan -lrumpnet_netinet -lrumpnet_net -lrumpnet
LDADD+=		-lrump -lrumpuser -lrump -lpthread -lrumpdev -lrumpvfs

.include <bsd.test.mk>
@


1.1.2.2
log
@Factor out reading from a can socket, and move to a helper file.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1.2.1 2017/01/15 20:29:01 bouyer Exp $
a8 1
SRCS.t_can=	t_can.c h_canutils.c
@


1.1.2.3
log
@Implement CAN_RAW_FILTER socket option, and add tests for it.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1.2.2 2017/02/04 22:26:16 bouyer Exp $
d8 2
a9 5
TESTS_C=	t_can t_canfilter

SRCS.t_can=		t_can.c h_canutils.c

SRCS.t_canfilter=	t_canfilter.c h_canutils.c
@


