summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ff.h
blob: af203426fa0f9e080f6176091b1f85f193c73082 (plain)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
/* packet-ff.h
 * FF-HSE definition
 *
 * FF-588-1.3: HSE Field Device Access Agent
 * 6. Field Device Access Agent Interface
 *
 * (c) Copyright 2008, Yukiyo Akisada <Yukiyo.Akisada@jp.yokogawa.com>
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

/*
 * /etc/services
 * ---------------------------------------------------------------------
 * ff-annunc    1089/tcp    # FF Annunciation
 * ff-annunc    1089/udp    # FF Annunciation
 * ff-fms       1090/tcp    # FF Fieldbus Message Specification
 * ff-fms       1090/udp    # FF Fieldbus Message Specification
 * ff-sm        1091/tcp    # FF System Management
 * ff-sm        1091/udp    # FF System Management
 * ff-lr-port   3622/tcp    # FF LAN Redundancy Port
 * ff-lr-port   3622/udp    # FF LAN Redundancy Port
 * ---------------------------------------------------------------------
 */

#ifndef __PACKET_FF_H__
#define __PACKET_FF_H__

#define UDP_PORT_FF_RANGE   "1089-1091,3622"
#define TCP_PORT_FF_ANNUNC  1089

#define TCP_PORT_FF_FMS     1090

#define TCP_PORT_FF_SM      1091

#define TCP_PORT_FF_LR_PORT 3622



/*
 * 6.3. Message Header
 */

/*
 * Options
 */

#define OPTION_MESSAGE_NUMBER_MASK  0x80    /* 10000000 */
#define OPTION_INVOKE_ID_MASK       0x40    /* 01000000 */
#define OPTION_TIME_STAMP_MASK      0x20    /* 00100000 */
#define OPTION_RESERVED_MASK        0x10    /* 00010000 */
#define OPTION_EXTENDED_CNTRL_MASK  0x08    /* 00001000 */
#define OPTION_PAD_LENGTH_MASK      0x07    /* 00000111 */

#define OPTION_PAD_4BYTE    0x03    /* 00000011 */
#define OPTION_PAD_8BYTE    0x07    /* 00000111 */

/*
 * Protocol Id And Confirmed Msg Type
 */

#define PROTOCOL_MASK   0xfc    /* 11111100 */
#define TYPE_MASK       0x03    /* 00000011 */

/*
 * Protocol Id
 */
#define PROTOCOL_FDA    0x04    /* 00000100 */
#define PROTOCOL_SM     0x08    /* 00001000 */
#define PROTOCOL_FMS    0x0c    /* 00001100 */
#define PROTOCOL_LAN    0x10    /* 00010000 */

/*
 * Confirmed Msg Type
 */
#define TYPE_REQUEST    0x00    /* 00000000 */
#define TYPE_RESPONSE   0x01    /* 00000001 */
#define TYPE_ERROR      0x02    /* 00000010 */

/*
 * Service
 */

#define SERVICE_CONFIRMED_FLAG_MASK 0x80    /* 10000000 */
#define SERVICE_SERVICE_ID_MASK     0x7f    /* 01111111 */

#define FDA_UNCONFIRMED_SERVICE 0x00    /* 00000000 */
#define FDA_CONFIRMED_SERVICE   0x80    /* 10000000 */



#define PROTOCOL_FDA_MSG    (PROTOCOL_FDA  << 8)
#define PROTOCOL_SM_MSG     (PROTOCOL_SM   << 8)
#define PROTOCOL_FMS_MSG    (PROTOCOL_FMS  << 8)
#define PROTOCOL_LAN_MSG    (PROTOCOL_LAN  << 8)



#define PROTOCOL_TYPE_REQ   (TYPE_REQUEST  << 8)
#define PROTOCOL_TYPE_RSP   (TYPE_RESPONSE << 8)
#define PROTOCOL_TYPE_ERR   (TYPE_ERROR    << 8)



/*
 * 6.5.1. FDA Session Management Services
 */

