sicslow_ethernet.h

00001 /**
00002  * \file sicslow_ethernet.c
00003  *         Routines to interface between Ethernet and 6LowPan
00004  *
00005  * \author
00006  *         Colin O'Flynn <coflynn@newae.com>
00007  *
00008  * \addtogroup usbstick 
00009  */
00010 
00011 /* Copyright (c) 2008 by:
00012 
00013         Colin O'Flynn coflynn@newae.com
00014         Eric Gnoske egnoske@gmail.com
00015         Blake Leverett bleverett@gmail.com
00016         Mike Vidales mavida404@gmail.com
00017         Kevin Brown kbrown3@uccs.edu
00018         Nate Bohlmann nate@elfwerks.com
00019 
00020    All rights reserved.
00021 
00022    Redistribution and use in source and binary forms, with or without
00023    modification, are permitted provided that the following conditions are met:
00024 
00025    * Redistributions of source code must retain the above copyright
00026      notice, this list of conditions and the following disclaimer.
00027    * Redistributions in binary form must reproduce the above copyright
00028      notice, this list of conditions and the following disclaimer in
00029      the documentation and/or other materials provided with the
00030      distribution.
00031    * Neither the name of the copyright holders nor the names of
00032      contributors may be used to endorse or promote products derived
00033      from this software without specific prior written permission.
00034 
00035   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00036   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00037   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00038   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00039   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00040   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00041   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00042   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00043   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00044   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00045   POSSIBILITY OF SUCH DAMAGE.
00046 */
00047 
00048 #ifndef SICSLOW_ETHERNET_H
00049 #define SICSLOW_ETHERNET_H
00050 
00051 #if !RF230BB
00052 #include "sicslowmac.h"
00053 #include "frame.h"
00054 #endif
00055 
00056 typedef enum {
00057     ll_802154_type,
00058         ll_8023_type
00059 } lltype_t;
00060 
00061 
00062 typedef struct {
00063         uint8_t sicslowpan      :1;
00064         uint8_t sendToRf        :1;
00065         uint8_t translate       :1;
00066         uint8_t raw         :1;
00067         uint8_t debugOn     :1;
00068     uint8_t sneeze      :1;
00069 } usbstick_mode_t;
00070 
00071 
00072 #define UIP_ETHTYPE_802154 0x809A
00073 
00074 extern usbstick_mode_t usbstick_mode;
00075 
00076 
00077 int8_t mac_translateIcmpLinkLayer(lltype_t target);
00078 int8_t mac_translateIPLinkLayer(lltype_t target);
00079 void mac_LowpanToEthernet(void);
00080 void mac_ethernetToLowpan(uint8_t * ethHeader);
00081 void mac_ethernetSetup(void);
00082 #if !RF230BB
00083 void mac_802154raw(const struct mac_driver *r);
00084 void mac_logTXtoEthernet(frame_create_params_t *p,frame_result_t *frame_result);
00085 #endif
00086 
00087 #endif
00088 

Generated on Mon Apr 11 14:23:42 2011 for Contiki 2.5 by  doxygen 1.6.1