Project

General

Profile

Statistics
| Revision:

root / lab4 / .minix-src / include / minix / ipc.h @ 13

History | View | Annotate | Download (57.4 KB)

1
#ifndef _IPC_H
2
#define _IPC_H
3

    
4
#include <minix/ipcconst.h>
5
#include <minix/type.h>
6
#include <minix/const.h>
7
#include <sys/signal.h>
8
#include <sys/types.h>
9

    
10
/*==========================================================================* 
11
 * Types relating to messages.                                                     *
12
 *==========================================================================*/ 
13

    
14
#define M_PATH_STRING_MAX  40
15
#define CTL_SHORTNAME 8 /* max sysctl(2) name length that fits in message */
16

    
17
typedef struct {
18
        uint8_t data[56];
19
} mess_u8;
20
_ASSERT_MSG_SIZE(mess_u8);
21

    
22
typedef struct {
23
        uint16_t data[28];
24
} mess_u16;
25
_ASSERT_MSG_SIZE(mess_u16);
26

    
27
typedef struct {
28
        uint32_t data[14];
29
} mess_u32;
30
_ASSERT_MSG_SIZE(mess_u32);
31

    
32
typedef struct {
33
        uint64_t data[7];
34
} mess_u64;
35
_ASSERT_MSG_SIZE(mess_u64);
36

    
37
typedef struct {
38
        uint64_t m1ull1;
39
        int m1i1, m1i2, m1i3;
40
        char *m1p1, *m1p2, *m1p3, *m1p4;
41
        uint8_t padding[20];
42
} mess_1;
43
_ASSERT_MSG_SIZE(mess_1);
44

    
45
typedef struct {
46
        int64_t m2ll1;
47
        int m2i1, m2i2, m2i3;
48
        long m2l1, m2l2;
49
        char *m2p1;
50
        sigset_t sigset;
51
        short m2s1;
52
        uint8_t padding[6];
53
} mess_2;
54
_ASSERT_MSG_SIZE(mess_2);
55

    
56
typedef struct {
57
        int m3i1, m3i2;
58
        char *m3p1;
59
        char m3ca1[44];
60
} mess_3;
61
_ASSERT_MSG_SIZE(mess_3);
62

    
63
typedef struct {
64
        int64_t m4ll1;
65
        long m4l1, m4l2, m4l3, m4l4, m4l5;
66
        uint8_t padding[28];
67
} mess_4;
68
_ASSERT_MSG_SIZE(mess_4);
69

    
70
typedef struct {
71
        int m7i1, m7i2, m7i3, m7i4, m7i5;
72
        char *m7p1, *m7p2;
73
        uint8_t padding[28];
74
} mess_7;
75
_ASSERT_MSG_SIZE(mess_7);
76

    
77
typedef struct {
78
        uint64_t m9ull1, m9ull2;
79
        long m9l1, m9l2, m9l3, m9l4, m9l5;
80
        short m9s1, m9s2, m9s3, m9s4;
81
        uint8_t padding[12];
82
} mess_9;
83
_ASSERT_MSG_SIZE(mess_9);
84

    
85
typedef struct {
86
        u64_t m10ull1;
87
        int m10i1, m10i2, m10i3, m10i4;
88
        long m10l1, m10l2, m10l3;
89
        uint8_t padding[20];
90
} mess_10;
91
_ASSERT_MSG_SIZE(mess_10);
92

    
93
/* Helper union for DS messages */
94
union        ds_val {
95
        cp_grant_id_t        grant;
96
        u32_t                u32;
97
        endpoint_t        ep;
98
};
99

    
100
typedef struct {
101
        union        ds_val         val_out;
102
        int        val_len;
103
        uint8_t padding[48];
104
} mess_ds_reply;
105
_ASSERT_MSG_SIZE(mess_ds_reply);
106

    
107
typedef struct {
108
        cp_grant_id_t        key_grant;
109
        int                key_len;
110
        int                flags;
111
        union ds_val         val_in;
112
        int                val_len;
113
        endpoint_t        owner;
114
        uint8_t padding[32];
115
} mess_ds_req;
116
_ASSERT_MSG_SIZE(mess_ds_req);
117

    
118
typedef struct {
119
        off_t seek_pos;
120

    
121
        size_t nbytes;
122

    
123
        uint8_t data[44];
124
} mess_fs_vfs_breadwrite;
125
_ASSERT_MSG_SIZE(mess_fs_vfs_breadwrite);
126

    
127
typedef struct {
128
        mode_t mode;
129

    
130
        uint8_t data[52];
131
} mess_fs_vfs_chmod;
132
_ASSERT_MSG_SIZE(mess_fs_vfs_chmod);
133

    
134
typedef struct {
135
        mode_t mode;
136

    
137
        uint8_t data[52];
138
} mess_fs_vfs_chown;
139
_ASSERT_MSG_SIZE(mess_fs_vfs_chown);
140

    
141
typedef struct {
142
        off_t file_size;
143
        ino_t inode;
144

    
145
        mode_t mode;
146
        uid_t uid;
147
        gid_t gid;
148

    
149
        uint8_t data[28];
150
} mess_fs_vfs_create;
151
_ASSERT_MSG_SIZE(mess_fs_vfs_create);
152

    
153
typedef struct {
154
        off_t seek_pos;
155

    
156
        size_t nbytes;
157

    
158
        uint8_t data[44];
159
} mess_fs_vfs_getdents;
160
_ASSERT_MSG_SIZE(mess_fs_vfs_getdents);
161

    
162
typedef struct {
163
        off_t offset;
164
        off_t file_size;
165
        dev_t device;
166
        ino_t inode;
167

    
168
        mode_t mode;
169
        uid_t uid;
170
        gid_t gid;
171

    
172
        uint16_t symloop;
173

    
174
        uint8_t data[10];
175
} mess_fs_vfs_lookup;
176
_ASSERT_MSG_SIZE(mess_fs_vfs_lookup);
177

    
178
typedef struct {
179
        off_t file_size;
180
        dev_t device;
181
        ino_t inode;
182

    
183
        mode_t mode;
184
        uid_t uid;
185
        gid_t gid;
186

    
187
        uint8_t data[20];
188
} mess_fs_vfs_newnode;
189
_ASSERT_MSG_SIZE(mess_fs_vfs_newnode);
190

    
191
typedef struct {
192
        size_t nbytes;
193

    
194
        uint8_t data[52];
195
} mess_fs_vfs_rdlink;
196
_ASSERT_MSG_SIZE(mess_fs_vfs_rdlink);
197

    
198
typedef struct {
199
        off_t file_size;
200
        dev_t device;
201
        ino_t inode;
202

    
203
        uint32_t flags;
204
        mode_t mode;
205
        uid_t uid;
206
        gid_t gid;
207

    
208
        uint16_t con_reqs;
209

    
210
        uint8_t data[14];
211
} mess_fs_vfs_readsuper;
212
_ASSERT_MSG_SIZE(mess_fs_vfs_readsuper);
213

    
214
typedef struct {
215
        off_t seek_pos;
216

    
217
        size_t nbytes;
218

    
219
        uint8_t data[44];
220
} mess_fs_vfs_readwrite;
221
_ASSERT_MSG_SIZE(mess_fs_vfs_readwrite);
222

    
223
typedef struct {
224
        uint8_t padding[56];
225
} mess_i2c_li2cdriver_busc_i2c_exec;
226
_ASSERT_MSG_SIZE(mess_i2c_li2cdriver_busc_i2c_exec);
227

    
228
typedef struct {
229
        uint8_t padding[56];
230
} mess_i2c_li2cdriver_busc_i2c_reserve;
231
_ASSERT_MSG_SIZE(mess_i2c_li2cdriver_busc_i2c_reserve);
232

    
233
typedef struct {
234
        int kbd_id;
235
        int mouse_id;
236
        int rsvd1_id;
237
        int rsvd2_id;
238

    
239
        uint8_t padding[40];
240
} mess_input_linputdriver_input_conf;
241
_ASSERT_MSG_SIZE(mess_input_linputdriver_input_conf);
242

    
243
typedef struct {
244
        uint32_t led_mask;
245

    
246
        uint8_t padding[52];
247
} mess_input_linputdriver_setleds;
248
_ASSERT_MSG_SIZE(mess_input_linputdriver_setleds);
249

    
250
typedef struct {
251
        int id;
252
        int page;
253
        int code;
254
        int value;
255
        int flags;
256

    
257
        uint8_t padding[36];
258
} mess_input_tty_event;
259
_ASSERT_MSG_SIZE(mess_input_tty_event);
260

    
261
typedef struct {
262
        time_t acnt_queue;
263

    
264
        unsigned long acnt_deqs;
265
        unsigned long acnt_ipc_sync;
266
        unsigned long acnt_ipc_async;
267
        unsigned long acnt_preempt;
268
        uint32_t acnt_cpu;
269
        uint32_t acnt_cpu_load;
270

    
271
        uint8_t padding[24];
272
} mess_krn_lsys_schedule;
273
_ASSERT_MSG_SIZE(mess_krn_lsys_schedule);
274

    
275
typedef struct {
276
        uint32_t value;
277

    
278
        uint8_t padding[52];
279
} mess_krn_lsys_sys_devio;
280
_ASSERT_MSG_SIZE(mess_krn_lsys_sys_devio);
281

    
282
typedef struct {
283
        endpoint_t endpt;
284
        vir_bytes msgaddr;
285

    
286
        uint8_t padding[48];
287
} mess_krn_lsys_sys_fork;
288
_ASSERT_MSG_SIZE(mess_krn_lsys_sys_fork);
289

    
290
typedef struct {
291
        endpoint_t endpt;
292
        int privflags;
293
        int initflags;
294
        char name[44];
295

    
296
} mess_krn_lsys_sys_getwhoami;
297
_ASSERT_MSG_SIZE(mess_krn_lsys_sys_getwhoami);
298

    
299
typedef struct {
300
        int hook_id;
301

    
302
        uint8_t padding[52];
303
} mess_krn_lsys_sys_irqctl;
304
_ASSERT_MSG_SIZE(mess_krn_lsys_sys_irqctl);
305

    
306
typedef struct {
307
        clock_t real_ticks;
308
        clock_t boot_ticks;
309
        clock_t user_time;
310
        clock_t system_time;
311
        time_t boot_time;
312

    
313
        uint8_t padding[32];
314
} mess_krn_lsys_sys_times;
315
_ASSERT_MSG_SIZE(mess_krn_lsys_sys_times);
316

    
317
typedef struct {
318
        long int data;
319

    
320
        uint8_t padding[52];
321
} mess_krn_lsys_sys_trace;
322
_ASSERT_MSG_SIZE(mess_krn_lsys_sys_trace);
323

    
324
typedef struct {
325
        phys_bytes dst_addr;
326

    
327
        uint8_t padding[52];
328
} mess_krn_lsys_sys_umap;
329
_ASSERT_MSG_SIZE(mess_krn_lsys_sys_umap);
330

    
331
typedef struct {
332
        int pcount;
333

    
334
        uint8_t padding[52];
335
} mess_krn_lsys_sys_vumap;
336
_ASSERT_MSG_SIZE(mess_krn_lsys_sys_vumap);
337

    
338
typedef struct {
339
        off_t pos;
340

    
341
        int minor;
342
        int id;
343
        int access;
344

    
345
        int count;
346
        cp_grant_id_t grant;
347
        int flags;
348

    
349
        endpoint_t user;
350
        unsigned long request;
351

    
352
        uint8_t padding[16];
353
} mess_lbdev_lblockdriver_msg;
354
_ASSERT_MSG_SIZE(mess_lbdev_lblockdriver_msg);
355

    
356
typedef struct {
357
        int status;
358
        int id;
359

    
360
        uint8_t padding[48];
361
} mess_lblockdriver_lbdev_reply;
362
_ASSERT_MSG_SIZE(mess_lblockdriver_lbdev_reply);
363

    
364
typedef struct {
365
        int                id;
366
        int                num;
367
        int                cmd;
368
        vir_bytes        opt;
369
        int                ret;
370
        uint8_t                padding[36];
371
} mess_lc_ipc_semctl;
372
_ASSERT_MSG_SIZE(mess_lc_ipc_semctl);
373

    
374
typedef struct {
375
        key_t                key;
376
        int                nr;
377
        int                flag;
378
        int                retid;
379
        uint8_t                padding[40];
380
} mess_lc_ipc_semget;
381
_ASSERT_MSG_SIZE(mess_lc_ipc_semget);
382

    
383
typedef struct {
384
        int                id;
385
        void                *ops;
386
        unsigned int        size;
387
        uint8_t                padding[42];
388
} mess_lc_ipc_semop;
389
_ASSERT_MSG_SIZE(mess_lc_ipc_semop);
390

    
391
typedef struct {
392
        int                id;
393
        const void        *addr;
394
        int                flag;
395
        void                *retaddr;
396
        uint8_t                padding[40];
397
} mess_lc_ipc_shmat;
398
_ASSERT_MSG_SIZE(mess_lc_ipc_shmat);
399

    
400
typedef struct {
401
        int                id;
402
        int                cmd;
403
        void                *buf;
404
        int                ret;
405
        uint8_t                padding[40];
406
} mess_lc_ipc_shmctl;
407
_ASSERT_MSG_SIZE(mess_lc_ipc_shmctl);
408

    
409
typedef struct {
410
        const void        *addr;
411
        uint8_t                padding[52];
412
} mess_lc_ipc_shmdt;
413
_ASSERT_MSG_SIZE(mess_lc_ipc_shmdt);
414

    
415
typedef struct {
416
        key_t                key;
417
        size_t                size;
418
        int                flag;
419
        int                retid;
420
        uint8_t                padding[40];
421
} mess_lc_ipc_shmget;
422
_ASSERT_MSG_SIZE(mess_lc_ipc_shmget);
423

    
424
typedef struct {
425
        vir_bytes        oldp;
426
        size_t                oldlen;
427
        vir_bytes        newp;
428
        size_t                newlen;
429
        unsigned int        namelen;
430
        vir_bytes        namep;
431
        int                name[CTL_SHORTNAME];
432
} mess_lc_mib_sysctl;
433
_ASSERT_MSG_SIZE(mess_lc_mib_sysctl);
434

    
435
typedef struct {
436
        vir_bytes name;
437
        size_t namelen;
438
        vir_bytes frame;
439
        size_t framelen;
440
        vir_bytes ps_str;
441

    
442
        uint8_t padding[36];
443
} mess_lc_pm_exec;
444
_ASSERT_MSG_SIZE(mess_lc_pm_exec);
445

    
446
typedef struct {
447
        int status;
448

    
449
        uint8_t padding[52];
450
} mess_lc_pm_exit;
451
_ASSERT_MSG_SIZE(mess_lc_pm_exit);
452

    
453
typedef struct {
454
        pid_t pid;
455

    
456
        uint8_t padding[52];
457
} mess_lc_pm_getsid;
458
_ASSERT_MSG_SIZE(mess_lc_pm_getsid);
459

    
460
typedef struct {
461
        int num;
462
        vir_bytes ptr;                /* gid_t * */
463

    
464
        uint8_t padding[48];
465
} mess_lc_pm_groups;
466
_ASSERT_MSG_SIZE(mess_lc_pm_groups);
467

    
468
typedef struct {
469
        int which;
470
        vir_bytes value;        /* const struct itimerval * */
471
        vir_bytes ovalue;        /* struct itimerval * */
472

    
473
        uint8_t padding[44];
474
} mess_lc_pm_itimer;
475
_ASSERT_MSG_SIZE(mess_lc_pm_itimer);
476

    
477
typedef struct {
478
        vir_bytes ctx;                /* mcontext_t * */
479

    
480
        uint8_t padding[52];
481
} mess_lc_pm_mcontext;
482
_ASSERT_MSG_SIZE(mess_lc_pm_mcontext);
483

    
484
typedef struct {
485
        int which;
486
        int who;
487
        int prio;
488

    
489
        uint8_t padding[44];
490
} mess_lc_pm_priority;
491
_ASSERT_MSG_SIZE(mess_lc_pm_priority);
492

    
493
typedef struct {
494
        pid_t pid;
495
        int req;
496
        vir_bytes addr;
497
        long data;
498

    
499
        uint8_t padding[40];
500
} mess_lc_pm_ptrace;
501
_ASSERT_MSG_SIZE(mess_lc_pm_ptrace);
502

    
503
typedef struct {
504
        int how;
505

    
506
        uint8_t padding[52];
507
} mess_lc_pm_reboot;
508
_ASSERT_MSG_SIZE(mess_lc_pm_reboot);
509

    
510
typedef struct {
511
        endpoint_t who;
512
        vir_bytes addr;
513

    
514
        uint8_t padding[48];
515
} mess_lc_pm_rusage;
516
_ASSERT_MSG_SIZE(mess_lc_pm_rusage);
517

    
518
typedef struct {
519
        gid_t gid;
520

    
521
        uint8_t padding[52];
522
} mess_lc_pm_setgid;
523
_ASSERT_MSG_SIZE(mess_lc_pm_setgid);
524

    
525
typedef struct {
526
        uid_t uid;
527

    
528
        uint8_t padding[52];
529
} mess_lc_pm_setuid;
530
_ASSERT_MSG_SIZE(mess_lc_pm_setuid);
531

    
532
typedef struct {
533
        pid_t pid;
534
        int nr;
535
        vir_bytes act;                /* const struct sigaction * */
536
        vir_bytes oact;                /* struct sigaction * */
537
        vir_bytes ret;                /* int (*)(void) */
538

    
539
        uint8_t padding[36];
540
} mess_lc_pm_sig;
541
_ASSERT_MSG_SIZE(mess_lc_pm_sig);
542

    
543
typedef struct {
544
        int how;
545
        vir_bytes ctx;
546
        sigset_t set;
547

    
548
        uint8_t padding[32];
549
} mess_lc_pm_sigset;
550
_ASSERT_MSG_SIZE(mess_lc_pm_sigset);
551

    
552
typedef struct {
553
        int action;
554
        int freq;
555
        int intr_type;
556
        vir_bytes ctl_ptr;
557
        vir_bytes mem_ptr;
558
        size_t mem_size;
559

    
560
        uint8_t padding[32];
561
} mess_lc_pm_sprof;
562
_ASSERT_MSG_SIZE(mess_lc_pm_sprof);
563

    
564
typedef struct {
565
        int req;
566
        int field;
567
        size_t len;
568
        vir_bytes value;
569

    
570
        uint8_t padding[40];
571
} mess_lc_pm_sysuname;
572
_ASSERT_MSG_SIZE(mess_lc_pm_sysuname);
573

    
574
typedef struct {
575
        time_t sec;
576

    
577
        clockid_t clk_id;
578
        int now;
579
        long nsec;
580

    
581
        uint8_t padding[36];
582
} mess_lc_pm_time;
583
_ASSERT_MSG_SIZE(mess_lc_pm_time);
584

    
585
typedef struct {
586
        pid_t pid;
587
        int options;
588
        vir_bytes addr;                        /* struct rusage * */
589

    
590
        uint8_t padding[44];
591
} mess_lc_pm_wait4;
592
_ASSERT_MSG_SIZE(mess_lc_pm_wait4);
593

    
594
typedef struct {
595
        cp_grant_id_t grant;
596
        vir_bytes tm;                        /* struct tm * */
597
        int flags;
598

    
599
        uint8_t padding[44];
600
} mess_lc_readclock_rtcdev;
601
_ASSERT_MSG_SIZE(mess_lc_readclock_rtcdev);
602

    
603
typedef struct {
604
        unsigned long request;
605
        vir_bytes arg;
606

    
607
        uint8_t padding[48];
608
} mess_lc_svrctl;
609
_ASSERT_MSG_SIZE(mess_lc_svrctl);
610

    
611
typedef struct {
612
        vir_bytes name;
613
        size_t len;
614
        int fd;
615
        uid_t owner;
616
        gid_t group;
617

    
618
        uint8_t padding[36];
619
} mess_lc_vfs_chown;
620
_ASSERT_MSG_SIZE(mess_lc_vfs_chown);
621

    
622
typedef struct {
623
        int fd;
624
        int nblock;
625

    
626
        uint8_t padding[48];
627
} mess_lc_vfs_close;
628
_ASSERT_MSG_SIZE(mess_lc_vfs_close);
629

    
630
typedef struct {
631
        vir_bytes name;
632
        size_t len;
633
        int flags;
634
        mode_t mode;
635

    
636
        uint8_t padding[40];
637
} mess_lc_vfs_creat;
638
_ASSERT_MSG_SIZE(mess_lc_vfs_creat);
639

    
640
typedef struct {
641
        int fd;
642

    
643
        uint8_t padding[52];
644
} mess_lc_vfs_fchdir;
645
_ASSERT_MSG_SIZE(mess_lc_vfs_fchdir);
646

    
647
typedef struct {
648
        int fd;
649
        mode_t mode;
650

    
651
        uint8_t padding[48];
652
} mess_lc_vfs_fchmod;
653
_ASSERT_MSG_SIZE(mess_lc_vfs_fchmod);
654

    
655
typedef struct {
656
        int fd;
657
        int cmd;
658
        int arg_int;
659
        vir_bytes arg_ptr;        /* struct flock * */
660

    
661
        uint8_t padding[40];
662
} mess_lc_vfs_fcntl;
663
_ASSERT_MSG_SIZE(mess_lc_vfs_fcntl);
664

    
665
typedef struct {
666
        int fd;
667
        vir_bytes buf;                /* struct stat * */
668

    
669
        uint8_t padding[48];
670
} mess_lc_vfs_fstat;
671
_ASSERT_MSG_SIZE(mess_lc_vfs_fstat);
672

    
673
typedef struct {
674
        int fd;
675

    
676
        uint8_t padding[52];
677
} mess_lc_vfs_fsync;
678
_ASSERT_MSG_SIZE(mess_lc_vfs_fsync);
679

    
680
typedef struct {
681
        size_t labellen;
682
        size_t buflen;
683
        vir_bytes label;
684
        vir_bytes buf;
685

    
686
        uint8_t padding[40];
687
} mess_lc_vfs_gcov;
688
_ASSERT_MSG_SIZE(mess_lc_vfs_gcov);
689

    
690
typedef struct {
691
        int32_t flags;
692
        size_t len;
693
        vir_bytes buf;                /* struct statvfs */
694

    
695
        uint8_t padding[44];
696
} mess_lc_vfs_getvfsstat;
697
_ASSERT_MSG_SIZE(mess_lc_vfs_getvfsstat);
698

    
699
typedef struct {
700
        int fd;
701
        unsigned long req;
702
        vir_bytes arg;
703

    
704
        uint8_t padding[44];
705
} mess_lc_vfs_ioctl;
706
_ASSERT_MSG_SIZE(mess_lc_vfs_ioctl);
707

    
708
typedef struct {
709
        vir_bytes name1;
710
        vir_bytes name2;
711
        size_t len1;
712
        size_t len2;
713

    
714
        uint8_t padding[40];
715
} mess_lc_vfs_link;
716
_ASSERT_MSG_SIZE(mess_lc_vfs_link);
717

    
718
typedef struct {
719
        int fd;
720
        int backlog;
721

    
722
        u8_t padding[48];
723
} mess_lc_vfs_listen;
724
_ASSERT_MSG_SIZE(mess_lc_vfs_listen);
725

    
726
typedef struct {
727
        off_t offset;
728

    
729
        int fd;
730
        int whence;
731

    
732
        uint8_t padding[40];
733
} mess_lc_vfs_lseek;
734
_ASSERT_MSG_SIZE(mess_lc_vfs_lseek);
735

    
736
typedef struct {
737
        dev_t device;
738

    
739
        vir_bytes name;
740
        size_t len;
741
        mode_t mode;
742

    
743
        uint8_t padding[36];
744
} mess_lc_vfs_mknod;
745
_ASSERT_MSG_SIZE(mess_lc_vfs_mknod);
746

    
747
typedef struct {
748
        int flags;
749
        size_t devlen;
750
        size_t pathlen;
751
        size_t typelen;
752
        size_t labellen;
753
        vir_bytes dev;
754
        vir_bytes path;
755
        vir_bytes type;
756
        vir_bytes label;
757

    
758
        uint8_t padding[20];
759
} mess_lc_vfs_mount;
760
_ASSERT_MSG_SIZE(mess_lc_vfs_mount);
761

    
762
typedef struct {
763
        vir_bytes name;
764
        size_t len;
765
        int flags;
766
        mode_t mode;
767
        char buf[M_PATH_STRING_MAX];
768
} mess_lc_vfs_path;
769
_ASSERT_MSG_SIZE(mess_lc_vfs_path);
770

    
771
typedef struct {
772
        /*
773
         * We are in the process of cleaning up this message, by moving the
774
         * flags value from the third integer into the first.  Once enough time
775
         * has passed, we can get rid of the second and third integer fields.
776
         */
777
        int flags;
778
        int _unused;
779
        int oflags;
780

    
781
        uint8_t padding[44];
782
} mess_lc_vfs_pipe2;
783
_ASSERT_MSG_SIZE(mess_lc_vfs_pipe2);
784

    
785
typedef struct {
786
        vir_bytes name;                /* const char * */
787
        size_t namelen;
788
        vir_bytes buf;
789
        size_t bufsize;
790

    
791
        uint8_t padding[40];
792
} mess_lc_vfs_readlink;
793
_ASSERT_MSG_SIZE(mess_lc_vfs_readlink);
794

    
795
typedef struct {
796
        int fd;
797
        vir_bytes buf;
798
        size_t len;
799
        size_t cum_io;                /* reserved/internal, set to 0 */
800

    
801
        uint8_t padding[40];
802
} mess_lc_vfs_readwrite;
803
_ASSERT_MSG_SIZE(mess_lc_vfs_readwrite);
804

    
805
typedef struct {
806
        uint32_t nfds;
807
        fd_set *readfds;
808
        fd_set *writefds;
809
        fd_set *errorfds;
810
        vir_bytes timeout;        /* user-provided 'struct timeval *' */
811

    
812
        uint8_t padding[36];
813
} mess_lc_vfs_select;
814
_ASSERT_MSG_SIZE(mess_lc_vfs_select);
815

    
816
typedef struct {
817
        int fd;
818
        vir_bytes buf;                /* void * */
819
        size_t len;
820
        int flags;
821
        vir_bytes addr;                /* struct sockaddr * */
822
        unsigned int addr_len;        /* socklen_t */
823

    
824
        uint8_t padding[32];
825
} mess_lc_vfs_sendrecv;
826
_ASSERT_MSG_SIZE(mess_lc_vfs_sendrecv);
827

    
828
typedef struct {
829
        int fd;
830
        int how;
831

    
832
        uint8_t padding[48];
833
} mess_lc_vfs_shutdown;
834
_ASSERT_MSG_SIZE(mess_lc_vfs_shutdown);
835

    
836
typedef struct {
837
        int fd;
838
        vir_bytes addr;                /* struct sockaddr * */
839
        unsigned int addr_len;        /* socklen_t */
840

    
841
        uint8_t padding[44];
842
} mess_lc_vfs_sockaddr;
843
_ASSERT_MSG_SIZE(mess_lc_vfs_sockaddr);
844

    
845
typedef struct {
846
        int domain;
847
        int type;
848
        int protocol;
849

    
850
        uint8_t padding[44];
851
} mess_lc_vfs_socket;
852
_ASSERT_MSG_SIZE(mess_lc_vfs_socket);
853

    
854
typedef struct {
855
        int fd;
856
        vir_bytes msgbuf;        /* struct msghdr * */
857
        int flags;
858

    
859
        uint8_t padding[44];
860
} mess_lc_vfs_sockmsg;
861
_ASSERT_MSG_SIZE(mess_lc_vfs_sockmsg);
862

    
863
typedef struct {
864
        int fd;
865
        int level;
866
        int name;
867
        vir_bytes buf;                /* void * */
868
        unsigned int len;        /* socklen_t */
869

    
870
        uint8_t padding[36];
871
} mess_lc_vfs_sockopt;
872
_ASSERT_MSG_SIZE(mess_lc_vfs_sockopt);
873

    
874
typedef struct {
875
        size_t len;
876
        vir_bytes name;                /* const char * */
877
        vir_bytes buf;                /* struct stat * */
878

    
879
        uint8_t padding[44];
880
} mess_lc_vfs_stat;
881
_ASSERT_MSG_SIZE(mess_lc_vfs_stat);
882

    
883
typedef struct {
884
        int fd;
885
        int flags;
886
        size_t len;
887
        vir_bytes name;
888
        vir_bytes buf;
889

    
890
        uint8_t padding[36];
891
} mess_lc_vfs_statvfs1;
892
_ASSERT_MSG_SIZE(mess_lc_vfs_statvfs1);
893

    
894
typedef struct {
895
        off_t offset;
896

    
897
        int fd;
898
        vir_bytes name;
899
        size_t len;
900

    
901
        uint8_t padding[36];
902
} mess_lc_vfs_truncate;
903
_ASSERT_MSG_SIZE(mess_lc_vfs_truncate);
904

    
905
typedef struct {
906
        mode_t mask;
907

    
908
        uint8_t padding[52];
909
} mess_lc_vfs_umask;
910
_ASSERT_MSG_SIZE(mess_lc_vfs_umask);
911

    
912
typedef struct {
913
        vir_bytes name;
914
        size_t namelen;
915
        vir_bytes label;
916
        size_t labellen;
917

    
918
        uint8_t padding[40];
919
} mess_lc_vfs_umount;
920
_ASSERT_MSG_SIZE(mess_lc_vfs_umount);
921

    
922
typedef struct {
923
        void                *addr;
924
        uint8_t                padding[52];
925
} mess_lc_vm_brk;
926
_ASSERT_MSG_SIZE(mess_lc_vm_brk);
927

    
928
typedef struct {
929
        endpoint_t        endpt;
930
        void                *addr;
931
        void                *ret_addr;
932
        uint8_t                padding[44];
933
} mess_lc_vm_getphys;
934
_ASSERT_MSG_SIZE(mess_lc_vm_getphys);
935

    
936
typedef struct {
937
        endpoint_t        forwhom;
938
        void                *addr;
939
        uint8_t                padding[48];
940
} mess_lc_vm_shm_unmap;
941
_ASSERT_MSG_SIZE(mess_lc_vm_shm_unmap);
942

    
943
typedef struct {
944
        int status;
945
        uint32_t id;                /* should be cdev_id_t */
946

    
947
        uint8_t padding[48];
948
} mess_lchardriver_vfs_reply;
949
_ASSERT_MSG_SIZE(mess_lchardriver_vfs_reply);
950

    
951
typedef struct {
952
        int status;
953
        int32_t minor;
954

    
955
        uint8_t padding[48];
956
} mess_lchardriver_vfs_sel1;
957
_ASSERT_MSG_SIZE(mess_lchardriver_vfs_sel1);
958

    
959
typedef struct {
960
        int status;
961
        int32_t minor;
962

    
963
        uint8_t padding[48];
964
} mess_lchardriver_vfs_sel2;
965
_ASSERT_MSG_SIZE(mess_lchardriver_vfs_sel2);
966

    
967
typedef struct {
968
        endpoint_t endpt;
969
        vir_bytes ptr;                /* struct exec_info * */
970

    
971
        uint8_t padding[48];
972
} mess_lexec_pm_exec_new;
973
_ASSERT_MSG_SIZE(mess_lexec_pm_exec_new);
974

    
975
typedef struct {
976
        cp_grant_id_t grant;
977

    
978
        uint8_t padding[52];
979
} mess_li2cdriver_i2c_busc_i2c_exec;
980
_ASSERT_MSG_SIZE(mess_li2cdriver_i2c_busc_i2c_exec);
981

    
982
typedef struct {
983
        uint16_t addr; /* FIXME: strictly speaking this is an i2c_addr_t, but
984
                          to get it I would need to include
985
                          sys/dev/i2c/i2c_io.h, which I am not sure is a good
986
                          idea to have everywhere. */
987

    
988
        uint8_t padding[54];
989
} mess_li2cdriver_i2c_busc_i2c_reserve;
990
_ASSERT_MSG_SIZE(mess_li2cdriver_i2c_busc_i2c_reserve);
991

    
992
typedef struct {
993
        int id;
994
        int page;
995
        int code;
996
        int value;
997
        int flags;
998

    
999
        uint8_t padding[36];
1000
} mess_linputdriver_input_event;
1001
_ASSERT_MSG_SIZE(mess_linputdriver_input_event);
1002

    
1003
typedef struct {
1004
        int32_t req_id;
1005
        int32_t sock_id;
1006
        int status;
1007
        unsigned int len;
1008

    
1009
        uint8_t padding[40];
1010
} mess_lsockdriver_vfs_accept_reply;
1011
_ASSERT_MSG_SIZE(mess_lsockdriver_vfs_accept_reply);
1012

    
1013
typedef struct {
1014
        int32_t req_id;
1015
        int status;
1016
        unsigned int ctl_len;
1017
        unsigned int addr_len;
1018
        int flags;
1019

    
1020
        uint8_t padding[36];
1021
} mess_lsockdriver_vfs_recv_reply;
1022
_ASSERT_MSG_SIZE(mess_lsockdriver_vfs_recv_reply);
1023

    
1024
typedef struct {
1025
        int32_t req_id;
1026
        int status;
1027

    
1028
        uint8_t padding[48];
1029
} mess_lsockdriver_vfs_reply;
1030
_ASSERT_MSG_SIZE(mess_lsockdriver_vfs_reply);
1031

    
1032
typedef struct {
1033
        int32_t sock_id;
1034
        int status;
1035

    
1036
        uint8_t padding[48];
1037
} mess_lsockdriver_vfs_select_reply;
1038
_ASSERT_MSG_SIZE(mess_lsockdriver_vfs_select_reply);
1039

    
1040
typedef struct {
1041
        int32_t req_id;
1042
        int32_t sock_id;
1043
        int32_t sock_id2;
1044

    
1045
        uint8_t padding[44];
1046
} mess_lsockdriver_vfs_socket_reply;
1047
_ASSERT_MSG_SIZE(mess_lsockdriver_vfs_socket_reply);
1048

    
1049
typedef struct {
1050
        cp_grant_id_t gid;
1051
        size_t size;
1052
        int subtype;
1053

    
1054
        uint8_t padding[44];
1055
} mess_lsys_fi_ctl;
1056
_ASSERT_MSG_SIZE(mess_lsys_fi_ctl);
1057

    
1058
typedef struct {
1059
        int status;
1060

    
1061
        uint8_t padding[52];
1062
} mess_lsys_fi_reply;
1063
_ASSERT_MSG_SIZE(mess_lsys_fi_reply);
1064

    
1065
typedef struct {
1066
        int what;
1067
        vir_bytes where;
1068
        size_t size;
1069

    
1070
        uint8_t padding[44];
1071
} mess_lsys_getsysinfo;
1072
_ASSERT_MSG_SIZE(mess_lsys_getsysinfo);
1073

    
1074
typedef struct {
1075
        size_t size;
1076
        phys_bytes addr;
1077
        vir_bytes buf;
1078

    
1079
        uint8_t padding[44];
1080
} mess_lsys_krn_readbios;
1081
_ASSERT_MSG_SIZE(mess_lsys_krn_readbios);
1082

    
1083
typedef struct {
1084
        endpoint_t        from_to;
1085
        cp_grant_id_t        gid;
1086
        size_t                offset;
1087
        void                *address;
1088
        size_t                bytes;
1089
        uint8_t padding[36];
1090
} mess_lsys_kern_safecopy;
1091
_ASSERT_MSG_SIZE(mess_lsys_kern_safecopy);
1092

    
1093
typedef struct {
1094
        uint32_t flags;
1095
        endpoint_t endpoint;
1096
        int priority;
1097
        int quantum;
1098
        int cpu;
1099

    
1100
        uint8_t padding[36];
1101
} mess_lsys_krn_schedctl;
1102
_ASSERT_MSG_SIZE(mess_lsys_krn_schedctl);
1103

    
1104
typedef struct {
1105
        endpoint_t endpoint;
1106
        int quantum;
1107
        int priority;
1108
        int cpu;
1109
        int niced;
1110

    
1111
        uint8_t padding[36];
1112
} mess_lsys_krn_schedule;
1113
_ASSERT_MSG_SIZE(mess_lsys_krn_schedule);
1114

    
1115
typedef struct {
1116
        int how;
1117

    
1118
        uint8_t padding[52];
1119
} mess_lsys_krn_sys_abort;
1120
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_abort);
1121

    
1122
typedef struct {
1123
        endpoint_t endpt;
1124

    
1125
        uint8_t padding[52];
1126
} mess_lsys_krn_sys_clear;
1127
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_clear);
1128

    
1129
typedef struct {
1130
        endpoint_t src_endpt;
1131
        vir_bytes src_addr;
1132
        endpoint_t dst_endpt;
1133
        vir_bytes dst_addr;
1134
        phys_bytes nr_bytes;
1135
        int flags;
1136

    
1137
        uint8_t padding[32];
1138
} mess_lsys_krn_sys_copy;
1139
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_copy);
1140

    
1141
typedef struct {
1142
        int request;
1143
        int port;
1144
        uint32_t value;
1145

    
1146
        uint8_t padding[44];
1147
} mess_lsys_krn_sys_devio;
1148
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_devio);
1149

    
1150
typedef struct {
1151
        int code;
1152
        vir_bytes buf;
1153
        int len;
1154
        endpoint_t endpt;
1155

    
1156
        uint8_t padding[40];
1157
} mess_lsys_krn_sys_diagctl;
1158
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_diagctl);
1159

    
1160
typedef struct {
1161
        endpoint_t endpt;
1162
        vir_bytes ip;
1163
        vir_bytes stack;
1164
        vir_bytes name;
1165
        vir_bytes ps_str;
1166

    
1167
        uint8_t padding[36];
1168
} mess_lsys_krn_sys_exec;
1169
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_exec);
1170

    
1171
typedef struct {
1172
        endpoint_t endpt;
1173
        endpoint_t slot;
1174
        uint32_t flags;
1175

    
1176
        uint8_t padding[44];
1177
} mess_lsys_krn_sys_fork;
1178
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_fork);
1179

    
1180
typedef struct {
1181
        int request;
1182
        endpoint_t endpt;
1183
        vir_bytes val_ptr;
1184
        int val_len;
1185
        vir_bytes val_ptr2;
1186
        int val_len2_e;
1187

    
1188
        uint8_t padding[32];
1189
} mess_lsys_krn_sys_getinfo;
1190
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_getinfo);
1191

    
1192
typedef struct {
1193
        endpoint_t endpt;
1194
        vir_bytes ctx_ptr;
1195

    
1196
        uint8_t padding[48];
1197
} mess_lsys_krn_sys_getmcontext;
1198
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_getmcontext);
1199

    
1200
typedef struct {
1201
        endpoint_t endpt;
1202

    
1203
        uint8_t padding[52];
1204
} mess_lsys_krn_sys_iopenable;
1205
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_iopenable);
1206

    
1207
typedef struct {
1208
        int request;
1209
        int vector;
1210
        int policy;
1211
        int hook_id;
1212

    
1213
        uint8_t padding[40];
1214
} mess_lsys_krn_sys_irqctl;
1215
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_irqctl);
1216

    
1217
typedef struct {
1218
        phys_bytes base;
1219
        phys_bytes count;
1220
        unsigned long pattern;
1221
        endpoint_t process;
1222

    
1223
        uint8_t padding[40];
1224
} mess_lsys_krn_sys_memset;
1225
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_memset);
1226

    
1227
typedef struct {
1228
        int request;
1229
        endpoint_t endpt;
1230
        vir_bytes arg_ptr;
1231
        phys_bytes phys_start;
1232
        phys_bytes phys_len;
1233

    
1234
        uint8_t padding[36];
1235
} mess_lsys_krn_sys_privctl;
1236
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_privctl);
1237

    
1238
typedef struct {
1239
        int request;
1240
        long int port;
1241
        endpoint_t vec_endpt;
1242
        phys_bytes vec_addr;
1243
        vir_bytes vec_size;
1244
        vir_bytes offset;
1245

    
1246
        uint8_t padding[32];
1247
} mess_lsys_krn_sys_sdevio;
1248
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_sdevio);
1249

    
1250
typedef struct {
1251
        clock_t exp_time;
1252
        clock_t time_left;
1253
        clock_t uptime;
1254
        int abs_time;
1255

    
1256
        uint8_t padding[40];
1257
} mess_lsys_krn_sys_setalarm;
1258
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_setalarm);
1259

    
1260
typedef struct {
1261
        vir_bytes addr;                        /* cp_grant_t * */
1262
        int size;
1263

    
1264
        uint8_t padding[48];
1265
} mess_lsys_krn_sys_setgrant;
1266
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_setgrant);
1267

    
1268
typedef struct {
1269
        endpoint_t endpt;
1270
        vir_bytes ctx_ptr;
1271

    
1272
        uint8_t padding[48];
1273
} mess_lsys_krn_sys_setmcontext;
1274
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_setmcontext);
1275

    
1276
typedef struct {
1277
        time_t sec;                /* time in seconds since 1970 */
1278
        long int nsec;
1279
        int now;                /* non-zero for immediate, 0 for adjtime */
1280
        clockid_t clock_id;
1281

    
1282
        uint8_t padding[36];
1283
} mess_lsys_krn_sys_settime;
1284
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_settime);
1285

    
1286
typedef struct {
1287
        int action;
1288
        int freq;
1289
        int intr_type;
1290
        endpoint_t endpt;
1291
        vir_bytes ctl_ptr;
1292
        vir_bytes mem_ptr;
1293
        size_t mem_size;
1294

    
1295
        uint8_t padding[28];
1296
} mess_lsys_krn_sys_sprof;
1297
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_sprof);
1298

    
1299
typedef struct {
1300
        int request;
1301
        void *address;
1302
        int length;
1303

    
1304
        uint8_t padding[44];
1305
} mess_lsys_krn_sys_statectl;
1306
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_statectl);
1307

    
1308
typedef struct {
1309
        time_t boot_time;
1310

    
1311
        uint8_t padding[48];
1312
} mess_lsys_krn_sys_stime;
1313
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_stime);
1314

    
1315
typedef struct {
1316
        endpoint_t endpt;
1317

    
1318
        uint8_t padding[52];
1319
} mess_lsys_krn_sys_times;
1320
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_times);
1321

    
1322
typedef struct {
1323
        int request;
1324
        endpoint_t endpt;
1325
        vir_bytes address;
1326
        long int data;
1327

    
1328
        uint8_t padding[40];
1329
} mess_lsys_krn_sys_trace;
1330
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_trace);
1331

    
1332
typedef struct {
1333
        endpoint_t src_endpt;
1334
        int segment;
1335
        vir_bytes src_addr;
1336
        endpoint_t dst_endpt;
1337
        int nr_bytes;
1338

    
1339
        uint8_t padding[36];
1340
} mess_lsys_krn_sys_umap;
1341
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_umap);
1342

    
1343

    
1344
typedef struct {
1345
        int request;
1346
        int vec_size;
1347
        vir_bytes vec_addr;                /* pv{b,w,l}_pair_t * */
1348

    
1349
        uint8_t padding[44];
1350
} mess_lsys_krn_sys_vdevio;
1351
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_vdevio);
1352

    
1353
typedef struct {
1354
        endpoint_t endpt;
1355
        vir_bytes vaddr;                        /* struct vumap_vir * */
1356
        int vcount;
1357
        vir_bytes paddr;                        /* struct vumap_phys * */
1358
        int pmax;
1359
        int access;
1360
        size_t offset;
1361

    
1362
        uint8_t padding[28];
1363
} mess_lsys_krn_sys_vumap;
1364
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_vumap);
1365

    
1366
typedef struct {
1367
        void                *vec_addr;
1368
        int                vec_size;
1369
        uint8_t padding[48];
1370
} mess_lsys_kern_vsafecopy;
1371
_ASSERT_MSG_SIZE(mess_lsys_kern_vsafecopy);
1372

    
1373
typedef struct {
1374
        uint32_t        root_id;
1375
        uint32_t        flags;
1376
        unsigned int        csize;
1377
        unsigned int        clen;
1378
        unsigned int        miblen;
1379
        int                mib[CTL_SHORTNAME];
1380
        uint8_t                padding[4];
1381
} mess_lsys_mib_register;
1382
_ASSERT_MSG_SIZE(mess_lsys_mib_register);
1383

    
1384
typedef struct {
1385
        uint32_t        req_id;
1386
        ssize_t                status;
1387
        uint8_t                padding[48];
1388
} mess_lsys_mib_reply;
1389
_ASSERT_MSG_SIZE(mess_lsys_mib_reply);
1390

    
1391
typedef struct {
1392
        int devind;
1393
        int port;
1394

    
1395
        uint8_t padding[48];
1396
} mess_lsys_pci_busc_get_bar;
1397
_ASSERT_MSG_SIZE(mess_lsys_pci_busc_get_bar);
1398

    
1399
typedef struct {
1400
        endpoint_t endpt;
1401
        vir_bytes groups;
1402
        int ngroups;
1403

    
1404
        uint8_t padding[44];
1405
} mess_lsys_pm_getepinfo;
1406
_ASSERT_MSG_SIZE(mess_lsys_pm_getepinfo);
1407

    
1408
typedef struct {
1409
        pid_t pid;
1410

    
1411
        uint8_t padding[52];
1412
} mess_lsys_pm_getprocnr;
1413
_ASSERT_MSG_SIZE(mess_lsys_pm_getprocnr);
1414

    
1415
typedef struct {
1416
        unsigned int mask;
1417

    
1418
        uint8_t padding[52];
1419
} mess_lsys_pm_proceventmask;
1420
_ASSERT_MSG_SIZE(mess_lsys_pm_proceventmask);
1421

    
1422
typedef struct {
1423
        uid_t uid;
1424
        gid_t gid;
1425

    
1426
        uint8_t padding[48];
1427
} mess_lsys_pm_srv_fork;
1428
_ASSERT_MSG_SIZE(mess_lsys_pm_srv_fork);
1429

    
1430
typedef struct {
1431
        endpoint_t endpoint;
1432
        endpoint_t parent;
1433
        int maxprio;
1434
        int quantum;
1435

    
1436
        uint8_t padding[40];
1437
} mess_lsys_sched_scheduling_start;
1438
_ASSERT_MSG_SIZE(mess_lsys_sched_scheduling_start);
1439

    
1440
typedef struct {
1441
        endpoint_t endpoint;
1442

    
1443
        uint8_t padding[52];
1444
} mess_lsys_sched_scheduling_stop;
1445
_ASSERT_MSG_SIZE(mess_lsys_sched_scheduling_stop);
1446

    
1447
typedef struct {
1448
        int request;
1449
        int fkeys;
1450
        int sfkeys;
1451

    
1452
        uint8_t padding[44];
1453
} mess_lsys_tty_fkey_ctl;
1454
_ASSERT_MSG_SIZE(mess_lsys_tty_fkey_ctl);
1455

    
1456
typedef struct {
1457
        endpoint_t endpt;
1458
        int fd;
1459
        int what;
1460

    
1461
        uint8_t padding[44];
1462
} mess_lsys_vfs_copyfd;
1463
_ASSERT_MSG_SIZE(mess_lsys_vfs_copyfd);
1464

    
1465
typedef struct {
1466
        devmajor_t major;
1467
        size_t labellen;
1468
        vir_bytes label;
1469
        int ndomains;
1470
        int domains[NR_DOMAIN];
1471

    
1472
        uint8_t padding[8];
1473
} mess_lsys_vfs_mapdriver;
1474
_ASSERT_MSG_SIZE(mess_lsys_vfs_mapdriver);
1475

    
1476
typedef struct {
1477
        endpoint_t endpt;
1478
        cp_grant_id_t grant;
1479
        size_t count;
1480
        int what;
1481

    
1482
        uint8_t padding[40];
1483
} mess_lsys_vfs_socketpath;
1484
_ASSERT_MSG_SIZE(mess_lsys_vfs_socketpath);
1485

    
1486
typedef struct {
1487
        endpoint_t        endpt;
1488
        void                *addr;
1489
        int                retc;
1490
        uint8_t                padding[44];
1491
} mess_lsys_vm_getref;
1492
_ASSERT_MSG_SIZE(mess_lsys_vm_getref);
1493

    
1494
typedef struct {
1495
        int                what;
1496
        endpoint_t        ep;
1497
        int                count;
1498
        void                *ptr;
1499
        vir_bytes        next;
1500
        uint8_t                padding[36];
1501
} mess_lsys_vm_info;
1502
_ASSERT_MSG_SIZE(mess_lsys_vm_info);
1503

    
1504
typedef struct {
1505
        endpoint_t        ep;
1506
        phys_bytes        phaddr;
1507
        size_t                len;
1508
        void                *reply;
1509
        uint8_t                padding[40];
1510
} mess_lsys_vm_map_phys;
1511
_ASSERT_MSG_SIZE(mess_lsys_vm_map_phys);
1512

    
1513
typedef struct {
1514
        endpoint_t        endpt;
1515
        vir_bytes        addr;
1516
        int                children;
1517

    
1518
        uint8_t                padding[44];
1519
} mess_lsys_vm_rusage;
1520
_ASSERT_MSG_SIZE(mess_lsys_vm_rusage);
1521

    
1522
typedef struct {
1523
        endpoint_t        ep;
1524
        void                *vaddr;
1525
        uint8_t                padding[48];
1526
} mess_lsys_vm_unmap_phys;
1527
_ASSERT_MSG_SIZE(mess_lsys_vm_unmap_phys);
1528

    
1529
typedef struct {
1530
        endpoint_t src;
1531
        endpoint_t dst;
1532
        int flags;
1533
        uint8_t                padding[44];
1534
} mess_lsys_vm_update;
1535
_ASSERT_MSG_SIZE(mess_lsys_vm_update);
1536

    
1537
typedef struct {
1538
        endpoint_t        destination;
1539
        endpoint_t        source;
1540
        void                *dest_addr;
1541
        void                *src_addr;
1542
        size_t                size;
1543
        void                *ret_addr;
1544
        uint8_t                padding[32];
1545
} mess_lsys_vm_vmremap;
1546
_ASSERT_MSG_SIZE(mess_lsys_vm_vmremap);
1547

    
1548
typedef struct {
1549
        size_t                oldlen;
1550
        uint8_t                padding[52];
1551
} mess_mib_lc_sysctl;
1552
_ASSERT_MSG_SIZE(mess_mib_lc_sysctl);
1553

    
1554
typedef struct {
1555
        uint32_t        req_id;
1556
        uint32_t        root_id;
1557
        cp_grant_id_t        name_grant;
1558
        unsigned int        name_len;
1559
        cp_grant_id_t        oldp_grant;
1560
        size_t                oldp_len;
1561
        cp_grant_id_t        newp_grant;
1562
        size_t                newp_len;
1563
        endpoint_t        user_endpt;
1564
        uint32_t        flags;
1565
        uint32_t        root_ver;
1566
        uint32_t        tree_ver;
1567
        uint8_t                padding[8];
1568
} mess_mib_lsys_call;
1569
_ASSERT_MSG_SIZE(mess_mib_lsys_call);
1570

    
1571
typedef struct {
1572
        uint32_t        req_id;
1573
        uint32_t        root_id;
1574
        cp_grant_id_t        name_grant;
1575
        size_t                name_size;
1576
        cp_grant_id_t        desc_grant;
1577
        size_t                desc_size;
1578
        uint8_t                padding[32];
1579
} mess_mib_lsys_info;
1580
_ASSERT_MSG_SIZE(mess_mib_lsys_info);
1581

    
1582
typedef struct {
1583
        off_t offset;
1584
        void *addr;
1585
        size_t len;
1586
        int prot;
1587
        int flags;
1588
        int fd;
1589
        endpoint_t forwhom;
1590
        void *retaddr;
1591
        u32_t padding[5];
1592
} mess_mmap;
1593
_ASSERT_MSG_SIZE(mess_mmap);
1594

    
1595
typedef struct {
1596
        uint32_t id;
1597

    
1598
        uint8_t padding[52];
1599
} mess_ndev_netdriver_init;
1600
_ASSERT_MSG_SIZE(mess_ndev_netdriver_init);
1601

    
1602
typedef struct {
1603
        uint32_t id;
1604
        uint32_t set;
1605
        uint32_t mode;
1606
        cp_grant_id_t mcast_grant;
1607
        unsigned int mcast_count;
1608
        uint32_t caps;
1609
        uint32_t flags;
1610
        uint32_t media;
1611
        uint8_t hwaddr[NDEV_HWADDR_MAX];
1612

    
1613
        uint8_t padding[18];
1614
} mess_ndev_netdriver_conf;
1615
_ASSERT_MSG_SIZE(mess_ndev_netdriver_conf);
1616

    
1617
typedef struct {
1618
        uint32_t id;
1619
        uint32_t count;
1620
        cp_grant_id_t grant[NDEV_IOV_MAX];
1621
        uint16_t len[NDEV_IOV_MAX];
1622
} mess_ndev_netdriver_transfer;
1623
_ASSERT_MSG_SIZE(mess_ndev_netdriver_transfer);
1624

    
1625
typedef struct {
1626
        uint32_t id;
1627

    
1628
        uint8_t padding[52];
1629
} mess_ndev_netdriver_status_reply;
1630
_ASSERT_MSG_SIZE(mess_ndev_netdriver_status_reply);
1631

    
1632
typedef struct {
1633
        uint32_t id;
1634
        uint32_t link;
1635
        uint32_t media;
1636
        uint32_t caps;
1637
        char name[NDEV_NAME_MAX];
1638
        uint8_t hwaddr[NDEV_HWADDR_MAX];
1639
        uint8_t hwaddr_len;
1640
        uint8_t max_send;
1641
        uint8_t max_recv;
1642

    
1643
        uint8_t padding[15];
1644
} mess_netdriver_ndev_init_reply;
1645
_ASSERT_MSG_SIZE(mess_netdriver_ndev_init_reply);
1646

    
1647
typedef struct {
1648
        uint32_t id;
1649
        int32_t result;
1650

    
1651
        uint8_t padding[48];
1652
} mess_netdriver_ndev_reply;
1653
_ASSERT_MSG_SIZE(mess_netdriver_ndev_reply);
1654

    
1655
typedef struct {
1656
        uint32_t id;
1657
        uint32_t link;
1658
        uint32_t media;
1659
        uint32_t oerror;
1660
        uint32_t coll;
1661
        uint32_t ierror;
1662
        uint32_t iqdrop;
1663

    
1664
        uint8_t padding[28];
1665
} mess_netdriver_ndev_status;
1666
_ASSERT_MSG_SIZE(mess_netdriver_ndev_status);
1667

    
1668
typedef struct {
1669
        int mode;
1670

    
1671
        uint8_t padding[52];
1672
} mess_net_netdrv_dl_conf;
1673
_ASSERT_MSG_SIZE(mess_net_netdrv_dl_conf);
1674

    
1675
typedef struct {
1676
        cp_grant_id_t grant;
1677

    
1678
        uint8_t padding[52];
1679
} mess_net_netdrv_dl_getstat_s;
1680
_ASSERT_MSG_SIZE(mess_net_netdrv_dl_getstat_s);
1681

    
1682
typedef struct {
1683
        cp_grant_id_t grant;
1684
        int count;
1685

    
1686
        uint8_t padding[48];
1687
} mess_net_netdrv_dl_readv_s;
1688
_ASSERT_MSG_SIZE(mess_net_netdrv_dl_readv_s);
1689

    
1690
typedef struct {
1691
        cp_grant_id_t grant;
1692
        int count;
1693

    
1694
        uint8_t padding[48];
1695
} mess_net_netdrv_dl_writev_s;
1696
_ASSERT_MSG_SIZE(mess_net_netdrv_dl_writev_s);
1697

    
1698
typedef struct {
1699
        int stat;
1700
        uint8_t hw_addr[6];
1701

    
1702
        uint8_t padding[46];
1703
} mess_netdrv_net_dl_conf;
1704
_ASSERT_MSG_SIZE(mess_netdrv_net_dl_conf);
1705

    
1706
typedef struct {
1707
        int count;
1708
        uint32_t flags;
1709

    
1710
        uint8_t padding[48];
1711
} mess_netdrv_net_dl_task;
1712
_ASSERT_MSG_SIZE(mess_netdrv_net_dl_task);
1713

    
1714
typedef struct {
1715
        u64_t timestamp;        /* valid for every notify msg */
1716
        u64_t interrupts;        /* raised interrupts; valid if from HARDWARE */
1717
        sigset_t sigset;        /* raised signals; valid if from SYSTEM */
1718
        uint8_t padding[24];
1719
} mess_notify;
1720
_ASSERT_MSG_SIZE(mess_notify);
1721

    
1722
typedef struct {
1723
        int base;
1724
        size_t size;
1725
        uint32_t flags;
1726

    
1727
        uint8_t padding[44];
1728
} mess_pci_lsys_busc_get_bar;
1729
_ASSERT_MSG_SIZE(mess_pci_lsys_busc_get_bar);
1730

    
1731
typedef struct {
1732
        uid_t egid;
1733

    
1734
        uint8_t padding[52];
1735
} mess_pm_lc_getgid;
1736
_ASSERT_MSG_SIZE(mess_pm_lc_getgid);
1737

    
1738
typedef struct {
1739
        pid_t parent_pid;
1740

    
1741
        uint8_t padding[52];
1742
} mess_pm_lc_getpid;
1743
_ASSERT_MSG_SIZE(mess_pm_lc_getpid);
1744

    
1745
typedef struct {
1746
        uid_t euid;
1747

    
1748
        uint8_t padding[52];
1749
} mess_pm_lc_getuid;
1750
_ASSERT_MSG_SIZE(mess_pm_lc_getuid);
1751

    
1752
typedef struct {
1753
        long data;
1754

    
1755
        uint8_t padding[52];
1756
} mess_pm_lc_ptrace;
1757
_ASSERT_MSG_SIZE(mess_pm_lc_ptrace);
1758

    
1759
typedef struct {
1760
        sigset_t set;
1761

    
1762
        uint8_t padding[40];
1763
} mess_pm_lc_sigset;
1764
_ASSERT_MSG_SIZE(mess_pm_lc_sigset);
1765

    
1766
typedef struct {
1767
        time_t sec;
1768

    
1769
        long nsec;
1770

    
1771
        uint8_t padding[44];
1772
} mess_pm_lc_time;
1773
_ASSERT_MSG_SIZE(mess_pm_lc_time);
1774

    
1775
typedef struct {
1776
        int status;
1777

    
1778
        uint8_t padding[52];
1779
} mess_pm_lc_wait4;
1780
_ASSERT_MSG_SIZE(mess_pm_lc_wait4);
1781

    
1782
typedef struct {
1783
        int suid;
1784

    
1785
        uint8_t padding[52];
1786
} mess_pm_lexec_exec_new;
1787
_ASSERT_MSG_SIZE(mess_pm_lexec_exec_new);
1788

    
1789
typedef struct {
1790
        uid_t uid;
1791
        uid_t euid;
1792
        gid_t gid;
1793
        gid_t egid;
1794
        int ngroups;
1795

    
1796
        uint8_t padding[36];
1797
} mess_pm_lsys_getepinfo;
1798
_ASSERT_MSG_SIZE(mess_pm_lsys_getepinfo);
1799

    
1800
typedef struct {
1801
        endpoint_t endpt;
1802

    
1803
        uint8_t padding[52];
1804
} mess_pm_lsys_getprocnr;
1805
_ASSERT_MSG_SIZE(mess_pm_lsys_getprocnr);
1806

    
1807
typedef struct {
1808
        endpoint_t endpt;
1809
        unsigned int event;
1810

    
1811
        uint8_t padding[48];
1812
} mess_pm_lsys_proc_event;
1813
_ASSERT_MSG_SIZE(mess_pm_lsys_proc_event);
1814

    
1815
typedef struct {
1816
        int num;
1817

    
1818
        uint8_t padding[52];
1819
} mess_pm_lsys_sigs_signal;
1820
_ASSERT_MSG_SIZE(mess_pm_lsys_sigs_signal);
1821

    
1822
typedef struct {
1823
        endpoint_t endpoint;
1824
        uint32_t maxprio;
1825

    
1826
        uint8_t padding[48];
1827
} mess_pm_sched_scheduling_set_nice;
1828
_ASSERT_MSG_SIZE(mess_pm_sched_scheduling_set_nice);
1829

    
1830
typedef struct {
1831
        dev_t dev;
1832
        mode_t mode;
1833
        uid_t uid;
1834
        gid_t gid;
1835
        uint32_t index;
1836

    
1837
        uint8_t padding[32];
1838
} mess_pty_ptyfs_req;
1839
_ASSERT_MSG_SIZE(mess_pty_ptyfs_req);
1840

    
1841
typedef struct {
1842
        char name[20];
1843

    
1844
        uint8_t padding[36];
1845
} mess_ptyfs_pty_name;
1846
_ASSERT_MSG_SIZE(mess_ptyfs_pty_name);
1847

    
1848
typedef struct {
1849
        int status;
1850

    
1851
        uint8_t padding[52];
1852
} mess_readclock_lc_rtcdev;
1853
_ASSERT_MSG_SIZE(mess_readclock_lc_rtcdev);
1854

    
1855
typedef struct {
1856
        int                result;
1857
        int                type;
1858
        cp_grant_id_t        rproctab_gid;
1859
        endpoint_t        old_endpoint;
1860
        int                restarts;
1861
        int                flags;
1862
        vir_bytes        buff_addr;
1863
        size_t                buff_len;
1864
        int                prepare_state;
1865
        uint8_t padding[20];
1866
} mess_rs_init;
1867
_ASSERT_MSG_SIZE(mess_rs_init);
1868

    
1869
typedef struct {
1870
        endpoint_t endpt;
1871
        int result;
1872
        vir_bytes pc;
1873
        vir_bytes ps_str;
1874

    
1875
        uint8_t padding[40];
1876
} mess_rs_pm_exec_restart;
1877
_ASSERT_MSG_SIZE(mess_rs_pm_exec_restart);
1878

    
1879
typedef struct {
1880
        pid_t pid;
1881
        int nr;
1882

    
1883
        uint8_t padding[48];
1884
} mess_rs_pm_srv_kill;
1885
_ASSERT_MSG_SIZE(mess_rs_pm_srv_kill);
1886

    
1887
typedef struct {
1888
        int                len;
1889
        int                name_len;
1890
        endpoint_t        endpoint;
1891
        void                *addr;
1892
        const char        *name;
1893
        int                subtype;
1894
        uint8_t padding[32];
1895
} mess_rs_req;
1896
_ASSERT_MSG_SIZE(mess_rs_req);
1897

    
1898
typedef struct {
1899
        int                result;
1900
        int                state;
1901
        int                prepare_maxtime;
1902
        int                flags;
1903
        gid_t                state_data_gid;
1904
        uint8_t padding[36];
1905
} mess_rs_update;
1906
_ASSERT_MSG_SIZE(mess_rs_update);
1907

    
1908
typedef struct {
1909
        endpoint_t scheduler;
1910

    
1911
        uint8_t padding[52];
1912
} mess_sched_lsys_scheduling_start;
1913
_ASSERT_MSG_SIZE(mess_sched_lsys_scheduling_start);
1914

    
1915
/* For SYS_GETKSIG, _ENDKSIG, _KILL, _SIGSEND, _SIGRETURN. */
1916
typedef struct {
1917
        sigset_t map;                /* used to pass signal bit map */
1918
        endpoint_t endpt;        /* process number for inform */
1919
        int sig;                /* signal number to send */
1920
        void *sigctx;                /* pointer to signal context */
1921
        uint8_t padding[28];
1922
} mess_sigcalls;
1923
_ASSERT_MSG_SIZE(mess_sigcalls);
1924

    
1925
typedef struct {
1926
        int fkeys;
1927
        int sfkeys;
1928

    
1929
        uint8_t padding[48];
1930
} mess_tty_lsys_fkey_ctl;
1931
_ASSERT_MSG_SIZE(mess_tty_lsys_fkey_ctl);
1932

    
1933
typedef struct {
1934
        dev_t device;
1935
        off_t seek_pos;
1936

    
1937
        cp_grant_id_t grant;
1938
        size_t nbytes;
1939

    
1940
        uint8_t data[32];
1941
} mess_vfs_fs_breadwrite;
1942
_ASSERT_MSG_SIZE(mess_vfs_fs_breadwrite);
1943

    
1944
typedef struct {
1945
        ino_t inode;
1946

    
1947
        mode_t mode;
1948

    
1949
        uint8_t data[44];
1950
} mess_vfs_fs_chmod;
1951
_ASSERT_MSG_SIZE(mess_vfs_fs_chmod);
1952

    
1953
typedef struct {
1954
        ino_t inode;
1955

    
1956
        uid_t uid;
1957
        gid_t gid;
1958

    
1959
        uint8_t data[40];
1960
} mess_vfs_fs_chown;
1961
_ASSERT_MSG_SIZE(mess_vfs_fs_chown);
1962

    
1963
typedef struct {
1964
        ino_t inode;
1965

    
1966
        mode_t mode;
1967
        uid_t uid;
1968
        gid_t gid;
1969
        cp_grant_id_t grant;
1970
        size_t path_len;
1971

    
1972
        uint8_t data[28];
1973
} mess_vfs_fs_create;
1974
_ASSERT_MSG_SIZE(mess_vfs_fs_create);
1975

    
1976
typedef struct {
1977
        dev_t device;
1978

    
1979
        uint8_t data[48];
1980
} mess_vfs_fs_flush;
1981
_ASSERT_MSG_SIZE(mess_vfs_fs_flush);
1982

    
1983
typedef struct {
1984
        ino_t inode;
1985
        off_t trc_start;
1986
        off_t trc_end;
1987

    
1988
        uint8_t data[32];
1989
} mess_vfs_fs_ftrunc;
1990
_ASSERT_MSG_SIZE(mess_vfs_fs_ftrunc);
1991

    
1992
typedef struct {
1993
        ino_t inode;
1994
        off_t seek_pos;
1995

    
1996
        cp_grant_id_t grant;
1997
        size_t mem_size;
1998

    
1999
        uint8_t data[32];
2000
} mess_vfs_fs_getdents;
2001
_ASSERT_MSG_SIZE(mess_vfs_fs_getdents);
2002

    
2003
typedef struct {
2004
        ino_t inode;
2005

    
2006
        uint8_t data[48];
2007
} mess_vfs_fs_inhibread;
2008
_ASSERT_MSG_SIZE(mess_vfs_fs_inhibread);
2009

    
2010
typedef struct {
2011
        ino_t inode;
2012
        ino_t dir_ino;
2013

    
2014
        cp_grant_id_t grant;
2015
        size_t path_len;
2016

    
2017
        uint8_t data[32];
2018
} mess_vfs_fs_link;
2019
_ASSERT_MSG_SIZE(mess_vfs_fs_link);
2020

    
2021
typedef struct {
2022
        ino_t dir_ino;
2023
        ino_t root_ino;
2024

    
2025
        uint32_t flags;
2026
        size_t path_len;
2027
        size_t path_size;
2028
        size_t ucred_size;
2029
        cp_grant_id_t grant_path;
2030
        cp_grant_id_t grant_ucred;
2031
        uid_t uid;
2032
        gid_t gid;
2033

    
2034
        uint8_t data[8];
2035
} mess_vfs_fs_lookup;
2036
_ASSERT_MSG_SIZE(mess_vfs_fs_lookup);
2037

    
2038
typedef struct {
2039
        ino_t inode;
2040

    
2041
        mode_t mode;
2042
        uid_t uid;
2043
        gid_t gid;
2044
        cp_grant_id_t grant;
2045
        size_t path_len;
2046

    
2047
        uint8_t data[28];
2048
} mess_vfs_fs_mkdir;
2049
_ASSERT_MSG_SIZE(mess_vfs_fs_mkdir);
2050

    
2051
typedef struct {
2052
        dev_t device;
2053
        ino_t inode;
2054

    
2055
        mode_t mode;
2056
        uid_t uid;
2057
        gid_t gid;
2058
        cp_grant_id_t grant;
2059
        size_t path_len;
2060

    
2061
        uint8_t data[20];
2062
} mess_vfs_fs_mknod;
2063
_ASSERT_MSG_SIZE(mess_vfs_fs_mknod);
2064

    
2065
typedef struct {
2066
        ino_t inode;
2067

    
2068
        uint8_t data[48];
2069
} mess_vfs_fs_mountpoint;
2070
_ASSERT_MSG_SIZE(mess_vfs_fs_mountpoint);
2071

    
2072
typedef struct {
2073
        dev_t device;
2074

    
2075
        cp_grant_id_t grant;
2076
        size_t path_len;
2077

    
2078
        uint8_t data[40];
2079
} mess_vfs_fs_new_driver;
2080
_ASSERT_MSG_SIZE(mess_vfs_fs_new_driver);
2081

    
2082
typedef struct {
2083
        dev_t device;
2084

    
2085
        mode_t mode;
2086
        uid_t uid;
2087
        gid_t gid;
2088

    
2089
        uint8_t data[36];
2090
} mess_vfs_fs_newnode;
2091
_ASSERT_MSG_SIZE(mess_vfs_fs_newnode);
2092

    
2093
typedef struct {
2094
        ino_t inode;
2095
        unsigned int count;
2096

    
2097
        uint8_t data[44];
2098
} mess_vfs_fs_putnode;
2099
_ASSERT_MSG_SIZE(mess_vfs_fs_putnode);
2100

    
2101
typedef struct {
2102
        ino_t inode;
2103

    
2104
        cp_grant_id_t grant;
2105
        size_t mem_size;
2106

    
2107
        uint8_t data[40];
2108
} mess_vfs_fs_rdlink;
2109
_ASSERT_MSG_SIZE(mess_vfs_fs_rdlink);
2110

    
2111
typedef struct {
2112
        dev_t device;
2113

    
2114
        uint32_t flags;
2115
        size_t path_len;
2116
        cp_grant_id_t grant;
2117

    
2118
        uint8_t data[36];
2119
} mess_vfs_fs_readsuper;
2120
_ASSERT_MSG_SIZE(mess_vfs_fs_readsuper);
2121

    
2122
typedef struct {
2123
        ino_t inode;
2124
        off_t seek_pos;
2125

    
2126
        cp_grant_id_t grant;
2127
        size_t nbytes;
2128

    
2129
        uint8_t data[32];
2130
} mess_vfs_fs_readwrite;
2131
_ASSERT_MSG_SIZE(mess_vfs_fs_readwrite);
2132

    
2133
typedef struct {
2134
        ino_t dir_old;
2135
        ino_t dir_new;
2136

    
2137
        size_t len_old;
2138
        size_t len_new;
2139
        cp_grant_id_t grant_old;
2140
        cp_grant_id_t grant_new;
2141

    
2142
        uint8_t data[24];
2143
} mess_vfs_fs_rename;
2144
_ASSERT_MSG_SIZE(mess_vfs_fs_rename);
2145

    
2146
typedef struct {
2147
        ino_t inode;
2148

    
2149
        size_t path_len;
2150
        size_t mem_size;
2151
        cp_grant_id_t grant_path;
2152
        cp_grant_id_t grant_target;
2153
        uid_t uid;
2154
        gid_t gid;
2155

    
2156
        uint8_t data[24];
2157
} mess_vfs_fs_slink;
2158
_ASSERT_MSG_SIZE(mess_vfs_fs_slink);
2159

    
2160
typedef struct {
2161
        ino_t inode;
2162

    
2163
        cp_grant_id_t grant;
2164

    
2165
        uint8_t data[44];
2166
} mess_vfs_fs_stat;
2167
_ASSERT_MSG_SIZE(mess_vfs_fs_stat);
2168

    
2169
typedef struct {
2170
        cp_grant_id_t grant;
2171

    
2172
        uint8_t data[52];
2173
} mess_vfs_fs_statvfs;
2174
_ASSERT_MSG_SIZE(mess_vfs_fs_statvfs);
2175

    
2176
typedef struct {
2177
        ino_t inode;
2178

    
2179
        cp_grant_id_t grant;
2180
        size_t path_len;
2181

    
2182
        uint8_t data[40];
2183
} mess_vfs_fs_unlink;
2184
_ASSERT_MSG_SIZE(mess_vfs_fs_unlink);
2185

    
2186
typedef struct {
2187
        ino_t inode;
2188
        time_t actime;
2189
        time_t modtime;
2190

    
2191
        uint32_t acnsec;
2192
        uint32_t modnsec;
2193

    
2194
        uint8_t data[24];
2195
} mess_vfs_fs_utime;
2196
_ASSERT_MSG_SIZE(mess_vfs_fs_utime);
2197

    
2198
typedef struct {
2199
        int fd0;
2200
        int fd1;
2201

    
2202
        uint8_t padding[48];
2203
} mess_vfs_lc_fdpair;
2204
_ASSERT_MSG_SIZE(mess_vfs_lc_fdpair);
2205

    
2206
typedef struct {
2207
        off_t offset;
2208

    
2209
        uint8_t padding[48];
2210
} mess_vfs_lc_lseek;
2211
_ASSERT_MSG_SIZE(mess_vfs_lc_lseek);
2212

    
2213
typedef struct {
2214
        unsigned int len;        /* socklen_t */
2215

    
2216
        uint8_t padding[52];
2217
} mess_vfs_lc_socklen;
2218
_ASSERT_MSG_SIZE(mess_vfs_lc_socklen);
2219

    
2220
typedef struct {
2221
        endpoint_t id;
2222
        devminor_t minor;
2223

    
2224
        uint8_t padding[48];
2225
} mess_vfs_lchardriver_cancel;
2226
_ASSERT_MSG_SIZE(mess_vfs_lchardriver_cancel);
2227

    
2228
typedef struct {
2229
        endpoint_t id;
2230
        endpoint_t user;
2231
        devminor_t minor;
2232
        int access;
2233

    
2234
        uint8_t padding[40];
2235
} mess_vfs_lchardriver_openclose;
2236
_ASSERT_MSG_SIZE(mess_vfs_lchardriver_openclose);
2237

    
2238
typedef struct {
2239
        off_t pos;
2240
        cp_grant_id_t grant;
2241
        size_t count;
2242
        unsigned long request;
2243
        int flags;
2244
        endpoint_t id;
2245
        endpoint_t user;
2246
        devminor_t minor;
2247

    
2248
        uint8_t padding[20];
2249
} mess_vfs_lchardriver_readwrite;
2250
_ASSERT_MSG_SIZE(mess_vfs_lchardriver_readwrite);
2251

    
2252
typedef struct {
2253
        devminor_t minor;
2254
        int ops;
2255

    
2256
        uint8_t padding[48];
2257
} mess_vfs_lchardriver_select;
2258
_ASSERT_MSG_SIZE(mess_vfs_lchardriver_select);
2259

    
2260
typedef struct {
2261
        int32_t req_id;
2262
        int32_t sock_id;
2263
        cp_grant_id_t grant;
2264
        unsigned int len;
2265
        endpoint_t user_endpt;
2266
        int sflags;
2267

    
2268
        uint8_t padding[32];
2269
} mess_vfs_lsockdriver_addr;
2270
_ASSERT_MSG_SIZE(mess_vfs_lsockdriver_addr);
2271

    
2272
typedef struct {
2273
        int32_t req_id;
2274
        int32_t sock_id;
2275
        int level;
2276
        int name;
2277
        cp_grant_id_t grant;
2278
        unsigned int len;
2279

    
2280
        uint8_t padding[32];
2281
} mess_vfs_lsockdriver_getset;
2282
_ASSERT_MSG_SIZE(mess_vfs_lsockdriver_getset);
2283

    
2284
typedef struct {
2285
        int32_t req_id;
2286
        int32_t sock_id;
2287
        unsigned long request;
2288
        cp_grant_id_t grant;
2289
        endpoint_t user_endpt;
2290
        int sflags;
2291

    
2292
        uint8_t padding[32];
2293
} mess_vfs_lsockdriver_ioctl;
2294
_ASSERT_MSG_SIZE(mess_vfs_lsockdriver_ioctl);
2295

    
2296
typedef struct {
2297
        int32_t sock_id;
2298
        int ops;
2299

    
2300
        uint8_t padding[48];
2301
} mess_vfs_lsockdriver_select;
2302
_ASSERT_MSG_SIZE(mess_vfs_lsockdriver_select);
2303

    
2304
typedef struct {
2305
        int32_t req_id;
2306
        int32_t sock_id;
2307
        cp_grant_id_t data_grant;
2308
        size_t data_len;
2309
        cp_grant_id_t ctl_grant;
2310
        unsigned int ctl_len;
2311
        cp_grant_id_t addr_grant;
2312
        unsigned int addr_len;
2313
        endpoint_t user_endpt;
2314
        int flags;
2315

    
2316
        uint8_t padding[16];
2317
} mess_vfs_lsockdriver_sendrecv;
2318
_ASSERT_MSG_SIZE(mess_vfs_lsockdriver_sendrecv);
2319

    
2320
typedef struct {
2321
        int32_t req_id;
2322
        int32_t sock_id;
2323
        int param;
2324

    
2325
        uint8_t padding[44];
2326
} mess_vfs_lsockdriver_simple;
2327
_ASSERT_MSG_SIZE(mess_vfs_lsockdriver_simple);
2328

    
2329
typedef struct {
2330
        int32_t req_id;
2331
        int domain;
2332
        int type;
2333
        int protocol;
2334
        endpoint_t user_endpt;
2335

    
2336
        uint8_t padding[36];
2337
} mess_vfs_lsockdriver_socket;
2338
_ASSERT_MSG_SIZE(mess_vfs_lsockdriver_socket);
2339

    
2340
typedef struct {
2341
        cp_grant_id_t grant;
2342
        size_t size;
2343

    
2344
        uint8_t padding[48];
2345
} mess_vfs_lsys_gcov;
2346
_ASSERT_MSG_SIZE(mess_vfs_lsys_gcov);
2347

    
2348
typedef struct {
2349
        dev_t device;
2350
        ino_t inode;
2351

    
2352
        uint8_t padding[40];
2353
} mess_vfs_lsys_socketpath;
2354
_ASSERT_MSG_SIZE(mess_vfs_lsys_socketpath);
2355

    
2356
typedef struct {
2357
        time_t atime;
2358
        time_t mtime;
2359
        long ansec;
2360
        long mnsec;
2361
        size_t len;
2362
        char *name;
2363
        int fd;
2364
        int flags;
2365
        uint8_t padding[16];
2366
} mess_vfs_utimens;
2367
_ASSERT_MSG_SIZE(mess_vfs_utimens);
2368

    
2369
typedef struct {
2370
        off_t offset;
2371
        dev_t dev;
2372
        ino_t ino;
2373
        endpoint_t who;
2374
        u32_t vaddr;
2375
        u32_t len;
2376
        u32_t flags;
2377
        u32_t fd;
2378
        u16_t clearend;
2379
        uint8_t padding[8];
2380
} mess_vm_vfs_mmap;
2381
_ASSERT_MSG_SIZE(mess_vm_vfs_mmap);
2382

    
2383
typedef struct {
2384
        dev_t dev;        /* 64bits long. */
2385
        off_t dev_offset;
2386
        off_t ino_offset;
2387
        ino_t ino;
2388
        void *block;
2389
        u32_t *flags_ptr;
2390
        u8_t pages;
2391
        u8_t flags;
2392
        uint8_t padding[12];
2393
} mess_vmmcp;
2394
_ASSERT_MSG_SIZE(mess_vmmcp);
2395

    
2396
typedef struct {
2397
        void *addr;
2398
        u8_t flags;
2399
        uint8_t padding[51];
2400
} mess_vmmcp_reply;
2401
_ASSERT_MSG_SIZE(mess_vmmcp_reply);
2402

    
2403
typedef struct noxfer_message {
2404
        endpoint_t m_source;                /* who sent the message */
2405
        int m_type;                        /* what kind of message is it */
2406
        union {
2407
                mess_u8                        m_u8;
2408
                mess_u16                m_u16;
2409
                mess_u32                m_u32;
2410
                mess_u64                m_u64;
2411

    
2412
                mess_1                        m_m1;
2413
                mess_2                        m_m2;
2414
                mess_3                        m_m3;
2415
                mess_4                        m_m4;
2416
                mess_7                        m_m7;
2417
                mess_9                        m_m9;
2418
                mess_10                        m_m10;
2419

    
2420
                mess_ds_reply                m_ds_reply;
2421
                mess_ds_req                m_ds_req;
2422
                mess_fs_vfs_breadwrite        m_fs_vfs_breadwrite;
2423
                mess_fs_vfs_chmod        m_fs_vfs_chmod;
2424
                mess_fs_vfs_chown        m_fs_vfs_chown;
2425
                mess_fs_vfs_create        m_fs_vfs_create;
2426
                mess_fs_vfs_getdents        m_fs_vfs_getdents;
2427
                mess_fs_vfs_lookup        m_fs_vfs_lookup;
2428
                mess_fs_vfs_newnode        m_fs_vfs_newnode;
2429
                mess_fs_vfs_rdlink        m_fs_vfs_rdlink;
2430
                mess_fs_vfs_readsuper        m_fs_vfs_readsuper;
2431
                mess_fs_vfs_readwrite        m_fs_vfs_readwrite;
2432
                mess_i2c_li2cdriver_busc_i2c_exec m_i2c_li2cdriver_busc_i2c_exec;
2433
                mess_i2c_li2cdriver_busc_i2c_reserve m_i2c_li2cdriver_busc_i2c_reserve;
2434
                mess_input_linputdriver_input_conf m_input_linputdriver_input_conf;
2435
                mess_input_linputdriver_setleds m_input_linputdriver_setleds;
2436
                mess_input_tty_event        m_input_tty_event;
2437
                mess_krn_lsys_schedule        m_krn_lsys_schedule;
2438
                mess_krn_lsys_sys_devio m_krn_lsys_sys_devio;
2439
                mess_krn_lsys_sys_fork m_krn_lsys_sys_fork;
2440
                mess_krn_lsys_sys_getwhoami m_krn_lsys_sys_getwhoami;
2441
                mess_krn_lsys_sys_irqctl m_krn_lsys_sys_irqctl;
2442
                mess_krn_lsys_sys_times        m_krn_lsys_sys_times;
2443
                mess_krn_lsys_sys_trace        m_krn_lsys_sys_trace;
2444
                mess_krn_lsys_sys_umap        m_krn_lsys_sys_umap;
2445
                mess_krn_lsys_sys_vumap        m_krn_lsys_sys_vumap;
2446
                mess_lbdev_lblockdriver_msg m_lbdev_lblockdriver_msg;
2447
                mess_lblockdriver_lbdev_reply m_lblockdriver_lbdev_reply;
2448
                mess_lc_ipc_semctl        m_lc_ipc_semctl;
2449
                mess_lc_ipc_semget        m_lc_ipc_semget;
2450
                mess_lc_ipc_semop        m_lc_ipc_semop;
2451
                mess_lc_ipc_shmat        m_lc_ipc_shmat;
2452
                mess_lc_ipc_shmctl        m_lc_ipc_shmctl;
2453
                mess_lc_ipc_shmdt        m_lc_ipc_shmdt;
2454
                mess_lc_ipc_shmget        m_lc_ipc_shmget;
2455
                mess_lc_mib_sysctl        m_lc_mib_sysctl;
2456
                mess_lc_pm_exec                m_lc_pm_exec;
2457
                mess_lc_pm_exit                m_lc_pm_exit;
2458
                mess_lc_pm_getsid        m_lc_pm_getsid;
2459
                mess_lc_pm_groups        m_lc_pm_groups;
2460
                mess_lc_pm_itimer        m_lc_pm_itimer;
2461
                mess_lc_pm_mcontext        m_lc_pm_mcontext;
2462
                mess_lc_pm_priority        m_lc_pm_priority;
2463
                mess_lc_pm_ptrace        m_lc_pm_ptrace;
2464
                mess_lc_pm_reboot        m_lc_pm_reboot;
2465
                mess_lc_pm_rusage        m_lc_pm_rusage;
2466
                mess_lc_pm_setgid        m_lc_pm_setgid;
2467
                mess_lc_pm_setuid        m_lc_pm_setuid;
2468
                mess_lc_pm_sig                m_lc_pm_sig;
2469
                mess_lc_pm_sigset        m_lc_pm_sigset;
2470
                mess_lc_pm_sprof        m_lc_pm_sprof;
2471
                mess_lc_pm_sysuname        m_lc_pm_sysuname;
2472
                mess_lc_pm_time                m_lc_pm_time;
2473
                mess_lc_pm_wait4        m_lc_pm_wait4;
2474
                mess_lc_readclock_rtcdev m_lc_readclock_rtcdev;
2475
                mess_lc_svrctl                m_lc_svrctl;
2476
                mess_lc_vfs_chown        m_lc_vfs_chown;
2477
                mess_lc_vfs_close        m_lc_vfs_close;
2478
                mess_lc_vfs_creat        m_lc_vfs_creat;
2479
                mess_lc_vfs_fchdir        m_lc_vfs_fchdir;
2480
                mess_lc_vfs_fchmod        m_lc_vfs_fchmod;
2481
                mess_lc_vfs_fcntl        m_lc_vfs_fcntl;
2482
                mess_lc_vfs_fstat        m_lc_vfs_fstat;
2483
                mess_lc_vfs_fsync        m_lc_vfs_fsync;
2484
                mess_lc_vfs_gcov        m_lc_vfs_gcov;
2485
                mess_lc_vfs_getvfsstat        m_lc_vfs_getvfsstat;
2486
                mess_lc_vfs_ioctl        m_lc_vfs_ioctl;
2487
                mess_lc_vfs_link        m_lc_vfs_link;
2488
                mess_lc_vfs_listen        m_lc_vfs_listen;
2489
                mess_lc_vfs_lseek        m_lc_vfs_lseek;
2490
                mess_lc_vfs_mknod        m_lc_vfs_mknod;
2491
                mess_lc_vfs_mount        m_lc_vfs_mount;
2492
                mess_lc_vfs_path        m_lc_vfs_path;
2493
                mess_lc_vfs_pipe2        m_lc_vfs_pipe2;
2494
                mess_lc_vfs_readlink        m_lc_vfs_readlink;
2495
                mess_lc_vfs_readwrite        m_lc_vfs_readwrite;
2496
                mess_lc_vfs_select        m_lc_vfs_select;
2497
                mess_lc_vfs_sendrecv        m_lc_vfs_sendrecv;
2498
                mess_lc_vfs_shutdown        m_lc_vfs_shutdown;
2499
                mess_lc_vfs_sockaddr        m_lc_vfs_sockaddr;
2500
                mess_lc_vfs_socket        m_lc_vfs_socket;
2501
                mess_lc_vfs_sockmsg        m_lc_vfs_sockmsg;
2502
                mess_lc_vfs_sockopt        m_lc_vfs_sockopt;
2503
                mess_lc_vfs_stat        m_lc_vfs_stat;
2504
                mess_lc_vfs_statvfs1        m_lc_vfs_statvfs1;
2505
                mess_lc_vfs_truncate        m_lc_vfs_truncate;
2506
                mess_lc_vfs_umask        m_lc_vfs_umask;
2507
                mess_lc_vfs_umount        m_lc_vfs_umount;
2508
                mess_lc_vm_brk                m_lc_vm_brk;
2509
                mess_lc_vm_getphys        m_lc_vm_getphys;
2510
                mess_lc_vm_shm_unmap        m_lc_vm_shm_unmap;
2511
                mess_lchardriver_vfs_reply m_lchardriver_vfs_reply;
2512
                mess_lchardriver_vfs_sel1 m_lchardriver_vfs_sel1;
2513
                mess_lchardriver_vfs_sel2 m_lchardriver_vfs_sel2;
2514
                mess_lexec_pm_exec_new        m_lexec_pm_exec_new;
2515
                mess_li2cdriver_i2c_busc_i2c_exec m_li2cdriver_i2c_busc_i2c_exec;
2516
                mess_li2cdriver_i2c_busc_i2c_reserve m_li2cdriver_i2c_busc_i2c_reserve;
2517
                mess_linputdriver_input_event m_linputdriver_input_event;
2518
                mess_lsockdriver_vfs_accept_reply
2519
                    m_lsockdriver_vfs_accept_reply;
2520
                mess_lsockdriver_vfs_recv_reply
2521
                    m_lsockdriver_vfs_recv_reply;
2522
                mess_lsockdriver_vfs_reply        m_lsockdriver_vfs_reply;
2523
                mess_lsockdriver_vfs_select_reply
2524
                    m_lsockdriver_vfs_select_reply;
2525
                mess_lsockdriver_vfs_socket_reply
2526
                    m_lsockdriver_vfs_socket_reply;
2527
                mess_lsys_fi_ctl        m_lsys_fi_ctl;
2528
                mess_lsys_fi_reply        m_lsys_fi_reply;
2529
                mess_lsys_getsysinfo        m_lsys_getsysinfo;
2530
                mess_lsys_krn_readbios        m_lsys_krn_readbios;
2531
                mess_lsys_kern_safecopy        m_lsys_kern_safecopy;
2532
                mess_lsys_krn_schedctl        m_lsys_krn_schedctl;
2533
                mess_lsys_krn_schedule        m_lsys_krn_schedule;
2534
                mess_lsys_krn_sys_abort m_lsys_krn_sys_abort;
2535
                mess_lsys_krn_sys_clear m_lsys_krn_sys_clear;
2536
                mess_lsys_krn_sys_copy        m_lsys_krn_sys_copy;
2537
                mess_lsys_krn_sys_devio m_lsys_krn_sys_devio;
2538
                mess_lsys_krn_sys_diagctl m_lsys_krn_sys_diagctl;
2539
                mess_lsys_krn_sys_exec        m_lsys_krn_sys_exec;
2540
                mess_lsys_krn_sys_fork        m_lsys_krn_sys_fork;
2541
                mess_lsys_krn_sys_getinfo m_lsys_krn_sys_getinfo;
2542
                mess_lsys_krn_sys_getmcontext m_lsys_krn_sys_getmcontext;
2543
                mess_lsys_krn_sys_iopenable m_lsys_krn_sys_iopenable;
2544
                mess_lsys_krn_sys_irqctl m_lsys_krn_sys_irqctl;
2545
                mess_lsys_krn_sys_memset m_lsys_krn_sys_memset;
2546
                mess_lsys_krn_sys_privctl m_lsys_krn_sys_privctl;
2547
                mess_lsys_krn_sys_sdevio m_lsys_krn_sys_sdevio;
2548
                mess_lsys_krn_sys_setalarm m_lsys_krn_sys_setalarm;
2549
                mess_lsys_krn_sys_setgrant m_lsys_krn_sys_setgrant;
2550
                mess_lsys_krn_sys_setmcontext m_lsys_krn_sys_setmcontext;
2551
                mess_lsys_krn_sys_settime m_lsys_krn_sys_settime;
2552
                mess_lsys_krn_sys_sprof m_lsys_krn_sys_sprof;
2553
                mess_lsys_krn_sys_statectl m_lsys_krn_sys_statectl;
2554
                mess_lsys_krn_sys_stime        m_lsys_krn_sys_stime;
2555
                mess_lsys_krn_sys_times        m_lsys_krn_sys_times;
2556
                mess_lsys_krn_sys_trace        m_lsys_krn_sys_trace;
2557
                mess_lsys_krn_sys_umap        m_lsys_krn_sys_umap;
2558
                mess_lsys_krn_sys_vdevio m_lsys_krn_sys_vdevio;
2559
                mess_lsys_krn_sys_vumap m_lsys_krn_sys_vumap;
2560
                mess_lsys_kern_vsafecopy m_lsys_kern_vsafecopy;
2561
                mess_lsys_mib_register        m_lsys_mib_register;
2562
                mess_lsys_mib_reply        m_lsys_mib_reply;
2563
                mess_lsys_pci_busc_get_bar m_lsys_pci_busc_get_bar;
2564
                mess_lsys_pm_getepinfo        m_lsys_pm_getepinfo;
2565
                mess_lsys_pm_getprocnr        m_lsys_pm_getprocnr;
2566
                mess_lsys_pm_proceventmask m_lsys_pm_proceventmask;
2567
                mess_lsys_pm_srv_fork        m_lsys_pm_srv_fork;
2568
                mess_lsys_sched_scheduling_start m_lsys_sched_scheduling_start;
2569
                mess_lsys_sched_scheduling_stop m_lsys_sched_scheduling_stop;
2570
                mess_lsys_tty_fkey_ctl        m_lsys_tty_fkey_ctl;
2571
                mess_lsys_vfs_copyfd        m_lsys_vfs_copyfd;
2572
                mess_lsys_vfs_mapdriver        m_lsys_vfs_mapdriver;
2573
                mess_lsys_vfs_socketpath m_lsys_vfs_socketpath;
2574
                mess_lsys_vm_getref        m_lsys_vm_getref;
2575
                mess_lsys_vm_info        m_lsys_vm_info;
2576
                mess_lsys_vm_map_phys        m_lsys_vm_map_phys;
2577
                mess_lsys_vm_rusage        m_lsys_vm_rusage;
2578
                mess_lsys_vm_unmap_phys        m_lsys_vm_unmap_phys;
2579
                mess_lsys_vm_update        m_lsys_vm_update;
2580
                mess_lsys_vm_vmremap        m_lsys_vm_vmremap;
2581
                mess_mib_lc_sysctl        m_mib_lc_sysctl;
2582
                mess_mib_lsys_call        m_mib_lsys_call;
2583
                mess_mib_lsys_info        m_mib_lsys_info;
2584
                mess_mmap                m_mmap;
2585
                mess_ndev_netdriver_init m_ndev_netdriver_init;
2586
                mess_ndev_netdriver_conf m_ndev_netdriver_conf;
2587
                mess_ndev_netdriver_transfer m_ndev_netdriver_transfer;
2588
                mess_ndev_netdriver_status_reply m_ndev_netdriver_status_reply;
2589
                mess_netdriver_ndev_init_reply m_netdriver_ndev_init_reply;
2590
                mess_netdriver_ndev_reply m_netdriver_ndev_reply;
2591
                mess_netdriver_ndev_status m_netdriver_ndev_status;
2592
                mess_net_netdrv_dl_conf m_net_netdrv_dl_conf;
2593
                mess_net_netdrv_dl_getstat_s m_net_netdrv_dl_getstat_s;
2594
                mess_net_netdrv_dl_readv_s m_net_netdrv_dl_readv_s;
2595
                mess_net_netdrv_dl_writev_s m_net_netdrv_dl_writev_s;
2596
                mess_netdrv_net_dl_conf m_netdrv_net_dl_conf;
2597
                mess_netdrv_net_dl_task m_netdrv_net_dl_task;
2598
                mess_notify                m_notify;
2599
                mess_pci_lsys_busc_get_bar m_pci_lsys_busc_get_bar;
2600
                mess_pm_lc_getgid        m_pm_lc_getgid;
2601
                mess_pm_lc_getpid        m_pm_lc_getpid;
2602
                mess_pm_lc_getuid        m_pm_lc_getuid;
2603
                mess_pm_lc_ptrace        m_pm_lc_ptrace;
2604
                mess_pm_lc_sigset        m_pm_lc_sigset;
2605
                mess_pm_lc_time                m_pm_lc_time;
2606
                mess_pm_lc_wait4        m_pm_lc_wait4;
2607
                mess_pm_lexec_exec_new        m_pm_lexec_exec_new;
2608
                mess_pm_lsys_getepinfo        m_pm_lsys_getepinfo;
2609
                mess_pm_lsys_getprocnr        m_pm_lsys_getprocnr;
2610
                mess_pm_lsys_proc_event        m_pm_lsys_proc_event;
2611
                mess_pm_lsys_sigs_signal m_pm_lsys_sigs_signal;
2612
                mess_pm_sched_scheduling_set_nice m_pm_sched_scheduling_set_nice;
2613
                mess_pty_ptyfs_req        m_pty_ptyfs_req;
2614
                mess_ptyfs_pty_name        m_ptyfs_pty_name;
2615
                mess_readclock_lc_rtcdev m_readclock_lc_rtcdev;
2616
                mess_rs_init                m_rs_init;
2617
                mess_rs_pm_exec_restart        m_rs_pm_exec_restart;
2618
                mess_rs_pm_srv_kill        m_rs_pm_srv_kill;
2619
                mess_rs_req                m_rs_req;
2620
                mess_rs_update                m_rs_update;
2621
                mess_sched_lsys_scheduling_start m_sched_lsys_scheduling_start;
2622
                mess_sigcalls                m_sigcalls;
2623
                mess_tty_lsys_fkey_ctl        m_tty_lsys_fkey_ctl;
2624
                mess_vfs_fs_breadwrite        m_vfs_fs_breadwrite;
2625
                mess_vfs_fs_chmod        m_vfs_fs_chmod;
2626
                mess_vfs_fs_chown        m_vfs_fs_chown;
2627
                mess_vfs_fs_create        m_vfs_fs_create;
2628
                mess_vfs_fs_flush        m_vfs_fs_flush;
2629
                mess_vfs_fs_ftrunc        m_vfs_fs_ftrunc;
2630
                mess_vfs_fs_getdents        m_vfs_fs_getdents;
2631
                mess_vfs_fs_inhibread        m_vfs_fs_inhibread;
2632
                mess_vfs_fs_link        m_vfs_fs_link;
2633
                mess_vfs_fs_lookup        m_vfs_fs_lookup;
2634
                mess_vfs_fs_mkdir        m_vfs_fs_mkdir;
2635
                mess_vfs_fs_mknod        m_vfs_fs_mknod;
2636
                mess_vfs_fs_mountpoint        m_vfs_fs_mountpoint;
2637
                mess_vfs_fs_new_driver        m_vfs_fs_new_driver;
2638
                mess_vfs_fs_newnode        m_vfs_fs_newnode;
2639
                mess_vfs_fs_putnode        m_vfs_fs_putnode;
2640
                mess_vfs_fs_rdlink        m_vfs_fs_rdlink;
2641
                mess_vfs_fs_readsuper        m_vfs_fs_readsuper;
2642
                mess_vfs_fs_readwrite        m_vfs_fs_readwrite;
2643
                mess_vfs_fs_rename        m_vfs_fs_rename;
2644
                mess_vfs_fs_slink        m_vfs_fs_slink;
2645
                mess_vfs_fs_stat        m_vfs_fs_stat;
2646
                mess_vfs_fs_statvfs        m_vfs_fs_statvfs;
2647
                mess_vfs_fs_unlink        m_vfs_fs_unlink;
2648
                mess_vfs_fs_utime        m_vfs_fs_utime;
2649
                mess_vfs_lc_fdpair        m_vfs_lc_fdpair;
2650
                mess_vfs_lc_lseek        m_vfs_lc_lseek;
2651
                mess_vfs_lc_socklen        m_vfs_lc_socklen;
2652
                mess_vfs_lchardriver_cancel        m_vfs_lchardriver_cancel;
2653
                mess_vfs_lchardriver_openclose        m_vfs_lchardriver_openclose;
2654
                mess_vfs_lchardriver_readwrite        m_vfs_lchardriver_readwrite;
2655
                mess_vfs_lchardriver_select        m_vfs_lchardriver_select;
2656
                mess_vfs_lsockdriver_addr        m_vfs_lsockdriver_addr;
2657
                mess_vfs_lsockdriver_getset        m_vfs_lsockdriver_getset;
2658
                mess_vfs_lsockdriver_ioctl        m_vfs_lsockdriver_ioctl;
2659
                mess_vfs_lsockdriver_select        m_vfs_lsockdriver_select;
2660
                mess_vfs_lsockdriver_sendrecv        m_vfs_lsockdriver_sendrecv;
2661
                mess_vfs_lsockdriver_simple        m_vfs_lsockdriver_simple;
2662
                mess_vfs_lsockdriver_socket        m_vfs_lsockdriver_socket;
2663
                mess_vfs_lsys_gcov        m_vfs_lsys_gcov;
2664
                mess_vfs_lsys_socketpath        m_vfs_lsys_socketpath;
2665
                mess_vfs_utimens        m_vfs_utimens;
2666
                mess_vm_vfs_mmap        m_vm_vfs_mmap;
2667
                mess_vmmcp                m_vmmcp;
2668
                mess_vmmcp_reply        m_vmmcp_reply;
2669

    
2670
                u8_t size[56];        /* message payload may have 56 bytes at most */
2671
        };
2672
} message __ALIGNED(16);
2673

    
2674
/* Ensure the complete union respects the IPC assumptions. */
2675
typedef int _ASSERT_message[/* CONSTCOND */sizeof(message) == 64 ? 1 : -1];
2676

    
2677
/* The following defines provide names for useful members. */
2678
#define m1_i1  m_m1.m1i1
2679
#define m1_i2  m_m1.m1i2
2680
#define m1_i3  m_m1.m1i3
2681
#define m1_p1  m_m1.m1p1
2682
#define m1_p2  m_m1.m1p2
2683
#define m1_p3  m_m1.m1p3
2684
#define m1_p4  m_m1.m1p4
2685
#define m1_ull1  m_m1.m1ull1
2686

    
2687
#define m2_ll1  m_m2.m2ll1
2688
#define m2_i1  m_m2.m2i1
2689
#define m2_i2  m_m2.m2i2
2690
#define m2_i3  m_m2.m2i3
2691
#define m2_l1  m_m2.m2l1
2692
#define m2_l2  m_m2.m2l2
2693
#define m2_p1  m_m2.m2p1
2694
#define m2_sigset  m_m2.sigset
2695

    
2696
#define m2_s1  m_m2.m2s1
2697

    
2698
#define m3_i1  m_m3.m3i1
2699
#define m3_i2  m_m3.m3i2
2700
#define m3_p1  m_m3.m3p1
2701
#define m3_ca1 m_m3.m3ca1
2702

    
2703
#define m4_ll1  m_m4.m4ll1
2704
#define m4_l1  m_m4.m4l1
2705
#define m4_l2  m_m4.m4l2
2706
#define m4_l3  m_m4.m4l3
2707
#define m4_l4  m_m4.m4l4
2708
#define m4_l5  m_m4.m4l5
2709

    
2710
#define m7_i1  m_m7.m7i1
2711
#define m7_i2  m_m7.m7i2
2712
#define m7_i3  m_m7.m7i3
2713
#define m7_i4  m_m7.m7i4
2714
#define m7_i5  m_m7.m7i5
2715
#define m7_p1  m_m7.m7p1
2716
#define m7_p2  m_m7.m7p2
2717

    
2718
#define m9_l1  m_m9.m9l1
2719
#define m9_l2  m_m9.m9l2
2720
#define m9_l3  m_m9.m9l3
2721
#define m9_l4  m_m9.m9l4
2722
#define m9_l5  m_m9.m9l5
2723
#define m9_s1  m_m9.m9s1
2724
#define m9_s2  m_m9.m9s2
2725
#define m9_s3  m_m9.m9s3
2726
#define m9_s4  m_m9.m9s4
2727
#define m9_ull1  m_m9.m9ull1
2728
#define m9_ull2  m_m9.m9ull2
2729

    
2730
#define m10_i1 m_m10.m10i1
2731
#define m10_i2 m_m10.m10i2
2732
#define m10_i3 m_m10.m10i3
2733
#define m10_i4 m_m10.m10i4
2734
#define m10_l1 m_m10.m10l1
2735
#define m10_l2 m_m10.m10l2
2736
#define m10_l3 m_m10.m10l3
2737
#define m10_ull1 m_m10.m10ull1
2738

    
2739

    
2740
/*==========================================================================* 
2741
 * Minix run-time system (IPC).                                             *
2742
 *==========================================================================*/ 