/* Confirmed Service Id */
#define FDA_OPEN_SESSION    1
#define FDA_IDLE            3

/* 6.5.1.1. FDA Open Session (Confirmed Service Id = 1) */
#define FDA_MSG_SESSION_OPEN_REQ \
    (PROTOCOL_FDA_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | FDA_OPEN_SESSION)
#define FDA_MSG_SESSION_OPEN_RSP \
    (PROTOCOL_FDA_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | FDA_OPEN_SESSION)
#define FDA_MSG_SESSION_OPEN_ERR \
    (PROTOCOL_FDA_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | FDA_OPEN_SESSION)

/* 6.5.1.2. FDA Idle (Confirmed Service Id = 3) */
#define FDA_MSG_SESSION_IDLE_REQ \
    (PROTOCOL_FDA_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | FDA_IDLE)
#define FDA_MSG_SESSION_IDLE_RSP \
    (PROTOCOL_FDA_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | FDA_IDLE)
#define FDA_MSG_SESSION_IDLE_ERR \
    (PROTOCOL_FDA_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | FDA_IDLE)



/*
 * 6.5.2. SM Services
 */

/* Unconfirmed Service Id */
#define HSE_SM_FIND_TAG_QUERY        1
#define HSE_SM_FIND_TAG_REPLY        2
#define HSE_SM_DEVICE_ANNUNCIATION  16

/* Confirmed Service Id */
#define HSE_SM_IDENTIFY              3
#define HSE_SM_CLEAR_ADDRESS        12
#define HSE_SM_SET_ASSIGNMENT       14
#define HSE_SM_CLEAR_ASSIGNMENT     15

/* 6.5.2.1. SM Find Tag Query (Unconfirmed Service Id = 1) */
#define SM_MSG_FIND_TAG_QUERY_REQ \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | HSE_SM_FIND_TAG_QUERY)

/* 6.5.2.2. SM Find Tag Reply (Unconfirmed Service Id = 2) */
#define SM_MSG_FIND_TAG_REPLY_REQ \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | HSE_SM_FIND_TAG_REPLY)

/* 6.5.2.3. SM Identify (Confirmed Service Id = 3) */
#define SM_MSG_IDENTIFY_REQ \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_SM_IDENTIFY)
#define SM_MSG_IDENTIFY_RSP \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_SM_IDENTIFY)
#define SM_MSG_IDENTIFY_ERR \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_SM_IDENTIFY)

/* 6.5.2.4. SM Clear Address (Confirmed Service Id = 12) */
#define SM_MSG_CLEAR_ADDRESS_REQ \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_SM_CLEAR_ADDRESS)
#define SM_MSG_CLEAR_ADDRESS_RSP \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_SM_CLEAR_ADDRESS)
#define SM_MSG_CLEAR_ADDRESS_ERR \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_SM_CLEAR_ADDRESS)

/* 6.5.2.5. SM Set Assignment Info (Confirmed Service Id = 14) */
#define SM_MSG_SET_ASSIGNMENT_REQ \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_SM_SET_ASSIGNMENT)
#define SM_MSG_SET_ASSIGNMENT_RSP \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_SM_SET_ASSIGNMENT)
#define SM_MSG_SET_ASSIGNMENT_ERR \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_SM_SET_ASSIGNMENT)

/* 6.5.2.6. SM Clear Assignment Info (Confirmed Service Id = 15) */
#define SM_MSG_CLEAR_ASSIGNMENT_REQ \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_SM_CLEAR_ASSIGNMENT)
#define SM_MSG_CLEAR_ASSIGNMENT_RSP \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_SM_CLEAR_ASSIGNMENT)
#define SM_MSG_CLEAR_ASSIGNMENT_ERR \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_SM_CLEAR_ASSIGNMENT)

/* 6.5.2.7. SM Device Annunciation (Unconfirmed Service Id = 16) */
#define SM_MSG_DEVICE_ANNUNCIATION_REQ \
    (PROTOCOL_SM_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | HSE_SM_DEVICE_ANNUNCIATION)



