X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Fapplication_interface.h;h=cc63671bfd33cf732d8aba9dcda67d8b7c0d7219;hb=7e12d949a346d2e69afb7a8029c0099b5f131b25;hp=49c2862ac4521f4df059846bce498ee7f09d38f6;hpb=df434b9037d0c9b1bb105658980aca76dbe6a688;p=vpp.git diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h index 49c2862ac45..cc63671bfd3 100644 --- a/src/vnet/session/application_interface.h +++ b/src/vnet/session/application_interface.h @@ -136,7 +136,7 @@ typedef enum _(ACCEPT_REDIRECT, "Use FIFO with redirects") \ _(ADD_SEGMENT, "Add segment and signal app if needed") \ _(IS_BUILTIN, "Application is builtin") \ - _(IS_PROXY, "Application is proxying") \ + _(IS_PROXY, "Application is proxying") \ _(USE_GLOBAL_SCOPE, "App can use global session scope") \ _(USE_LOCAL_SCOPE, "App can use local session scope") @@ -177,21 +177,26 @@ typedef struct app_session_transport_ { ip46_address_t rmt_ip; /**< remote ip */ ip46_address_t lcl_ip; /**< local ip */ - u16 rmt_port; /**< remote port */ - u16 lcl_port; /**< local port */ + u16 rmt_port; /**< remote port (network order) */ + u16 lcl_port; /**< local port (network order) */ u8 is_ip4; /**< set if uses ip4 networking */ } app_session_transport_t; -typedef struct app_session_ +#define foreach_app_session_field \ + _(svm_fifo_t, *rx_fifo) /**< rx fifo */ \ + _(svm_fifo_t, *tx_fifo) /**< tx fifo */ \ + _(session_type_t, session_type) /**< session type */ \ + _(volatile u8, session_state) /**< session state */ \ + _(u32, session_index) /**< index in owning pool */ \ + _(app_session_transport_t, transport) /**< transport info */ \ + _(svm_queue_t, *vpp_evt_q) /**< vpp event queue */ \ + _(u8, is_dgram) /**< flag for dgram mode */ \ + +typedef struct { - svm_fifo_t *rx_fifo; /**< rx fifo */ - svm_fifo_t *tx_fifo; /**< tx fifo */ - session_type_t session_type; /**< session type */ - volatile u8 session_state; /**< session state */ - u32 session_index; /**< index in owning pool */ - app_session_transport_t transport; /**< transport info */ - svm_queue_t *vpp_evt_q; /**< vpp event queue for session */ - u8 is_dgram; /**< set if it works in dgram mode */ +#define _(type, name) type name; + foreach_app_session_field +#undef _ } app_session_t; always_inline int