From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web12.12195.1626101589776473312 for ; Mon, 12 Jul 2021 07:53:09 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: linux.intel.com, ip: 134.134.136.65, mailfrom: maciej.rabeda@linux.intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10043"; a="210036694" X-IronPort-AV: E=Sophos;i="5.84,234,1620716400"; d="scan'208,217";a="210036694" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 07:53:07 -0700 X-IronPort-AV: E=Sophos;i="5.84,234,1620716400"; d="scan'208,217";a="492156685" Received: from mrabeda-mobl.ger.corp.intel.com (HELO [10.214.206.2]) ([10.214.206.2]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2021 07:53:03 -0700 Subject: Re: [edk2-devel] Using the TCP->Accept interface. To: devel@edk2.groups.io, Ken_Taylor@phoenix.com References: <8dd8572526864a0689d7de693903f0ca@SCL-EXCHMB-13.phoenix.com> From: "Maciej Rabeda" Message-ID: Date: Mon, 12 Jul 2021 16:52:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <8dd8572526864a0689d7de693903f0ca@SCL-EXCHMB-13.phoenix.com> Content-Type: multipart/alternative; boundary="------------A3E0FAB7F1CFDB3A00ACB102" Content-Language: pl --------------A3E0FAB7F1CFDB3A00ACB102 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Hi Ken, When calling Tcp4->Configure(), what is your EFI_TCP4_CONFIG_DATA.AccessPoint.ActiveFlag value? ActiveFlag should be set to FALSE and RemoteAddress set to zero in order to accept connection requests from any address. You should be able to double check the fields above by calling Tcp4->GetModeData() right before Tcp4->Accept() and analyzing Ip4ConfigData result. Thanks, Maciej On 12-Jul-21 09:07, Ken Taylor wrote: > > Hi all, > > I hate to ask this, but has anyone used or tested the standard > NetworkPkg TCP driver’s socket Accept functionality?  I’ve been trying > to listen for a connection, but I can’t seem to figure out how to > configure the TCP interface correctly for this. > > I know the local IP address and listening port, but obviously the > remote IP address and port won’t be defined until a connection is > established.  But if I try to configure one thing without the other, I > get all kinds of EFI_INVALID_PARAMETER errors.  And if I don’t specify > anything but the listening port, I nothing seems able to connect. > > Regards, > > -Ken. > > --------------A3E0FAB7F1CFDB3A00ACB102 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit Hi Ken,

When calling Tcp4->Configure(), what is your EFI_TCP4_CONFIG_DATA.AccessPoint.ActiveFlag value?
ActiveFlag should be set to FALSE and RemoteAddress set to zero in order to accept connection requests from any address.

You should be able to double check the fields above by calling Tcp4->GetModeData() right before Tcp4->Accept() and analyzing Ip4ConfigData result.

Thanks,
Maciej

On 12-Jul-21 09:07, Ken Taylor wrote:

Hi all,

 

I hate to ask this, but has anyone used or tested the standard NetworkPkg TCP driver’s socket Accept functionality?  I’ve been trying to listen for a connection, but I can’t seem to figure out how to configure the TCP interface correctly for this.

 

I know the local IP address and listening port, but obviously the remote IP address and port won’t be defined until a connection is established.  But if I try to configure one thing without the other, I get all kinds of EFI_INVALID_PARAMETER errors.  And if I don’t specify anything but the listening port, I nothing seems able to connect.

 

Regards,

-Ken.


--------------A3E0FAB7F1CFDB3A00ACB102--