/*
 * 6.5.3. FMS Services
 */

/* Unconfirmed Service Id */
#define HSE_FMS_INFORMATION_REPORT                            0
#define HSE_FMS_UNSOLICITED_STATUS                            1
#define HSE_FMS_EVENT_NOTIFICATION                            2
#define HSE_FMS_INFORMATION_REPORT_WITH_SUBINDEX             16
#define HSE_FMS_INFORMATION_REPORT_ON_CHANGE                 17
#define HSE_FMS_INFORMATION_REPORT_ON_CHANGE_WITH_SUBINDEX   18
#define HSE_FMS_ABORT                                       112

/* Confirmed Service Id */
#define HSE_FMS_STATUS                               0
#define HSE_FMS_IDENTIFY                             1
#define HSE_FMS_READ                                 2
#define HSE_FMS_WRITE                                3
#define HSE_FMS_GET_OD                               4
#define HSE_FMS_DEFINE_VARIABLE_LIST                 7
#define HSE_FMS_DELETE_VARIABLE_LIST                 8
#define HSE_FMS_INITIATE_DOWNLOAD_SEQUENCE           9
#define HSE_FMS_DOWNLOAD_SEGMENT                    10
#define HSE_FMS_TERMINATE_DOWNLOAD_SEQUENCE         11
#define HSE_FMS_INITIATE_UPLOAD_SEQUENCE            12
#define HSE_FMS_UPLOAD_SEGMENT                      13
#define HSE_FMS_TERMINATE_UPLOAD_SEQUENCE           14
#define HSE_FMS_REQUEST_DOMAIN_DOWNLOAD             15
#define HSE_FMS_REQUEST_DOMAIN_UPLOAD               16
#define HSE_FMS_CREATE_PROGRAM_INVOCATION           17
#define HSE_FMS_DELETE_PROGRAM_INVOCATION           18
#define HSE_FMS_START                               19
#define HSE_FMS_STOP                                20
#define HSE_FMS_RESUME                              21
#define HSE_FMS_RESET                               22
#define HSE_FMS_KILL                                23
#define HSE_FMS_ALTER_EVENT_CONDITION_MONITORING    24
#define HSE_FMS_ACKNOWLEDGE_EVENT_NOTIFICATION      25
#define HSE_FMS_INITIATE_PUT_OD                     28
#define HSE_FMS_PUT_OD                              29
#define HSE_FMS_TERMINATE_PUT_OD                    30
#define HSE_FMS_GENERIC_INITIATE_DOWNLOAD_SEQUENCE  31
#define HSE_FMS_GENERIC_DOWNLOAD_SEGMENT            32
#define HSE_FMS_GENERIC_TERMINATE_DOWNLOAD_SEQUENCE 33
#define HSE_FMS_READ_WITH_SUBINDEX                  82
#define HSE_FMS_WRITE_WITH_SUBINDEX                 83
#define HSE_FMS_INITIATE                            96

/* 6.5.3.1. FMS Reject */

/* 6.5.3.2. FMS Initiate (Confirmed Service Id = 96) */
#define FMS_MSG_INITIATE_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE)
#define FMS_MSG_INITIATE_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE)
#define FMS_MSG_INITIATE_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE)

/* 6.5.3.3. FMS Abort (Unconfirmed Service Id = 112) */
#define FMS_MSG_ABORT_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | HSE_FMS_ABORT)

/* 6.5.3.4. FMS Status (Confirmed Service Id = 0) */
#define FMS_MSG_STATUS_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_STATUS)
#define FMS_MSG_STATUS_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_STATUS)
#define FMS_MSG_STATUS_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_STATUS)

/* 6.5.3.5. FMS Unsolicited Status (Unconfirmed Service Id = 1) */
#define FMS_MSG_UNSOLICITED_STATUS_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | HSE_FMS_UNSOLICITED_STATUS)

