Annotation of embedaddon/libnet/src/libnet_link_none.c, revision 1.1.1.3
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
1.1.1.3 ! misho 19: * features or use of this software display the following acknowledgment:
1.1 misho 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:
1.1.1.3 ! misho 30: #include "common.h"
1.1 misho 31:
1.1.1.2 misho 32: static void nosupport(libnet_t* l)
33: {
34: snprintf(l->err_buf, LIBNET_ERRBUF_SIZE,
1.1.1.3 ! misho 35: "%s(): no link support on this platform", __func__);
1.1.1.2 misho 36: }
37:
1.1 misho 38: int
39: libnet_open_link(libnet_t *l)
40: {
1.1.1.2 misho 41: nosupport(l);
42: return -1;
1.1 misho 43: }
44:
45:
46: int
47: libnet_close_link(libnet_t *l)
48: {
1.1.1.2 misho 49: nosupport(l);
50: return -1;
1.1 misho 51: }
52:
53:
54: int
1.1.1.2 misho 55: libnet_write_link(libnet_t *l, const uint8_t *packet, uint32_t size)
1.1 misho 56: {
1.1.1.2 misho 57: nosupport(l);
58: return -1;
1.1 misho 59: }
60:
61:
62: struct libnet_ether_addr *
63: libnet_get_hwaddr(libnet_t *l)
64: {
1.1.1.2 misho 65: nosupport(l);
66: return NULL;
1.1 misho 67: }
68:
1.1.1.3 ! misho 69: /**
! 70: * Local Variables:
! 71: * indent-tabs-mode: nil
! 72: * c-file-style: "stroustrup"
! 73: * End:
! 74: */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>