public byte[] serialize() {

		// 6 bytes for mac
		byte[] serialized = new byte[1 + data.length + 13];
		serialized[0] = (byte) type.ordinal();

		serialized[1] = (byte) ttl;

		byte[] mac = getMacAsBytes(this.receiverMac);

		for (int i = 2; i <= 7; i++) {
			serialized[i] = mac[i - 2];
		}
		mac = getMacAsBytes(this.senderMac);

		for (int i = 8; i <= 13; i++) {
			serialized[i] = mac[i - 8];
		}
		for (int i = 14; i < serialized.length; i++) {
			serialized[i] = data[i - 14];
		}
		return serialized;
	}