/* 6.5.3.6. FMS Identify (Confirmed Service Id = 1) */
#define FMS_MSG_IDENTIFY_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_IDENTIFY)
#define FMS_MSG_IDENTIFY_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_IDENTIFY)
#define FMS_MSG_IDENTIFY_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_IDENTIFY)

/* 6.5.3.7. FMS Get OD (Confirmed Service Id = 4) */
#define FMS_MSG_GET_OD_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GET_OD)
#define FMS_MSG_GET_OD_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GET_OD)
#define FMS_MSG_GET_OD_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GET_OD)

/* 6.5.3.8. FMS Initiate Put OD (Confirmed Service Id = 28) */
#define FMS_MSG_INITIATE_PUT_OD_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE_PUT_OD)
#define FMS_MSG_INITIATE_PUT_OD_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE_PUT_OD)
#define FMS_MSG_INITIATE_PUT_OD_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE_PUT_OD)

/* 6.5.3.9. FMS Put OD (Confirmed Service Id = 29) */
#define FMS_MSG_PUT_OD_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_PUT_OD)
#define FMS_MSG_PUT_OD_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_PUT_OD)
#define FMS_MSG_PUT_OD_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_PUT_OD)

/* 6.5.3.10. FMS Terminate Put OD (Confirmed Service Id = 30) */
#define FMS_MSG_TERMINATE_PUT_OD_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_TERMINATE_PUT_OD)
#define FMS_MSG_TERMINATE_PUT_OD_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_TERMINATE_PUT_OD)
#define FMS_MSG_TERMINATE_PUT_OD_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_TERMINATE_PUT_OD)

/* 6.5.3.11. FMS Generic Initiate Download Sequence
             (Confirmed Service Id = 31) */
#define FMS_MSG_GENERIC_INITIATE_DOWNLOAD_SEQUENCE_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GENERIC_INITIATE_DOWNLOAD_SEQUENCE)
#define FMS_MSG_GENERIC_INITIATE_DOWNLOAD_SEQUENCE_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GENERIC_INITIATE_DOWNLOAD_SEQUENCE)
#define FMS_MSG_GENERIC_INITIATE_DOWNLOAD_SEQUENCE_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GENERIC_INITIATE_DOWNLOAD_SEQUENCE)

/* 6.5.3.12. FMS Generic Download Segment (Confirmed Service Id = 32) */
#define FMS_MSG_GENERIC_DOWNLOAD_SEGMENT_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GENERIC_DOWNLOAD_SEGMENT)
#define FMS_MSG_GENERIC_DOWNLOAD_SEGMENT_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GENERIC_DOWNLOAD_SEGMENT)
#define FMS_MSG_GENERIC_DOWNLOAD_SEGMENT_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GENERIC_DOWNLOAD_SEGMENT)

/* 6.5.3.13. FMS Generic Terminate Download Sequence
             (Confirmed Service Id = 33) */
#define FMS_MSG_GENERIC_TERMINATE_DOWNLOAD_SEQUENCE_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GENERIC_TERMINATE_DOWNLOAD_SEQUENCE)
#define FMS_MSG_GENERIC_TERMINATE_DOWNLOAD_SEQUENCE_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GENERIC_TERMINATE_DOWNLOAD_SEQUENCE)
#define FMS_MSG_GENERIC_TERMINATE_DOWNLOAD_SEQUENCE_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_GENERIC_TERMINATE_DOWNLOAD_SEQUENCE)

/* 6.5.3.14. FMS Initiate Download Sequence (Confirmed Service Id = 9) */
#define FMS_MSG_INITIATE_DOWNLOAD_SEQUENCE_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE_DOWNLOAD_SEQUENCE)
#define FMS_MSG_INITIATE_DOWNLOAD_SEQUENCE_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE_DOWNLOAD_SEQUENCE)
#define FMS_MSG_INITIATE_DOWNLOAD_SEQUENCE_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE_DOWNLOAD_SEQUENCE)

