flood.h

来自「MANTIS是由科罗拉多大学开发的传感器网络嵌入式操作系统。 这是mantis」· C头文件 代码 · 共 69 行

H
69
字号
//  This file is part of MANTIS OS, Operating System//  See http://mantis.cs.colorado.edu/////  Copyright (C) 2003,2004,2005 University of Colorado, Boulder////  This program is free software; you can redistribute it and/or//  modify it under the terms of the mos license (see file LICENSE)/**************************************************************************//* File:       flood.h                                                    *//* Author:     Jeff Rose   :  rosejn@colorado.edu                         *//*   Date: 04/15/04                                                       *//*                                                                        *//* Broadcast flooding implemented for the mos net layer.                  *//**************************************************************************//** @file flood.h * @brief A broadcast flooding implementation for the mos net layer. * @author Jeff Rose * @date 04/15/2004 */#ifndef _FLOOD_H_#define _FLOOD_H_#include "mos.h"#include "net.h"#include "com.h"#include "printf.h"#include <stdarg.h>#define FLOOD_PROTO_ID 1typedef struct flood_pkt_t{   uint16_t src;   uint16_t dest;   uint8_t seq_num;} flood_pkt;/** @brief Setup the flooding protocol and register with the net layer. */void flood_init();/** @brief Send a packet using the flooding protocol.  * @param pkt Packet to send * @param args Arguements*/int8_t flood_send(comBuf * pkt, va_list args);/** @brief Receive a packet that came using the flooding protocol.  * * NOTE: Must subtract the sizeof route header from pkt->size so *       the net layer can determine whether any more data is available. * @param pkt Packet received * @param footer Location * @return FALSE if failure, else return TRUE */boolean flood_recv(comBuf *pkt, uint8_t **footer, uint8_t port);/* Set some protocol specific parameters. *//** @brief Set some protocol specific parameters.  * @param request IO request * @param args Arguements */int8_t flood_ioctl(uint8_t request, va_list args);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?