1: /*
2: * $Id: libnet_link_none.c,v 1.1.1.3 2023/09/27 11:11:38 misho Exp $
3: *
4: * libnet
5: * libnet_none.c - dummy routines for suckers with no link-layer interface
6: *
7: * Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
8: * All rights reserved.
9: *
10: * Copyright (c) 1993, 1994, 1995, 1996, 1998
11: * The Regents of the University of California. All rights reserved.
12: *
13: * Redistribution and use in source and binary forms, with or without
14: * modification, are permitted provided that: (1) source code distributions
15: * retain the above copyright notice and this paragraph in its entirety, (2)
16: * distributions including binary code include the above copyright notice and
17: * this paragraph in its entirety in the documentation or other materials
18: * provided with the distribution, and (3) all advertising materials mentioning
19: * features or use of this software display the following acknowledgment:
20: * ``This product includes software developed by the University of California,
21: * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
22: * the University nor the names of its contributors may be used to endorse
23: * or promote products derived from this software without specific prior
24: * written permission.
25: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
26: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
27: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
28: */
29:
30: #include "common.h"
31:
32: static void nosupport(libnet_t* l)
33: {
34: snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
35: "%s(): no link support on this platform", __func__);
36: }
37:
38: int
39: libnet_open_link(libnet_t *l)
40: {
41: nosupport(l);
42: return -1;
43: }
44:
45:
46: int
47: libnet_close_link(libnet_t *l)
48: {
49: nosupport(l);
50: return -1;
51: }
52:
53:
54: int
55: libnet_write_link(libnet_t *l, const uint8_t *packet, uint32_t size)
56: {
57: nosupport(l);
58: return -1;
59: }
60:
61:
62: struct libnet_ether_addr *
63: libnet_get_hwaddr(libnet_t *l)
64: {
65: nosupport(l);
66: return NULL;
67: }
68:
69: /**
70: * Local Variables:
71: * indent-tabs-mode: nil
72: * c-file-style: "stroustrup"
73: * End:
74: */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>