/* 6.5.3.15. FMS Download Segment (Confirmed Service Id = 10) */
#define FMS_MSG_DOWNLOAD_SEGMENT_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DOWNLOAD_SEGMENT)
#define FMS_MSG_DOWNLOAD_SEGMENT_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DOWNLOAD_SEGMENT)
#define FMS_MSG_DOWNLOAD_SEGMENT_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DOWNLOAD_SEGMENT)

/* 6.5.3.16. FMS Terminate Download Sequence (Confirmed Service Id = 11) */
#define FMS_MSG_TERMINATE_DOWNLOAD_SEQUENCE_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_TERMINATE_DOWNLOAD_SEQUENCE)
#define FMS_MSG_TERMINATE_DOWNLOAD_SEQUENCE_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_TERMINATE_DOWNLOAD_SEQUENCE)
#define FMS_MSG_TERMINATE_DOWNLOAD_SEQUENCE_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_TERMINATE_DOWNLOAD_SEQUENCE)

/* 6.5.3.17. FMS Initiate Upload Sequence (Confirmed Service Id = 12) */
#define FMS_MSG_INITIATE_UPLOAD_SEQUENCE_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE_UPLOAD_SEQUENCE)
#define FMS_MSG_INITIATE_UPLOAD_SEQUENCE_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE_UPLOAD_SEQUENCE)
#define FMS_MSG_INITIATE_UPLOAD_SEQUENCE_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_INITIATE_UPLOAD_SEQUENCE)

/* 6.5.3.18. FMS Upload Segment (Confirmed Service Id = 13) */
#define FMS_MSG_UPLOAD_SEGMENT_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_UPLOAD_SEGMENT)
#define FMS_MSG_UPLOAD_SEGMENT_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_UPLOAD_SEGMENT)
#define FMS_MSG_UPLOAD_SEGMENT_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_UPLOAD_SEGMENT)

/* 6.5.3.19. FMS Terminate Upload Sequence (Confirmed Service Id = 14) */
#define FMS_MSG_TERMINATE_UPLOAD_SEQUENCE_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_TERMINATE_UPLOAD_SEQUENCE)
#define FMS_MSG_TERMINATE_UPLOAD_SEQUENCE_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_TERMINATE_UPLOAD_SEQUENCE)
#define FMS_MSG_TERMINATE_UPLOAD_SEQUENCE_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_TERMINATE_UPLOAD_SEQUENCE)

/* 6.5.3.20. FMS Request Domain Download (Confirmed Service Id = 15) */
#define FMS_MSG_REQUEST_DOMAIN_DOWNLOAD_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_REQUEST_DOMAIN_DOWNLOAD)
#define FMS_MSG_REQUEST_DOMAIN_DOWNLOAD_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_REQUEST_DOMAIN_DOWNLOAD)
#define FMS_MSG_REQUEST_DOMAIN_DOWNLOAD_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_REQUEST_DOMAIN_DOWNLOAD)

/* 6.5.3.21. FMS Request Domain Upload (Confirmed Service Id = 16) */
#define FMS_MSG_REQUEST_DOMAIN_UPLOAD_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_REQUEST_DOMAIN_UPLOAD)
#define FMS_MSG_REQUEST_DOMAIN_UPLOAD_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_REQUEST_DOMAIN_UPLOAD)
#define FMS_MSG_REQUEST_DOMAIN_UPLOAD_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_REQUEST_DOMAIN_UPLOAD)

/* 6.5.3.22. FMS Create Program Invocation (Confirmed Service Id = 17) */
#define FMS_MSG_CREATE_PI_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_CREATE_PROGRAM_INVOCATION)
#define FMS_MSG_CREATE_PI_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_CREATE_PROGRAM_INVOCATION)
#define FMS_MSG_CREATE_PI_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_CREATE_PROGRAM_INVOCATION)

/* 6.5.3.23. FMS Delete Program Invocation (Confirmed Service Id = 18) */
#define FMS_MSG_DELETE_PI_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DELETE_PROGRAM_INVOCATION)
#define FMS_MSG_DELETE_PI_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DELETE_PROGRAM_INVOCATION)
#define FMS_MSG_DELETE_PI_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DELETE_PROGRAM_INVOCATION)

