aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-04-04 23:08:23 -0700
committerFlorin Coras <fcoras@cisco.com>2017-04-13 18:35:50 -0700
commit6cf30adc2cd3aa818e5d97cf71ea8b2fc2aaefa7 (patch)
tree3c4afef26295500b243f3655d96071565c2d2464 /src/vnet/session/transport.h
parent0f7d2ff58a63fdc671c1c0954ffe7c6ff0501daa (diff)
Session layer refactoring
Major refactoring of the session layer api - Add attatch api for application binding to the the session layer - Simplify listen/connect calls - Update application CLI - Add transport endpoint to accept callback - Associate segment manager to application and allow for multiple binds/connects per app Additional: - svm fifo cleanup - add fifo free, format fns - add fifo offset enqueue unit test Change-Id: Id93a65047de61afc2bf3d58c9b544339c02065af Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/session/transport.h')
-rw-r--r--src/vnet/session/transport.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h
index 2f912cbc987..7ea7af1589b 100644
--- a/src/vnet/session/transport.h
+++ b/src/vnet/session/transport.h
@@ -30,7 +30,7 @@ typedef struct _transport_connection
ip46_address_t lcl_ip; /**< Local IP */
u16 lcl_port; /**< Local port */
u16 rmt_port; /**< Remote port */
- u8 proto; /**< Transport protocol id */
+ u8 proto; /**< Transport protocol id (also session type) */
u32 s_index; /**< Parent session index */
u32 c_index; /**< Connection index in transport pool */
@@ -103,7 +103,8 @@ typedef CLIB_PACKED (struct {
{
struct
{
- ip4_address_t src; ip4_address_t dst;
+ ip4_address_t src;
+ ip4_address_t dst;
u16 src_port;
u16 dst_port;
/* align by making this 4 octets even though its a 1-bit field
@@ -122,10 +123,14 @@ typedef CLIB_PACKED (struct {
struct
{
/* 48 octets */
- ip6_address_t src; ip6_address_t dst;
+ ip6_address_t src;
+ ip6_address_t dst;
u16 src_port;
- u16 dst_port; u32 proto; u8 unused_for_now[8];
- }; u64 as_u64[6];
+ u16 dst_port;
+ u32 proto;
+ u8 unused_for_now[8];
+ };
+ u64 as_u64[6];
};
}) v6_connection_key_t;
/* *INDENT-ON* */
@@ -233,10 +238,10 @@ make_v6_ss_kv_from_tc (session_kv6_t * kv, transport_connection_t * t)
typedef struct _transport_endpoint
{
- ip46_address_t ip;
- u16 port;
- u8 is_ip4;
- u32 vrf;
+ ip46_address_t ip; /** ip address */
+ u16 port; /** port in host order */
+ u8 is_ip4; /** 1 if ip4 */
+ u32 vrf; /** fib table the endpoint is associated with */
} transport_endpoint_t;
typedef clib_bihash_24_8_t transport_endpoint_table_t;