init

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ip.h Source File

ip.h

00001 /*
00002  * Copyright (c) 2015, 2017, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef _COMMON_PROTOCOLS_IP_H
00019 #define _COMMON_PROTOCOLS_IP_H
00020 
00021 /* Traffic class octet defines */
00022 #define IP_TCLASS_DSCP_MASK     0xFC
00023 #define IP_TCLASS_DSCP_SHIFT    2
00024 #define IP_TCLASS_ECN_MASK      0x03
00025 
00026 /* Differentiated Services Code Points in bits 0-5 */
00027 #define IP_DSCP_CS0         0
00028 #define IP_DSCP_CS1         8
00029 #define IP_DSCP_AF11        10
00030 #define IP_DSCP_AF12        12
00031 #define IP_DSCP_AF13        14
00032 #define IP_DSCP_CS2         16
00033 #define IP_DSCP_AF21        18
00034 #define IP_DSCP_AF22        20
00035 #define IP_DSCP_AF23        22
00036 #define IP_DSCP_CS3         24
00037 #define IP_DSCP_AF31        26
00038 #define IP_DSCP_AF32        28
00039 #define IP_DSCP_AF33        30
00040 #define IP_DSCP_CS4         32
00041 #define IP_DSCP_AF41        34
00042 #define IP_DSCP_AF42        36
00043 #define IP_DSCP_AF43        38
00044 #define IP_DSCP_CS5         40
00045 #define IP_DSCP_VOICE_ADMIT 44
00046 #define IP_DSCP_EF          46
00047 #define IP_DSCP_CS6         48
00048 #define IP_DSCP_CS7         56
00049 
00050 /* Explicit Congestion Notification codepoint in bits 6+7 of traffic class */
00051 
00052 #define IP_ECN_NOT_ECT      0 // Not ECN-Capable Transport
00053 #define IP_ECN_ECT_1        1 // ECN-Capable Transport(1)
00054 #define IP_ECN_ECT_0        2 // ECN-Capable Transport(0)
00055 #define IP_ECN_CE           3 // Congestion Experienced
00056 
00057 #endif /* _COMMON_PROTOCOLS_IP_H */