/* 6.5.3.24. FMS Start (Confirmed Service Id = 19) */
#define FMS_MSG_START_PI_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_START)
#define FMS_MSG_START_PI_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_START)
#define FMS_MSG_START_PI_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_START)

/* 6.5.3.25. FMS Stop (Confirmed Service Id = 20) */
#define FMS_MSG_STOP_PI_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_STOP)
#define FMS_MSG_STOP_PI_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_STOP)
#define FMS_MSG_STOP_PI_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_STOP)

/* 6.5.3.26. FMS Resume (Confirmed Service Id = 21) */
#define FMS_MSG_RESUME_PI_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_RESUME)
#define FMS_MSG_RESUME_PI_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_RESUME)
#define FMS_MSG_RESUME_PI_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_RESUME)

/* 6.5.3.27. FMS Reset (Confirmed Service Id = 22) */
#define FMS_MSG_RESET_PI_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_RESET)
#define FMS_MSG_RESET_PI_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_RESET)
#define FMS_MSG_RESET_PI_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_RESET)

/* 6.5.3.28. FMS Kill (Confirmed Service Id = 23) */
#define FMS_MSG_KILL_PI_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_KILL)
#define FMS_MSG_KILL_PI_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_KILL)
#define FMS_MSG_KILL_PI_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_KILL)

/* 6.5.3.29. FMS Read (Confirmed Service Id = 2) */
#define FMS_MSG_READ_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_READ)
#define FMS_MSG_READ_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_READ)
#define FMS_MSG_READ_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_READ)

/* 6.5.3.30. FMS Read with Subindex (Confirmed Service Id = 82) */
#define FMS_MSG_READ_SUBINDEX_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_READ_WITH_SUBINDEX)
#define FMS_MSG_READ_SUBINDEX_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_READ_WITH_SUBINDEX)
#define FMS_MSG_READ_SUBINDEX_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_READ_WITH_SUBINDEX)

/* 6.5.3.31. FMS Write (Confirmed Service Id = 3) */
#define FMS_MSG_WRITE_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_WRITE)
#define FMS_MSG_WRITE_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_WRITE)
#define FMS_MSG_WRITE_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_WRITE)

/* 6.5.3.32. FMS Write with Subindex (Confirmed Service Id = 83) */
#define FMS_MSG_WRITE_SUBINDEX_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_WRITE_WITH_SUBINDEX)
#define FMS_MSG_WRITE_SUBINDEX_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_WRITE_WITH_SUBINDEX)
#define FMS_MSG_WRITE_SUBINDEX_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_WRITE_WITH_SUBINDEX)

/* 6.5.3.33. FMS Define Variable List (Confirmed Service Id = 7) */
#define FMS_MSG_DEFINE_VARIABLE_LIST_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DEFINE_VARIABLE_LIST)
#define FMS_MSG_DEFINE_VARIABLE_LIST_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DEFINE_VARIABLE_LIST)
#define FMS_MSG_DEFINE_VARIABLE_LIST_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DEFINE_VARIABLE_LIST)

/* 6.5.3.34. FMS Delete Variable List (Confirmed Service Id = 8) */
#define FMS_MSG_DELETE_VARIABLE_LIST_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DELETE_VARIABLE_LIST)
#define FMS_MSG_DELETE_VARIABLE_LIST_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DELETE_VARIABLE_LIST)
#define FMS_MSG_DELETE_VARIABLE_LIST_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_DELETE_VARIABLE_LIST)

/* 6.5.3.35. FMS Information Report (Unconfirmed Service Id = 0) */
#define FMS_MSG_INFO_REPORT_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | HSE_FMS_INFORMATION_REPORT)

/* 6.5.3.36. FMS Information Report with Subindex
    (Unconfirmed Service Id = 16) */
#define FMS_MSG_INFO_REPORT_SUBINDEX_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | HSE_FMS_INFORMATION_REPORT_WITH_SUBINDEX)

