libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / include / osl.h
blob24e7db583072e091998580dda49c6f0d553b6da7
1 /*
2 * OS Independent Layer
3 *
4 * Copyright 2004, Broadcom Corporation
5 * All Rights Reserved.
6 *
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
11 * $Id$
14 #ifndef _osl_h_
15 #define _osl_h_
17 /* osl handle type forward declaration */
18 typedef struct osl_info osl_t;
19 typedef struct osl_dmainfo osldma_t;
21 #define OSL_PKTTAG_SZ 32 /* Size of PktTag */
23 /* Drivers use PKTFREESETCB to register a callback function when a packet is freed by OSL */
24 typedef void (*pktfree_cb_fn_t)(void *ctx, void *pkt, unsigned int status);
26 #if defined(PCBIOS)
27 #include <pcbios_osl.h>
28 #elif defined(__IOPOS__)
29 #include <iopos_osl.h>
30 #elif defined(linux)
31 #include <linux_osl.h>
32 #elif defined(NDIS)
33 #include <ndis_osl.h>
34 #elif defined(_CFE_)
35 #include <cfe_osl.h>
36 #elif defined(_MINOSL_)
37 #include <min_osl.h>
38 #elif defined(MACOSX)
39 #include <macosx_osl.h>
40 #elif defined(__NetBSD__)
41 #include <bsd_osl.h>
42 #elif defined(EFI)
43 #include <efi_osl.h>
44 #else
45 #error "Unsupported OSL requested"
46 #endif
48 /* handy */
49 #define SET_REG(osh, r, mask, val) W_REG((osh), (r), ((R_REG((osh), r) & ~(mask)) | (val)))
51 #endif /* _osl_h_ */