diff --git a/proto b/proto index c9ad10d7..1813b370 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit c9ad10d7e2f7f465dc477e98d6ec9d3b7059336c +Subproject commit 1813b370ab5336fc3ba453fa92206f4941eda96b diff --git a/src/mesh/DSRRouter.cpp b/src/mesh/DSRRouter.cpp index d8ca542d..ad41afdd 100644 --- a/src/mesh/DSRRouter.cpp +++ b/src/mesh/DSRRouter.cpp @@ -105,7 +105,7 @@ void DSRRouter::sniffReceived(const MeshPacket *p) // packets until ack arrives) // FIXME, if we don't get a route reply at all (or a route error), timeout and generate a routeerror TIMEOUT on our own... break; - case SubPacket_route_error_tag: + case SubPacket_error_reason_tag: removeRoute(p->decoded.dest); // FIXME: if any pending packets were waiting on this route, delete them @@ -131,7 +131,7 @@ void DSRRouter::sniffReceived(const MeshPacket *p) assert(p->decoded.source); // I think this is guaranteed by now // FIXME - what if the current packet _is_ a route error packet? - sendRouteError(p, RouteError_NO_ROUTE); + sendRouteError(p, ErrorReason_NO_ROUTE); } // FIXME, stop local processing of this packet @@ -145,7 +145,7 @@ void DSRRouter::sniffReceived(const MeshPacket *p) if (pending && pending->packet->decoded.source) { // if source not set, this was not a multihop packet, just ignore removeRoute(pending->packet->decoded.dest); // We no longer have a route to the specified node - sendRouteError(p, RouteError_GOT_NAK); + sendRouteError(p, ErrorReason_GOT_NAK); } } } @@ -230,7 +230,7 @@ void DSRRouter::sendNextHop(NodeNum n, const MeshPacket *p) /** * Send a route error packet towards whoever originally sent this message */ -void DSRRouter::sendRouteError(const MeshPacket *p, RouteError err) +void DSRRouter::sendRouteError(const MeshPacket *p, ErrorReason err) { DEBUG_MSG("FIXME not implemented sendRouteError\n"); } diff --git a/src/mesh/DSRRouter.h b/src/mesh/DSRRouter.h index 3bc46157..02c0f277 100644 --- a/src/mesh/DSRRouter.h +++ b/src/mesh/DSRRouter.h @@ -70,7 +70,7 @@ class DSRRouter : public ReliableRouter /** * Send a route error packet towards whoever originally sent this message */ - void sendRouteError(const MeshPacket *p, RouteError err); + void sendRouteError(const MeshPacket *p, ErrorReason err); /** make a copy of p, start discovery, but only if we don't * already a discovery in progress for that node number. Caller has already scheduled this message for retransmission diff --git a/src/mesh/generated/mesh.pb.h b/src/mesh/generated/mesh.pb.h index a13d7de5..3f1b24c2 100644 --- a/src/mesh/generated/mesh.pb.h +++ b/src/mesh/generated/mesh.pb.h @@ -11,12 +11,13 @@ #endif /* Enum definitions */ -typedef enum _RouteError { - RouteError_NONE = 0, - RouteError_NO_ROUTE = 1, - RouteError_GOT_NAK = 2, - RouteError_TIMEOUT = 3 -} RouteError; +typedef enum _ErrorReason { + ErrorReason_NONE = 0, + ErrorReason_NO_ROUTE = 1, + ErrorReason_GOT_NAK = 2, + ErrorReason_TIMEOUT = 3, + ErrorReason_NO_INTERFACE = 4 +} ErrorReason; typedef enum _Constants { Constants_Unused = 0, @@ -230,7 +231,7 @@ typedef struct _SubPacket { User user; RouteDiscovery route_request; RouteDiscovery route_reply; - RouteError route_error; + ErrorReason error_reason; }; uint32_t original_id; bool want_response; @@ -288,9 +289,9 @@ typedef struct _ToRadio { /* Helper constants for enums */ -#define _RouteError_MIN RouteError_NONE -#define _RouteError_MAX RouteError_TIMEOUT -#define _RouteError_ARRAYSIZE ((RouteError)(RouteError_TIMEOUT+1)) +#define _ErrorReason_MIN ErrorReason_NONE +#define _ErrorReason_MAX ErrorReason_NO_INTERFACE +#define _ErrorReason_ARRAYSIZE ((ErrorReason)(ErrorReason_NO_INTERFACE+1)) #define _Constants_MIN Constants_Unused #define _Constants_MAX Constants_DATA_PAYLOAD_LEN @@ -450,7 +451,7 @@ extern "C" { #define SubPacket_user_tag 4 #define SubPacket_route_request_tag 6 #define SubPacket_route_reply_tag 7 -#define SubPacket_route_error_tag 13 +#define SubPacket_error_reason_tag 13 #define SubPacket_original_id_tag 2 #define SubPacket_want_response_tag 5 #define SubPacket_dest_tag 9 @@ -517,7 +518,7 @@ X(a, STATIC, ONEOF, MESSAGE, (payload,data,data), 3) \ X(a, STATIC, ONEOF, MESSAGE, (payload,user,user), 4) \ X(a, STATIC, ONEOF, MESSAGE, (payload,route_request,route_request), 6) \ X(a, STATIC, ONEOF, MESSAGE, (payload,route_reply,route_reply), 7) \ -X(a, STATIC, ONEOF, UENUM, (payload,route_error,route_error), 13) \ +X(a, STATIC, ONEOF, UENUM, (payload,error_reason,error_reason), 13) \ X(a, STATIC, SINGULAR, UINT32, original_id, 2) \ X(a, STATIC, SINGULAR, BOOL, want_response, 5) \ X(a, STATIC, SINGULAR, UINT32, dest, 9) \ diff --git a/src/mesh/generated/portnums.pb.h b/src/mesh/generated/portnums.pb.h index 99df1222..15572ca1 100644 --- a/src/mesh/generated/portnums.pb.h +++ b/src/mesh/generated/portnums.pb.h @@ -19,7 +19,7 @@ typedef enum _PortNum { PortNum_REPLY_APP = 32, PortNum_IP_TUNNEL_APP = 33, PortNum_SERIAL_APP = 64, - PortNum_STORE_REQUEST_APP = 65, + PortNum_STORE_FORWARD_APP = 65, PortNum_PRIVATE_APP = 256, PortNum_ATAK_FORWARDER = 257 } PortNum;