2007-09-03 05:58:35 +08:00
|
|
|
/****************************************************************************
|
2012-07-17 11:58:11 +08:00
|
|
|
* include/netinet/ip6.h
|
2007-09-03 05:58:35 +08:00
|
|
|
*
|
2021-02-03 18:33:49 +08:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2007-09-03 05:58:35 +08:00
|
|
|
*
|
2021-02-03 18:33:49 +08:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2007-09-03 05:58:35 +08:00
|
|
|
*
|
2021-02-03 18:33:49 +08:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2007-09-03 05:58:35 +08:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2020-02-01 02:09:01 +08:00
|
|
|
#ifndef __INCLUDE_NETINET_IP6_H
|
|
|
|
#define __INCLUDE_NETINET_IP6_H
|
2007-09-03 05:58:35 +08:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Public Type Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
2023-04-13 23:36:00 +08:00
|
|
|
struct ip6_hdr
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct ip6_hdrctl
|
|
|
|
{
|
|
|
|
uint32_t ip6_un1_flow; /* 4 bits version, 8 bits TC, 20 bits flow-ID */
|
|
|
|
uint16_t ip6_un1_plen; /* payload length */
|
|
|
|
uint8_t ip6_un1_nxt; /* next header */
|
|
|
|
uint8_t ip6_un1_hlim; /* hop limit */
|
|
|
|
} ip6_un1;
|
|
|
|
|
|
|
|
uint8_t ip6_un2_vfc; /* 4 bits version, top 4 bits tclass */
|
|
|
|
} ip6_ctlun;
|
|
|
|
|
|
|
|
struct in6_addr ip6_src; /* source address */
|
|
|
|
struct in6_addr ip6_dst; /* destination address */
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ip6_vfc ip6_ctlun.ip6_un2_vfc
|
|
|
|
#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
|
|
|
|
#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
|
|
|
|
#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
|
|
|
|
#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
|
|
|
|
#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
|
|
|
|
|
2007-09-03 05:58:35 +08:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Function Prototypes
|
|
|
|
****************************************************************************/
|
|
|
|
|
2020-02-01 02:09:01 +08:00
|
|
|
#endif /* __INCLUDE_NETINET_IP6_H */
|