|
Contiki 2.5
|
Routines to interface between Ethernet and 6LowPanMore...
#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.
Macros | |
| #define | DEBUG 0 |
| #define | LSB(u16) (((uint8_t *)&(u16))[0]) |
| Least significant byte of u16. | |
| #define | MSB(u16) (((uint8_t *)&(u16))[1]) |
| Most significant byte of u16. | |
| #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. More... | |
| uint8_t | mac_createEthernetAddr (uint8_t *ethernet, uip_lladdr_t *lowpan) |
| Create a 802.3 address from a 802.15.4 long address. More... | |
| uint8_t | mac_createDefaultEthernetAddr (uint8_t *ethernet) |
| Create a 802.3 address (default) More... | |
| void | mac_ethhijack (const struct mac_driver *r) |
| Process a received 6lowpan packet. More... | |
| 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) More... | |
| void | slide (uint8_t *data, uint8_t length, int16_t slide) |
| Slide the pointed to memory up a certain amount, growing/shrinking a buffer. More... | |
| int8_t | mac_translateIcmpLinkLayer (lltype_t target) |
| Translate the link-layer (L2) addresses in an ICMP packet. More... | |
| void | mac_logTXtoEthernet (frame_create_params_t *p, frame_result_t *frame_result) |
| Logs a sent 6lowpan frame. More... | |
| void | mac_802154raw (const struct mac_driver *r) |
| Process a received 6lowpan packet. More... | |
Variables | |
| uint64_t | macLongAddr |
| Our own long address. More... | |
| struct mac_driver * | pmac |
| Perform any setup needed. | |
Routines to interface between Ethernet and 6LowPan
Definition in file sicslow_ethernet.c.
| void mac_802154raw | ( | const struct mac_driver * | r | ) |
Process a received 6lowpan packet.
| 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.
1.8.3.1