-
Notifications
You must be signed in to change notification settings - Fork 5
/
literals.c
66 lines (61 loc) · 1.25 KB
/
literals.c
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
//
// Created by istoffa on 7/28/17.
//
#include <stdlib.h>
#include "literals.h"
/* IANA protocol list subset*/
struct nff_literal_s nff_proto_id_map[]={
{ "ICMP", 1 },
{ "IGMP", 2 },
{ "IPv4", 4 },
{ "TCP", 6 },
{ "UDP", 17 },
{ "RDP", 27 },
{ "IPv6", 41 },
{ "RSVP", 46 },
{ "IPv6-ICMP", 58 },
{ "ICMP6", 58 },
{ "EIGRP", 88 },
{ "ETHERIP", 97 },
{ "IPX-in-IP", 111 },
{ "L2TP", 115 },
{ "ISIS-over-IPv4", 124 },
{ "SPS", 130 },
{ "SCTP", 132 },
{ "UDPLite", 136 },
// terminator
{ NULL, 0U }
};
/* IANA assigned port names subset */
struct nff_literal_s nff_port_map[]={
{ "tcpmux", 1 },
{ "echo", 7 },
{ "discard", 9 },
{ "systat", 11 },
{ "daytime", 13 },
{ "msp", 18 },
{ "ftp-data", 20 },
{ "ftp", 21 },
{ "ssh", 22 },
{ "telnet", 23 },
{ "smtp", 25 },
{ "time", 37 },
{ "rap", 38 },
{ "rlp", 39 },
{ "graphics", 41 },
{ "name", 42 },
{ "nameserver", 42 },
{ "nicname", 43 },
{ "http", 80 },
{ "https", 443 },
// terminator
{ NULL, 0U }
};
struct nff_literal_s * nff_get_protocol_map()
{
return &nff_proto_id_map[0];
}
struct nff_literal_s * nff_get_port_map()
{
return &nff_port_map[0];
}