2743

    
2744
/* Datastructure for asynchronous sends */
2745
typedef struct asynmsg
2746
{
2747
        unsigned flags;
2748
        endpoint_t dst;
2749
        int result;
2750
        message msg;
2751
} asynmsg_t;
2752

    
2753
/* Defines for flags field */
2754
#define AMF_EMPTY        000        /* slot is not inuse */
2755
#define AMF_VALID        001        /* slot contains message */
2756
#define AMF_DONE        002        /* Kernel has processed the message. The
2757
                                 * result is stored in 'result'
2758
                                 */
2759
#define AMF_NOTIFY        004        /* Send a notification when AMF_DONE is set */
2760
#define AMF_NOREPLY        010        /* Not a reply message for a SENDREC */
2761
#define AMF_NOTIFY_ERR        020        /* Send a notification when AMF_DONE is set and
2762
                                 * delivery of the message failed */
2763

    
2764
int _ipc_send_intr(endpoint_t dest, message *m_ptr);
2765
int _ipc_receive_intr(endpoint_t src, message *m_ptr, int *status_ptr);
2766
int _ipc_sendrec_intr(endpoint_t src_dest, message *m_ptr);
2767
int _ipc_sendnb_intr(endpoint_t dest, message *m_ptr);
2768
int _ipc_notify_intr(endpoint_t dest);
2769
int _ipc_senda_intr(asynmsg_t *table, size_t count);
2770

    
2771
int _do_kernel_call_intr(message *m_ptr);
2772

    
2773
int ipc_minix_kerninfo(struct minix_kerninfo **);
2774

    
2775
/* Hide names to avoid name space pollution. */
2776
#define ipc_notify        _ipc_notify
2777
#define ipc_sendrec        _ipc_sendrec
2778
#define ipc_receive        _ipc_receive
2779
#define ipc_receivenb        _ipc_receivenb
2780
#define ipc_send        _ipc_send
2781
#define ipc_sendnb        _ipc_sendnb
2782
#define ipc_senda        _ipc_senda
2783

    
2784
#define do_kernel_call        _do_kernel_call
2785

    
2786
struct minix_ipcvecs {
2787
        int (*send)(endpoint_t dest, message *m_ptr);
2788
        int (*receive)(endpoint_t src, message *m_ptr, int *st);
2789
        int (*sendrec)(endpoint_t src_dest, message *m_ptr);
2790
        int (*sendnb)(endpoint_t dest, message *m_ptr);
2791
        int (*notify)(endpoint_t dest);
2792
        int (*do_kernel_call)(message *m_ptr);
2793
        int (*senda)(asynmsg_t *table, size_t count);
2794
};
2795

    
2796
/* kernel-set IPC vectors retrieved by a constructor in
2797
 * minix/lib/libc/sys/init.c */
