search for: ntohl

Displaying 20 results from an estimated 165 matches for "ntohl".

Did you mean: ntohs
2009 Nov 26
1
[PATCH] daemon/Win32: provide htonl, htons, ntohl, ntohs functions.
...inGW http://www.annexia.org/fedora_mingw -------------- next part -------------- >From c47bf70af3222dabd8f966c15f2cc11787f25b86 Mon Sep 17 00:00:00 2001 From: Richard Jones <rjones at redhat.com> Date: Thu, 26 Nov 2009 11:26:40 +0000 Subject: [PATCH 2/2] daemon/Win32: provide htonl, htons, ntohl, ntohs functions. These functions are not available on Windows. --- daemon/.gitignore | 1 + daemon/Makefile.am | 1 + daemon/configure.ac | 4 ++ daemon/htonl.c | 82 +++++++++++++++++++++++++++++++++++++++++++++ daemon/m4/gnulib-cache.m4 | 3 +- 5 f...
2012 Feb 04
2
Moving CPP hackery
...Good one. Thanks. > Also, wsock32 usage is deprecated, on Win7, wsock32 forwards everything > to ws2_32, suggest changing to -lwsock32 to -lws2_32 in configure.ac. > Additionally, using -lwsock32 on Cygwin is wrong. Fix in config.txt. For that I think I'd prefer to purge all use of ntohl. Will make that a high priority. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
2015 Apr 08
1
syslinux.efi with QEMU/OVMF
...CP_SYN ) || tcp->timestamps ) { > tsopt = iob_push ( iobuf, sizeof ( *tsopt ) ); > memset ( tsopt->nop, TCP_OPTION_NOP, sizeof ( tsopt->nop ) ); > tsopt->tsopt.kind = TCP_OPTION_TS; > tsopt->tsopt.length = sizeof ( tsopt->tsopt ); > tsopt->tsopt.tsval = ntohl ( currticks() ); > tsopt->tsopt.tsecr = ntohl ( tcp->ts_recent ); > } > > (When opening the connection, the TCP_SYN flag is set (from tcp_open() I > guess?).) > > So, the two builds use different TCP stacks on the client side. OK, so I've changed the test with BIO...
2006 Jun 20
1
ipp2p
Hello, I''m trying to use iptables rules to prioritize p2p trafic. I use ipp2p-0.8 but it give me errors : Ipt-ipp2p : unknow symbol ntohl Ipt-ipp2p : unknow symbol ntohs When i compiled ipp2p it gave me warnings : "ntohs" …/ipt-ipp2p.ko undefined "ntohl" …/ipt-ipp2p.ko undefined Any suggestion ? gege ___________________________________________________________________________ Yahoo! Mail réinvente le...
2013 Oct 16
1
[Hivex] [PATCH] lib: Promote byte_conversions.h #include to hivex-internal.h
...But hivex-internal.h doesn't include the safety definition. OS X demonstrates this a problem. Neither endian.h nor byteswap.h are found with `configure` in OS X 10.8.5 (XCode 5), but the headers are both found in Fedora 19 and Ubuntu 13.04. This patch to configure.ac further logs that only ntohl is available for byte swaps: @@ -153,6 +153,8 @@ AC_REPLACE_FUNCS([mmap]) dnl Functions. AC_CHECK_FUNCS([bindtextdomain]) +AC_CHECK_FUNCS([le32toh ntohl bswap_32 __bswap_32]) + (As an aside, it's curious that a missing byteswap.h didn't cause hivex-internal.h to fai...
2007 Feb 03
3
need help with MSVC
for recent code changes I find myself needing some workarounds for MSVC6: 1st, I need a fast way to swap bytes (for endianness) of a 32-bit int. I could not find a builtin like bswap; the closest thing I found was ntohl() which appears to be a function call and also requires linking with winsock2 (ws2_32.lib) to get it. 2nd, I need an equivalent for lround() (or round() is ok), which is not in MSVC6's math.h or anywhere else I could find. TIA, Josh _______________________________________________________...
2012 Feb 04
0
flac-dev Digest, Vol 87, Issue 10
...; > Also, wsock32 usage is deprecated, on Win7, wsock32 forwards everything > > to ws2_32, suggest changing to -lwsock32 to -lws2_32 in configure.ac. > > Additionally, using -lwsock32 on Cygwin is wrong. Fix in config.txt. > > For that I think I'd prefer to purge all use of ntohl. Will make that > a high priority. > > Erik > -- > ---------------------------------------------------------------------- > Erik de Castro Lopo > http://www.mega-nerd.com/ > > > ------------------------------ > > Message: 3 > Date: Sat, 4 Feb 2012 21:49:26 +11...
2017 Jul 02
13
[Bug 2735] New: Wrong address family handling for tun devices
...F and SSH_TUN_PREPEND_AF defined), the client sends tunneled packets with the (fallback) v4 family. In sys_tun_infilter(), the AF is not always converted to network byte order. Please see the first attached patch. In sys_tun_outfilter(), the af pointer is assigned from the integer return value of ntohl() and then later dereferenced. Please see the second patch for a proposed fix. I have/could not test this second patch as I do not have a platform with SSH_TUN_COMPAT_AF, but not SSH_TUN_PREPEND_AF (at least not that I know). Have a nice day, Peter PS: Thank you for developing and maintaining Ope...
2007 Jan 08
2
Re: [nut-commits] svn commit r714 - in trunk: . server
...*)ip6)[3] & (u_int32_t)prefix) == net->s_addr)); Comparing this with line 38: return((((struct sockaddr_in*)ip_addr)->sin_addr.s_addr & htonl(prefix)) == ((struct sockaddr_in*)net_addr)->sin_addr.s_addr); I wonder if it shouldn't be htonl(prefix) in line 61, or perhaps ntohl(net->s_addr) in line 61. I don't understand these data structures well, and presumably the patch came from someone who tested it on a little-endian machine, but it seems to me from inet(3) that: *.s_addr is in network byte order, ((const u_int32_t *)ip6)[3] is...
2015 Apr 07
3
syslinux.efi with QEMU/OVMF
Hello, I'm trying to find out how to pxe boot with syslinux.efi on QEMU with OVMF. After getting through the initial hurdle caused by the iPXE based option ROM included with QEMU having a problem as described in these threads: http://www.syslinux.org/archives/2014-November/022804.html http://sourceforge.net/p/edk2/mailman/message/33236100/ I'm now getting further to almost being able
2012 Oct 15
1
[PATCH for discussion] lib: update inspect_list_applications to return app_arch
Here's a partially implemented fix for RHBZ#859949. Seeing as this is my first libguestfs patch, I'd like some other eyeballs on it to make sure I've not done anything completely crazy. If the rpm case looks ok, I'll update the deb and windows cases if/where applicable.
2011 Jan 07
1
[LLVMdev] [PATCH] compiler-rt patch for clean build on Solaris 10 / x86
..._t htons(uint16_t); ^ /usr/include/sys/byteorder.h:70:23: error: a parameter list without types is only allowed in a function definition extern uint16_t htons(uint16_t); ^ /usr/include/sys/byteorder.h:71:9: error: unknown type name 'uint32_t' extern uint32_t ntohl(uint32_t); ^ /usr/include/sys/byteorder.h:71:24: error: a parameter list without types is only allowed in a function definition extern uint32_t ntohl(uint32_t); ^ /usr/include/sys/byteorder.h:72:8: error: unknown type name 'uint16_t' extern uint16_t ntohs(ui...
2012 Feb 05
2
[PATCH 2/2] OS/2 EMX natively uses AOUT so pass -f aout to NASM
Dave Yeo wrote: > --- > configure.ac | 1 + Both applied (first with a minor tweak). Thanks. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
2012 Feb 05
1
[PATCH 2/2] OS/2 EMX natively uses AOUT so pass -f aout to NASM
...gure.ac | 1 + > > > > Both applied (first with a minor tweak). Thanks. > > > > Erik > > Unfortunately, this steps on my patch. Updated patch attached. Cygwin > really shouldn't be calling win32 API. > > On the otherhand, I can't seem to find any ntohl use(???). Yeah, I've got a patch in an un-merged branch that purges MINGW_WINSOCK_LIBS and reduces the LT_NO_UNDEFINED section to: case "$host" in *-*-cygwin|*mingw*|*emx*) # define this variable for enabling strict exports with # libtool; for now, it's su...
2000 Oct 12
1
openssh on solaris x86
Hi, we're using SSH-1.5-OpenSSH-1.2.2 and SSH-1.5-OpenSSH-2.2.0p1 on solaris for x86 (Solaris 2.8). Both Versions seem to have a problem in forwarding ports that may concern htonl/ntohl: SSH Version OpenSSH_2.2.0p1, protocol versions 1.5/2.0. Compiled with SSL (0x0090600f). debug: Seeding random number generator debug: ssh_connect: getuid 0 geteuid 0 anon 1 debug: Connecting to 6.0.1.1 [6.0.1.1] port 22. debug: Connection established. debug: Remote protocol version 1.5, remote so...
2003 May 26
0
ip_input.c
Hi, secfolks. While reading ip_input.c I have met following lines: ;------------------------------------------------- /* 127/8 must not appear on wire - RFC1122 */ if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { if ((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0) { ipstat.ips_badaddr++; got...
2004 Sep 23
3
iproute2 tool compiling problems.
...t_make_mask'': /usr/src/linux/include/linux/inetdevice.h:173: warning: implicit declaration of function `htonl'' /usr/src/linux/include/linux/inetdevice.h: In function `inet_mask_len'': /usr/src/linux/include/linux/inetdevice.h:179: warning: implicit declaration of function `ntohl'' make[1]: *** [utils.o] Error 1 make[1]: Leaving directory `/home/nathan/iproute2/lib'' make: *** [all] Error 2 Do you know what that means? I tried to change the kernel_include path in the Makefile without success. Thanks, Nathan Levy. ___________________________...
2012 Apr 25
1
forwarding packets to service in same host without using loopback network
...c u_int32_t print_pkt (struct nfq_data *tb) { int id = 0; struct nfqnl_msg_packet_hdr *ph; struct nfqnl_msg_packet_hw *hwph; u_int32_t mark, ifi; int ret; unsigned char *data; ph = nfq_get_msg_packet_hdr (tb); if (ph) { id = ntohl (ph->packet_id); printf ("hw_protocol=0x%04x hook=%u id=%u ", ntohs (ph->hw_protocol), ph->hook, id); } hwph = nfq_get_packet_hw (tb); if (hwph) { int i, hlen = ntohs (hwph->hw_addrlen); printf ("hw_sr...
2002 Apr 06
1
Compilation problem and solution on Solaris 2.7
...ude <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netinet/in.h> unsigned long int inet_addr(const char *cp) { struct in_addr inp; if (inet_aton(cp,&inp) == 0) { return -1; } else { return ntohl((unsigned long int)inp.s_addr); } } Copy this code in a new file named 'inet_addr.c' in the 'lib' directory, add 'lib/inet_ntop.o lib/inet_pton.o lib/inet_addr.o' in the 'LIBOBJ=' line of the Makefile, and everything will be OK. Hope this helps, -- |---...
2015 Apr 07
0
syslinux.efi with QEMU/OVMF
...c: if ( ( flags & TCP_SYN ) || tcp->timestamps ) { tsopt = iob_push ( iobuf, sizeof ( *tsopt ) ); memset ( tsopt->nop, TCP_OPTION_NOP, sizeof ( tsopt->nop ) ); tsopt->tsopt.kind = TCP_OPTION_TS; tsopt->tsopt.length = sizeof ( tsopt->tsopt ); tsopt->tsopt.tsval = ntohl ( currticks() ); tsopt->tsopt.tsecr = ntohl ( tcp->ts_recent ); } (When opening the connection, the TCP_SYN flag is set (from tcp_open() I guess?).) So, the two builds use different TCP stacks on the client side. (Obviously I have no clue, but this is what I could gather in five minutes...