Annotation of embedaddon/libnet/src/libnet_link_none.c, revision 1.1.1.2
1.1 misho 1: /*
2: * $Id: libnet_link_none.c,v 1.5 2004/01/03 20:31:02 mike 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 acknowledgement:
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: #if (HAVE_CONFIG_H)
31: #include "../include/config.h"
32: #endif
33: #if (!(_WIN32) || (__CYGWIN__))
34: #include "../include/libnet.h"
35: #else
36: #include "../include/win32/libnet.h"
37: #endif
38:
1.1.1.2 ! misho 39: static void nosupport(libnet_t* l)
! 40: {
! 41: snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
! 42: "%s(): no link support on this platform\n", __func__);
! 43: }
! 44:
1.1 misho 45: int
46: libnet_open_link(libnet_t *l)
47: {
1.1.1.2 ! misho 48: nosupport(l);
! 49: return -1;
1.1 misho 50: }
51:
52:
53: int
54: libnet_close_link(libnet_t *l)
55: {
1.1.1.2 ! misho 56: nosupport(l);
! 57: return -1;
1.1 misho 58: }
59:
60:
61: int
1.1.1.2 ! misho 62: libnet_write_link(libnet_t *l, const uint8_t *packet, uint32_t size)
1.1 misho 63: {
1.1.1.2 ! misho 64: nosupport(l);
! 65: return -1;
1.1 misho 66: }
67:
68:
69: struct libnet_ether_addr *
70: libnet_get_hwaddr(libnet_t *l)
71: {
1.1.1.2 ! misho 72: nosupport(l);
! 73: return NULL;
1.1 misho 74: }
75:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>