2 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
3 Copyright (C) 2016-2021 Sergey Matveev <stargrave@stargrave.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, version 3 of the License.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
33 B: [8]byte{'N', 'N', 'C', 'P', 'A', 0, 0, 1},
34 Name: "NNCPAv1 (area packet v1)", Till: "now",
37 B: [8]byte{'N', 'N', 'C', 'P', 'B', 0, 0, 1},
38 Name: "NNCPBv1 (EBlob v1)", Till: "1.0",
41 B: [8]byte{'N', 'N', 'C', 'P', 'B', 0, 0, 2},
42 Name: "NNCPBv2 (EBlob v2)", Till: "3.4",
45 B: [8]byte{'N', 'N', 'C', 'P', 'B', 0, 0, 3},
46 Name: "NNCPBv3 (EBlob v3)", Till: "now",
49 B: [8]byte{'N', 'N', 'C', 'P', 'D', 0, 0, 1},
50 Name: "NNCPDv1 (multicast discovery v1)", Till: "now",
53 B: [8]byte{'N', 'N', 'C', 'P', 'E', 0, 0, 1},
54 Name: "NNCPEv1 (encrypted packet v1)", Till: "0.12",
57 B: [8]byte{'N', 'N', 'C', 'P', 'E', 0, 0, 2},
58 Name: "NNCPEv2 (encrypted packet v2)", Till: "1.0",
61 B: [8]byte{'N', 'N', 'C', 'P', 'E', 0, 0, 3},
62 Name: "NNCPEv3 (encrypted packet v3)", Till: "3.4",
65 B: [8]byte{'N', 'N', 'C', 'P', 'E', 0, 0, 4},
66 Name: "NNCPEv4 (encrypted packet v4)", Till: "6.6.0",
69 B: [8]byte{'N', 'N', 'C', 'P', 'E', 0, 0, 5},
70 Name: "NNCPEv5 (encrypted packet v5)", Till: "now",
73 B: [8]byte{'N', 'N', 'C', 'P', 'S', 0, 0, 1},
74 Name: "NNCPSv1 (sync protocol v1)", Till: "now",
77 B: [8]byte{'N', 'N', 'C', 'P', 'M', 0, 0, 1},
78 Name: "NNCPMv1 (chunked .meta v1)", Till: "6.6.0",
81 B: [8]byte{'N', 'N', 'C', 'P', 'M', 0, 0, 2},
82 Name: "NNCPMv2 (chunked .meta v2)", Till: "now",
85 B: [8]byte{'N', 'N', 'C', 'P', 'P', 0, 0, 1},
86 Name: "NNCPPv1 (plain packet v1)", Till: "2.0",
89 B: [8]byte{'N', 'N', 'C', 'P', 'P', 0, 0, 2},
90 Name: "NNCPPv2 (plain packet v2)", Till: "4.1",
93 B: [8]byte{'N', 'N', 'C', 'P', 'P', 0, 0, 3},
94 Name: "NNCPPv3 (plain packet v3)", Till: "now",
97 BadMagic error = errors.New("Unknown magic number")
100 func (m *Magic) TooOld() error {
101 return fmt.Errorf("%s format is unsupported (used till %s)", m.Name, m.Till)