summaryrefslogtreecommitdiffstats
path: root/macloader/macaddr_mappings.h
blob: 56d3666cc4f746802ad0a641567c474c2802fb93 (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
/*
 * Copyright (C) 2017, The LineageOS Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef MACADDR_MAPPINGS_H
#define MACADDR_MAPPINGS_H

#define MAX_RANGE_ENTRIES 100
#define RANGE_ENTRY_LEN 9

enum Type {
    NONE,
    MURATA,
    SEMCOSH,
    SEMCOVE,
    SEMCO3RD,
    SEMCO,
    WISOL,
    TYPE_MAX = WISOL
};

struct company_range {
    int type;
    char macaddrs[MAX_RANGE_ENTRIES][RANGE_ENTRY_LEN];
};

/*
 * address mappings from http://hwaddress.com
 */

static const struct company_range murata_ranges = {
    .type = MURATA,
    .macaddrs = {
        "00:0e:6d",
        "00:13:e0",
        "00:21:e8",
        "00:26:e8",
        "00:37:6d",
        "00:60:57",
        "00:ae:fa",
        "04:46:65",
        "10:5f:06",
        "10:a5:d0",
        "10:d5:42",
        "14:7d:c5",
        "1c:99:4c",
        "20:02:af",
        "40:f3:08",
        "44:a7:cf",
        "5c:da:d4",
        "5c:f8:a1",
        "60:21:c0",
        "60:f1:89",
        "78:4b:87",
        "78:52:1a",
        "88:30:8a",
        "90:b6:86",
        "98:f1:70",
        "a0:cc:2b",
        "a4:08:ea",
        "b0:72:bf",
        "b8:d7:af",
        "c8:14:79",
        "d0:e4:4a",
        "d8:c4:6a",
        "dc:ef:ca",
        "f0:27:65",
        "fc:c2:de",
        "fc:db:b3"
    }
};

static const struct company_range semcosh_ranges = {
    .type = SEMCOSH,
    .macaddrs = {
        "34:23:ba",
        "38:aa:3c",
        "5c:0a:5b",
        "88:32:9b",
        "90:18:7c",
        "cc:3a:61"
    }
};

static const struct company_range semco3rd_ranges = {
    .type = SEMCO3RD,
    .macaddrs = {
        "2c:0e:3d",
        "54:88:0e",
        "84:38:38",
        "8c:f5:a3",
        "ac:36:13",
        "ac:5f:3e",
        "b4:79:a7",
        "c0:97:27",
        "c0:bd:d1",
        "c8:ba:94",
        "d0:25:44",
        "e8:50:8b",
        "ec:1f:72",
        "ec:9b:f3",
        "f0:25:b7",
        "f4:09:d8",
        "f8:04:2e"
    }
};

static const struct company_range semco_ranges = {
    .type = SEMCO,
    .macaddrs = {
        "4c:66:41",
        "51:f6:6b",
        "d8:c4:e9",
        "ec:9b:f3"
    }
};

static const struct company_range wisol_ranges = {
    .type = WISOL,
    .macaddrs = {
        "48:5a:3f",
        "70:2c:1f"
    }
};

static const struct company_range *all_ranges[TYPE_MAX] = {
    &murata_ranges,
    &semcosh_ranges,
    &semco3rd_ranges,
    &semco_ranges,
    &wisol_ranges
};

#endif // MACADDR_MAPPINGS_H