2014-06-13 01:52:06 +08:00
|
|
|
/****************************************************************************
|
2021-03-09 05:39:04 +08:00
|
|
|
* include/netpacket/packet.h
|
2014-06-13 01:52:06 +08:00
|
|
|
*
|
2024-10-02 21:59:15 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
2021-05-26 16:23:01 +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
|
2014-06-13 01:52:06 +08:00
|
|
|
*
|
2021-05-26 16:23:01 +08:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2014-06-13 01:52:06 +08:00
|
|
|
*
|
2021-05-26 16:23:01 +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.
|
2014-06-13 01:52:06 +08:00
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef __INCLUDE_NETPACKET_PACKET_H
|
2020-02-01 02:07:39 +08:00
|
|
|
#define __INCLUDE_NETPACKET_PACKET_H
|
2014-06-13 01:52:06 +08:00
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* Included Files
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2024-12-31 04:11:33 +08:00
|
|
|
/****************************************************************************
|
|
|
|
* Pre-processor Definitions
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
/* Valid packet types for sll_pkttype */
|
|
|
|
|
|
|
|
#define PACKET_HOST 0 /* To us. */
|
|
|
|
#define PACKET_BROADCAST 1 /* To all. */
|
|
|
|
#define PACKET_MULTICAST 2 /* To group. */
|
|
|
|
#define PACKET_OTHERHOST 3 /* To someone else. */
|
|
|
|
#define PACKET_OUTGOING 4 /* Originated by us . */
|
|
|
|
#define PACKET_LOOPBACK 5
|
|
|
|
#define PACKET_FASTROUTE 6
|
|
|
|
|
2014-06-13 01:52:06 +08:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Types
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
struct sockaddr_ll
|
|
|
|
{
|
2022-06-02 15:21:16 +08:00
|
|
|
unsigned short sll_family;
|
|
|
|
unsigned short sll_protocol;
|
|
|
|
int sll_ifindex;
|
|
|
|
unsigned short sll_hatype;
|
|
|
|
unsigned char sll_pkttype;
|
|
|
|
unsigned char sll_halen;
|
|
|
|
unsigned char sll_addr[8];
|
2014-06-13 01:52:06 +08:00
|
|
|
};
|
|
|
|
|
2020-02-01 02:07:39 +08:00
|
|
|
#endif /* __INCLUDE_NETPACKET_PACKET_H */
|