2798
extern struct minix_ipcvecs _minix_ipcvecs;
2799

    
2800
static inline int _ipc_send(endpoint_t dest, message *m_ptr)
2801
{
2802
        return _minix_ipcvecs.send(dest, m_ptr);
2803
}
2804

    
2805
static inline int _ipc_receive(endpoint_t src, message *m_ptr, int *st)
2806
{
2807
        return _minix_ipcvecs.receive(src, m_ptr, st);
2808
}
2809

    
2810
static inline int _ipc_sendrec(endpoint_t src_dest, message *m_ptr)
2811
{
2812
        return _minix_ipcvecs.sendrec(src_dest, m_ptr);
2813
}
2814

    
2815
static inline int _ipc_sendnb(endpoint_t dest, message *m_ptr)
2816
{
2817
        return _minix_ipcvecs.sendnb(dest, m_ptr);
2818
}
2819

    
2820
static inline int _ipc_notify(endpoint_t dest)
2821
{
2822
        return _minix_ipcvecs.notify(dest);
2823
}
2824

    
2825
static inline int _do_kernel_call(message *m_ptr)
2826
{
2827
        return _minix_ipcvecs.do_kernel_call(m_ptr);
2828
}
2829

    
2830
static inline int _ipc_senda(asynmsg_t *table, size_t count)
2831
{
2832
        return _minix_ipcvecs.senda(table, count);
2833
}
2834

    
2835
#endif /* _IPC_H */