Phonet: fix flawed "SYN/ACK" logic
[linux-3.10.git] / include / net / phonet / pep.h
index 4d79564..38eed1b 100644 (file)
@@ -35,14 +35,16 @@ struct pep_sock {
        struct sock             *listener;
        struct sk_buff_head     ctrlreq_queue;
 #define PNPIPE_CTRLREQ_MAX     10
+       atomic_t                tx_credits;
+       int                     ifindex;
        u16                     peer_type;      /* peer type/subtype */
        u8                      pipe_handle;
 
        u8                      rx_credits;
-       u8                      tx_credits;
        u8                      rx_fc;  /* RX flow control */
        u8                      tx_fc;  /* TX flow control */
        u8                      init_enable;    /* auto-enable at creation */
+       u8                      aligned;
 };
 
 static inline struct pep_sock *pep_sk(struct sock *sk)
@@ -75,7 +77,13 @@ static inline struct pnpipehdr *pnp_hdr(struct sk_buff *skb)
 #define MAX_PNPIPE_HEADER (MAX_PHONET_HEADER + 4)
 
 enum {
+       PNS_PIPE_CREATE_REQ = 0x00,
+       PNS_PIPE_CREATE_RESP,
+       PNS_PIPE_REMOVE_REQ,
+       PNS_PIPE_REMOVE_RESP,
+
        PNS_PIPE_DATA = 0x20,
+       PNS_PIPE_ALIGNED_DATA,
 
        PNS_PEP_CONNECT_REQ = 0x40,
        PNS_PEP_CONNECT_RESP,
@@ -137,6 +145,7 @@ enum {
        PN_PIPE_SB_NEGOTIATED_FC,
        PN_PIPE_SB_REQUIRED_FC_TX,
        PN_PIPE_SB_PREFERRED_FC_RX,
+       PN_PIPE_SB_ALIGNED_DATA,
 };
 
 /* Phonet pipe flow control models */
@@ -145,6 +154,7 @@ enum {
        PN_LEGACY_FLOW_CONTROL,
        PN_ONE_CREDIT_FLOW_CONTROL,
        PN_MULTI_CREDIT_FLOW_CONTROL,
+       PN_MAX_FLOW_CONTROL,
 };
 
 #define pn_flow_safe(fc) ((fc) >> 1)