From patchwork Wed Dec 3 13:50:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 41841 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3E42725E88 for ; Wed, 3 Dec 2014 13:51:10 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id ge10sf6050799lab.8 for ; Wed, 03 Dec 2014 05:51:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=/gVvGzHJ5BEVdveMzE9fSggrmbESCtm1fBzB0XvqF5U=; b=k6+bLWBFHY1U9Lq/BluOiglVacl1Z0OUH2FwKIL/v9qgOUhbKuPAkcf+dZ5VZAx0zb KFv3kMt3cvnyakdF2YZYecG2uUkj1JqkGSsYvgp59YjhRPS6yfFPsuUTRJmSHNYlVgJZ mddTsszFOxkLLS6XJSkWigVBSd4ASzASdrGX4BoxyppyRZdwQDgNXEGgOdGfQFBEZHH2 kx2v29e+/pv7WWHhPRd72kublPiWxHXrIfwPVy0EBd+eFDyqLFa4mmjGAwsL32wd1JrI GU4NN9JcjqQTr51Ql5je9lkAw6ygTSgl9trzKnCKHmxvZyL8M9tB4kGpPnDxP4bkekna eODw== X-Gm-Message-State: ALoCoQmHkp2IlA+8zQG4kxfE1w4c+Xnd3c+0315AfJNlnGSJp6w8uqRh2nUXtBn8tRxsS7mye7Qa X-Received: by 10.112.53.39 with SMTP id y7mr1103971lbo.8.1417614669177; Wed, 03 Dec 2014 05:51:09 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.37 with SMTP id g5ls153945lah.102.gmail; Wed, 03 Dec 2014 05:51:08 -0800 (PST) X-Received: by 10.112.101.100 with SMTP id ff4mr4313812lbb.94.1417614668941; Wed, 03 Dec 2014 05:51:08 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id g5si23147146lbd.20.2014.12.03.05.51.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 05:51:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id s18so12319602lam.7 for ; Wed, 03 Dec 2014 05:51:08 -0800 (PST) X-Received: by 10.152.3.67 with SMTP id a3mr4421884laa.56.1417614668825; Wed, 03 Dec 2014 05:51:08 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp667174lbc; Wed, 3 Dec 2014 05:51:08 -0800 (PST) X-Received: by 10.170.207.5 with SMTP id y5mr6723779yke.28.1417614667020; Wed, 03 Dec 2014 05:51:07 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id n4si27929931qas.57.2014.12.03.05.51.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Dec 2014 05:51:07 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XwAKd-0001kI-Rc; Wed, 03 Dec 2014 13:51:03 +0000 Received: from mail-yh0-f49.google.com ([209.85.213.49]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XwAKX-0001kC-0G for lng-odp@lists.linaro.org; Wed, 03 Dec 2014 13:50:57 +0000 Received: by mail-yh0-f49.google.com with SMTP id f10so7085704yha.22 for ; Wed, 03 Dec 2014 05:50:51 -0800 (PST) X-Received: by 10.236.4.231 with SMTP id 67mr5746362yhj.98.1417614651742; Wed, 03 Dec 2014 05:50:51 -0800 (PST) Received: from bala-PowerEdge-T110-II.caveonetworks.com ([111.93.218.67]) by mx.google.com with ESMTPSA id f19sm741565yhp.50.2014.12.03.05.50.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Dec 2014 05:50:51 -0800 (PST) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Wed, 3 Dec 2014 19:20:02 +0530 Message-Id: <1417614603-938-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Topics: patch Subject: [lng-odp] [PATCH v4 1/2] helper: odph_tcp header description X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bala.manoharan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This patch adds TCP header description structure odph_tcp.h Signed-off-by: Balasubramanian Manoharan Reviewed-by: Bill Fischofer --- helper/include/odph_tcp.h | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 helper/include/odph_tcp.h diff --git a/helper/include/odph_tcp.h b/helper/include/odph_tcp.h new file mode 100644 index 0000000..429beed --- /dev/null +++ b/helper/include/odph_tcp.h @@ -0,0 +1,58 @@ +/* Copyright (c) 2014, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP TCP header + */ + +#ifndef ODPH_TCP_H_ +#define ODPH_TCP_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +/** TCP header */ +typedef struct ODP_PACKED { + uint16be_t src_port; /**< Source port */ + uint16be_t dst_port; /**< Destinatino port */ + uint32be_t seq_no; /**< Sequence number */ + uint32be_t ack_no; /**< Acknowledgment number */ + union { + uint32be_t flags_and_window; + struct { + uint32be_t rsvd1:8; + uint32be_t flags:8; /**< TCP flags as a byte */ + uint32be_t rsvd2:16; + }; + struct { + uint32be_t hl:4; /**< Hdr len, in words */ + uint32be_t rsvd3:6; /**< Reserved */ + uint32be_t urg:1; /**< ACK */ + uint32be_t ack:1; + uint32be_t psh:1; + uint32be_t rst:1; + uint32be_t syn:1; + uint32be_t fin:1; + uint32be_t window:16; /**< Window size */ + }; + }; + uint16be_t cksm; /**< Checksum */ + uint16be_t urgptr; /**< Urgent pointer */ +} odph_tcphdr_t; + +#ifdef __cplusplus +} +#endif + +#endif