/* 6.5.3.37. FMS Information Report On Change (Unconfirmed Service Id = 17) */
#define FMS_MSG_INFO_REPORT_CHANGE_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | HSE_FMS_INFORMATION_REPORT_ON_CHANGE)

/* 6.5.3.38. FMS Information Report On Change with Subindex
    (Unconfirmed Service Id = 18) */
#define FMS_MSG_INFO_REPORT_CHANGE_SUBINDEX_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | FDA_UNCONFIRMED_SERVICE | \
        HSE_FMS_INFORMATION_REPORT_ON_CHANGE_WITH_SUBINDEX)

/* 6.5.3.39. FMS Event Notification (Unconfirmed Service Id = 2) */
#define FMS_MSG_EVENT_NOTIFICATION_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | HSE_FMS_EVENT_NOTIFICATION)

/* 6.5.3.40. FMS Alter Event Condition Monitoring (Confirmed Service Id = 24) */
#define FMS_MSG_ALTER_EVENT_CONDITION_MONITORING_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_ALTER_EVENT_CONDITION_MONITORING)
#define FMS_MSG_ALTER_EVENT_CONDITION_MONITORING_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_ALTER_EVENT_CONDITION_MONITORING)
#define FMS_MSG_ALTER_EVENT_CONDITION_MONITORING_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_ALTER_EVENT_CONDITION_MONITORING)

/* 6.5.3.41. FMS Acknowledge Event Notification (Confirmed Service Id = 25) */
#define FMS_MSG_ACKNOWLEDGE_EVENT_NOTIFICATION_REQ \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_ACKNOWLEDGE_EVENT_NOTIFICATION)
#define FMS_MSG_ACKNOWLEDGE_EVENT_NOTIFICATION_RSP \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_ACKNOWLEDGE_EVENT_NOTIFICATION)
#define FMS_MSG_ACKNOWLEDGE_EVENT_NOTIFICATION_ERR \
    (PROTOCOL_FMS_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | HSE_FMS_ACKNOWLEDGE_EVENT_NOTIFICATION)



/*
 * 6.5.4 LAN Redundancy Services
 */

/* Unconfirmed Service Id */
#define LAN_DIAG    1

/* Confirmed Service Id */
#define LAN_GET_INFO        1
#define LAN_PUT_INFO        2
#define LAN_GET_STATISTICS  3

/* 6.5.4.1. LAN Redundancy Get Information (Confirmed Service Id = 1) */
#define LAN_MSG_GET_INFO_REQ \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | LAN_GET_INFO)
#define LAN_MSG_GET_INFO_RSP \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | LAN_GET_INFO)
#define LAN_MSG_GET_INFO_ERR \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | LAN_GET_INFO)

/* 6.5.4.2. LAN Redundancy Put Information (Confirmed Service Id = 2) */
#define LAN_MSG_PUT_INFO_REQ \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | LAN_PUT_INFO)
#define LAN_MSG_PUT_INFO_RSP \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | LAN_PUT_INFO)
#define LAN_MSG_PUT_INFO_ERR \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | LAN_PUT_INFO)

/* 6.5.4.3. LAN Redundancy Get Statistics (Confirmed Service Id = 3) */
#define LAN_MSG_GET_STATISTICS_REQ \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_REQ | \
        FDA_CONFIRMED_SERVICE | LAN_GET_STATISTICS)
#define LAN_MSG_GET_STATISTICS_RSP \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_RSP | \
        FDA_CONFIRMED_SERVICE | LAN_GET_STATISTICS)
#define LAN_MSG_GET_STATISTICS_ERR \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_ERR | \
        FDA_CONFIRMED_SERVICE | LAN_GET_STATISTICS)

/* 6.5.4.4. Diagnostic Message (Unconfirmed Service Id = 1) */
#define LAN_MSG_DIAG_REQ \
    (PROTOCOL_LAN_MSG | PROTOCOL_TYPE_REQ | \
        FDA_UNCONFIRMED_SERVICE | LAN_DIAG)
#endif  /* __PACKET_FF_H__ */