File: OneTypes.h

package info (click to toggle)
directfb 1.7.7-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 32,212 kB
  • sloc: ansic: 306,760; cpp: 46,357; sh: 11,720; makefile: 5,620; perl: 662; asm: 507; xml: 116
file content (92 lines) | stat: -rw-r--r-- 1,916 bytes parent folder | download | duplicates (2)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*
   (c) Copyright 2011  Denis Oliver Kropp <dok@directfb.org>

   All rights reserved.

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version
   2 of the License, or (at your option) any later version.
*/

#ifndef __ONE_TYPES_H__
#define __ONE_TYPES_H__


/**********************************************************************************************************************
** Queues
*/ 


/*
 * The One Queue ID is a unique identifier for one queue.
 */
typedef uint32_t OneQID;

#define ONE_QID_NONE     0


/*
 * Queue Flags
 */
typedef enum {
     ONE_QUEUE_NO_FLAGS       = 0x00000000,

     ONE_QUEUE_VIRTUAL        = 0x00000001,  /* Virtual Queue, has no receive buffers, only forwards to attached queues */
} OneQueueFlags;


/*
 * Packet Header Flags
 */
typedef enum {
     ONE_PACKET_NO_FLAGS      = 0x00000000,

     ONE_PACKET_COMPRESSED    = 0x00000001   /* Compressed Packet */
} OnePacketHeaderFlags;


/*
 * Packet Header
 */
typedef struct {
     OneQID                   queue_id;      /* Queue ID this packet is sent to */

     OnePacketHeaderFlags     flags;         /* Packet Flags */
     uint32_t                 size;          /* Packet Size */
     uint32_t                 uncompressed;  /* Packet Size after decompression */
} OnePacketHeader;





/*

  New QID for global messaging


  16-byte

  2 byte  reserved
  2 byte  name space
  8 byte  system within name space (one kernel module instance for example)
  4 byte  queue id within system


  Public name space "MAC" with system IDs

  6 byte  MAC address
  2 byte  sub address (e.g. multiple systems on a board with one ethernet connection)


  Public name space "random" ??

  8 byte  random


  Private name spaces could be defined, e.g. for systems without a MAC address.
*/

#endif