]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/BsdSocketLib/ns_netint.c
UefiCpuPkg/MicrocodeUpdateDxe: Fix coding style issues in INF file
[mirror_edk2.git] / StdLib / BsdSocketLib / ns_netint.c
CommitLineData
d7ce7006 1/*\r
2 * Copyright (c) 1996 by Internet Software Consortium.\r
3 *\r
4 * Permission to use, copy, modify, and distribute this software for any\r
5 * purpose with or without fee is hereby granted, provided that the above\r
6 * copyright notice and this permission notice appear in all copies.\r
7 *\r
8 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS\r
9 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES\r
10 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE\r
11 * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL\r
12 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR\r
13 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS\r
14 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\r
15 * SOFTWARE.\r
16 */\r
17\r
d7ce7006 18/* Import. */\r
19\r
20#include <sys/types.h>\r
21#include <sys/socket.h>\r
22\r
23#include <netinet/in.h>\r
24#include <arpa/nameser.h>\r
25\r
26uint16_t\r
27ns_get16(const u_char *src) {\r
28 uint16_t dst;\r
29\r
30 NS_GET16(dst, src);\r
31 return (dst);\r
32}\r
33\r
34uint32_t\r
35ns_get32(const u_char *src) {\r
36 uint32_t dst;\r
37\r
38 NS_GET32(dst, src);\r
39 return (dst);\r
40}\r
41\r
42void\r
43ns_put16(uint16_t src, u_char *dst) {\r
44 NS_PUT16(src, dst);\r
45}\r
46\r
47void\r
48ns_put32(uint32_t src, u_char *dst) {\r
49 NS_PUT32(src, dst);\r
50}\r