NetBSD/sys/net/netisr_dispatch.h
bouyer 6e4cb2b9ab 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.
2017-05-27 21:02:54 +00:00

49 lines
1.0 KiB
C

/* $NetBSD: netisr_dispatch.h,v 1.19 2017/05/27 21:02:56 bouyer Exp $ */
#ifndef _NET_NETISR_DISPATCH_H_
#define _NET_NETISR_DISPATCH_H_
/*
* netisr_dispatch: This file is included by the
* machine dependent softnet function. The
* DONETISR macro should be set before including
* this file. i.e.:
*
* softintr() {
* ...do setup stuff...
* #define DONETISR(bit, fn) do { ... } while (0)
* #include <net/netisr_dispatch.h>
* #undef DONETISR
* ...do cleanup stuff.
* }
*/
#ifndef _NET_NETISR_H_
#error <net/netisr.h> must be included before <net/netisr_dispatch.h>
#endif
/*
* When adding functions to this list, be sure to add headers to provide
* their prototypes in <net/netisr.h> (if necessary).
*/
#ifdef INET
#if NARP > 0
DONETISR(NETISR_ARP,arpintr);
#endif
#endif
#ifdef NETATALK
DONETISR(NETISR_ATALK,atintr);
#endif
#ifdef MPLS
DONETISR(NETISR_MPLS,mplsintr);
#endif
#ifdef NATM
DONETISR(NETISR_NATM,natmintr);
#endif
#ifdef CAN
DONETISR(NETISR_CAN,canintr);
#endif
#endif /* !_NET_NETISR_DISPATCH_H_ */