File: if_packet.h

package info (click to toggle)
openvswitch 3.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 97,848 kB
  • sloc: sh: 1,643,930; ansic: 313,386; python: 27,939; xml: 21,526; makefile: 546; javascript: 191
file content (30 lines) | stat: -rw-r--r-- 768 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef FIX_LINUX_IF_PACKET_H
#define FIX_LINUX_IF_PACKET_H

#ifndef __CHECKER__
#error "Use this header only with sparse.  It is not a correct implementation."
#endif

#include_next <linux/if_packet.h>

/* Fix endianness of 'spkt_protocol' and 'sll_protocol' members. */

#define sockaddr_pkt rpl_sockaddr_pkt
struct sockaddr_pkt {
        unsigned short spkt_family;
        unsigned char spkt_device[14];
        ovs_be16 spkt_protocol;
};

#define sockaddr_ll rpl_sockaddr_ll
struct sockaddr_ll {
        unsigned short  sll_family;
        ovs_be16        sll_protocol;
        int             sll_ifindex;
        unsigned short  sll_hatype;
        unsigned char   sll_pkttype;
        unsigned char   sll_halen;
        unsigned char   sll_addr[8];
};

#endif