diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2016-01-22 01:35:58 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2016-02-18 13:07:56 +0800 |
commit | dba6e9a935dc6728f1f29af103dab3dbcb695167 (patch) | |
tree | 3a82c53428f7894156193ff24db95a1d3d636b7a /MdeModulePkg/Include | |
parent | 6cc7ada465a7c5a6dab6e32abd5a4b6f1734c1d0 (diff) | |
download | edk2-platforms-dba6e9a935dc6728f1f29af103dab3dbcb695167.tar.xz |
MdeModulePkg: Define a general function to create DNS QName
This patch is used to define a general function to create
DNS QName.
QName is a domain name represented as a sequence
of labels, where each label consists of a length octet
followed by that number of octets. The domain name terminates
with the zero length octet for the null label of the root.
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Diffstat (limited to 'MdeModulePkg/Include')
-rw-r--r-- | MdeModulePkg/Include/Library/NetLib.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/Library/NetLib.h b/MdeModulePkg/Include/Library/NetLib.h index e4456fa6c2..b871a857f9 100644 --- a/MdeModulePkg/Include/Library/NetLib.h +++ b/MdeModulePkg/Include/Library/NetLib.h @@ -37,6 +37,8 @@ typedef UINT16 TCP_PORTNO; #define EFI_IP_PROTO_ICMP 0x01
#define IP4_PROTO_IGMP 0x02
#define IP6_ICMP 58
+#define DNS_MAX_NAME_SIZE 255
+#define DNS_MAX_MESSAGE_SIZE 512
//
// The address classification
@@ -2156,4 +2158,24 @@ NetLibGetSystemGuid ( OUT EFI_GUID *SystemGuid
);
+/**
+ Create Dns QName according the queried domain name.
+ QName is a domain name represented as a sequence of labels,
+ where each label consists of a length octet followed by that
+ number of octets. The QName terminates with the zero
+ length octet for the null label of the root. Caller should
+ take responsibility to free the buffer in returned pointer.
+
+ @param DomainName The pointer to the queried domain name string.
+
+ @retval NULL Failed to fill QName.
+ @return QName filled successfully.
+
+**/
+CHAR8 *
+EFIAPI
+NetLibCreateDnsQName (
+ IN CHAR16 *DomainName
+ );
+
#endif
|