0,0 → 1,108 |
/* |
* Copyright (c) 2009 Lukas Mejdrech |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
|
/** @addtogroup icmp |
* @{ |
*/ |
|
/** @file |
* ICMP module messages. |
* @see icmp_interface.h |
*/ |
|
#ifndef __NET_ICMP_MESSAGES__ |
#define __NET_ICMP_MESSAGES__ |
|
#include <ipc/ipc.h> |
|
#include "../../messages.h" |
|
/** ICMP module messages. |
*/ |
typedef enum{ |
/** Sends echo request. |
* @see icmp_echo() |
*/ |
NET_ICMP_ECHO = NET_ICMP_FIRST, |
/** Sends destination unreachable error message. |
* @see icmp_destination_unreachable_msg() |
*/ |
NET_ICMP_DEST_UNREACH, |
/** Sends source quench error message. |
* @see icmp_source_quench_msg() |
*/ |
NET_ICMP_SOURCE_QUENCH, |
/** Sends redirect error message. |
* @see icmp_redirect_msg() |
*/ |
NET_ICMP_REDIRECT, |
/** Sends time exceeded error message. |
* @see icmp_time_exceeded_msg() |
*/ |
NET_ICMP_TIME_EXCEEDED, |
/** Sends parameter problem error message. |
* @see icmp_parameter_problem_msg() |
*/ |
NET_ICMP_PARAMETERPROB, |
} icmp_messages; |
|
/** @name ICMP specific message parameters definitions |
*/ |
/*@{*/ |
|
/** Returns the ICMP code message parameter. |
* @param call The message call structure. Input parameter. |
*/ |
#define ICMP_GET_CODE( call ) ( uint8_t ) IPC_GET_ARG1( * call ) |
|
/** Returns the echo identifier message parameter. |
* @param call The message call structure. Input parameter. |
*/ |
#define ICMP_GET_IDENTIFIER( call ) ( uint8_t ) IPC_GET_ARG1( * call ) |
|
/** Returns the echo sequence number message parameter. |
* @param call The message call structure. Input parameter. |
*/ |
#define ICMP_GET_SEQUENCE( call ) ( uint8_t ) IPC_GET_ARG2( * call ) |
|
/** Returns the ICMP link MTU message parameter. |
* @param call The message call structure. Input parameter. |
*/ |
#define ICMP_GET_MTU( call ) ( uint16_t ) IPC_GET_ARG3( * call ) |
|
/** Returns the pointer message parameter. |
* @param call The message call structure. Input parameter. |
*/ |
#define ICMP_GET_POINTER( call ) ( uint16_t ) IPC_GET_ARG3( * call ) |
|
/*@}*/ |
|
#endif |
|
/** @} |
*/ |
Property changes: |
Added: svn:eol-style |
+native |
\ No newline at end of property |