sicslow_ethernet.c File Reference

Routines to interface between Ethernet and 6LowPan. More...

#include "uip.h"
#include "uip_arp.h"
#include "net/rime.h"
#include "sicslowpan.h"
#include "sicslow_ethernet.h"
#include "zmac.h"
#include "frame.h"
#include "radio.h"
#include "rndis/rndis_protocol.h"
#include "rndis/rndis_task.h"
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "net/uip-icmp6.h"
#include "net/uip-nd6.h"

Go to the source code of this file.

Defines

#define DEBUG   0
#define TRANSLATE_BIT_MASK   (1<<2)
 Location of TRANSLATE (TR) bit in Ethernet address.
#define LOCAL_BIT_MASK   (1<<1)
 Location of LOCAL (GL) bit in Ethernet address.
#define MULTICAST_BIT_MASK   (1<<0)
 Location of MULTICAST (MU) bit in Ethernet address.

Functions

uint8_t mac_createSicslowpanLongAddr (uint8_t *ethernet, uip_lladdr_t *lowpan)
 Create a 802.15.4 long address from a 802.3 address.
uint8_t mac_createEthernetAddr (uint8_t *ethernet, uip_lladdr_t *lowpan)
 Create a 802.3 address from a 802.15.4 long address.
uint8_t mac_createDefaultEthernetAddr (uint8_t *ethernet)
 Create a 802.3 address (default).
void mac_ethhijack (const struct mac_driver *r)
 Process a received 6lowpan packet.
void mac_ethernetToLowpan (uint8_t *ethHeader)
 Take a packet received over the ethernet link, and send it out over 802.15.4.
void mac_LowpanToEthernet (void)
 Take a packet received over the 802.15.4 link, and send it out over ethernet, performing any translations needed.
int8_t mac_translateIPLinkLayer (lltype_t target)
 Translate IP packet's possible link-layer addresses, passing the message to the appropriate higher level function for this packet (aka: ICMP).
void slide (uint8_t *data, uint8_t length, int16_t slide)
 Slide the pointed to memory up a certain amount, growing/shrinking a buffer.
int8_t mac_translateIcmpLinkLayer (lltype_t target)
 Translate the link-layer (L2) addresses in an ICMP packet.
void mac_logTXtoEthernet (frame_create_params_t *p, frame_result_t *frame_result)
 Logs a sent 6lowpan frame.
void mac_802154raw (const struct mac_driver *r)
 Process a received 6lowpan packet.

Variables

uint64_t macLongAddr
 Our own long address.
struct mac_driverpmac
 Perform any setup needed.

Detailed Description

Routines to interface between Ethernet and 6LowPan.

Author:
Colin O'Flynn <coflynn@newae.com>

Definition in file sicslow_ethernet.c.


Function Documentation

void mac_802154raw ( const struct mac_driver r  ) 

Process a received 6lowpan packet.

Parameters:
r The MAC layer

The 6lowpan packet is put in packetbuf by the MAC. This routine passes it directly to the ethernet layer without decompressing.

Definition at line 1118 of file sicslow_ethernet.c.

Referenced by mac_ethhijack().

void mac_logTXtoEthernet ( frame_create_params_t p,
frame_result_t frame_result 
)

Logs a sent 6lowpan frame.

This routine passes a frame directly to the ethernet layer without decompressing.

Definition at line 1105 of file sicslow_ethernet.c.

References frame_result_t::frame, and frame_result_t::length.


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