Sponsored Content
Special Forums IP Networking Cat /proc/sys/net/ipv4/ip_local_port_range Post 302925015 by Corona688 on Thursday 13th of November 2014 01:58:15 PM
Old 11-13-2014
They're symmetric, so it doesn't matter. Whether you're converting to or from the network, the bytes get rearranged the exact same way.

Not all systems need to swap bytes at all; big-endian machines already keep their bytes in the proper order. On these machines, ntohs(), etc. do nothing at all.
This User Gave Thanks to Corona688 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cat /proc/ files

Hi, I need to write a shell script that should lists only the files that starts with alphabet from the /proc dir and then I have to cat those files and redirect to a file. But my below script is not working. It is reading the first file properly but not the subsequent files. Please throw a... (2 Replies)
Discussion started by: royalibrahim
2 Replies

2. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

Hi Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX? Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies

3. Shell Programming and Scripting

Parsing /proc/net/dev into key:value pairs (self-answered)

Hi all, I need some help with using sed/awk/other linux tools to meet the following goal: I'm trying to take the output of /proc/net/dev: Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes ... (0 Replies)
Discussion started by: felbane
0 Replies

4. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

Hello, So I sorted my file as I was supposed to: sort -n -r -k 2 -k 1 file1 | uniq > file2 and when I wrote > cat file2 in the command line, I got what I was expecting, but in the script itself ... sort -n -r -k 2 -k 1 averages | uniq > temp cat file2 It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies

5. Linux

Kernal panic error& setuproot:error mounting /proc&/sys

Hi all, I am new to redhat/fedora linux. In fedora linux 6,we created one file system(hda3 - /fs). in this mount poing we were installed mounta vista os. while booting we are getting below error messages. 1) Booting 'mountaVisat(2.6.18_pro 500_pc_target-x86_586 smp)' root(hd0,1)... (2 Replies)
Discussion started by: arjunreddy3
2 Replies

6. UNIX for Dummies Questions & Answers

_/proc/stat vs /proc/uptime

Hi, I am trying to calculate the CPU Usage by getting the difference between the idle time reported by /proc/stat at 2 different intervals. Now the 4th entry in the first line of /proc/stat will give me the 'idle time'. But I also came across /proc/uptime that gives me 2 entries : 1st one as the... (0 Replies)
Discussion started by: coderd
0 Replies

7. UNIX for Advanced & Expert Users

echo 1 > /proc/sys/vm/drop_caches a good idea?

Hi folks. I work with several production servers, and I have seen in some Kernel Cache using most of the memory. See this pic: http://i51.tinypic.com/301nb6c.jpg Do you think this is a smart choice? Remember these are productions servers and it is extremely necesary this does not... (6 Replies)
Discussion started by: erick_tuk
6 Replies

8. Red Hat

Disable IPV4

Hi im using Redhat Ver 6.4 is it possible to disable IPV4 and use only IPV6? how can i do that? thanks Guy (2 Replies)
Discussion started by: guy3145
2 Replies

9. Programming

Interactive Python 3.5+ sys.stdout.write() AND sys.stderr.write() bug?

(Apologies for any typos.) OSX 10.12.3 AND Windows 10. This is for the serious Python experts on at least 3.5.x and above... In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly. Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies
BYTEORDER(3)						   BSD Library Functions Manual 					      BYTEORDER(3)

NAME
htonl, htons, ntohl, ntohs -- convert values between host and network byte order LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <arpa/inet.h> uint32_t htonl(uint32_t host32); uint16_t htons(uint16_t host16); uint32_t ntohl(uint32_t net32); uint16_t ntohs(uint16_t net16); DESCRIPTION
These routines convert 16 and 32 bit quantities between network byte order and host byte order. On machines which have a byte order which is the same as the network order, these routines are defined as macros that expand to the value of their argument. These routines are most often used in conjunction with Internet addresses and ports as returned by gethostbyname(3) and getservent(3). SEE ALSO
bswap(3), gethostbyname(3), getservent(3) STANDARDS
The described functions conform to IEEE Std 1003.1-2001 (``POSIX.1''). HISTORY
The byteorder functions appeared in 4.2BSD. BUGS
The `l' and `s' suffixes in the names are not meaningful in machines where long integers are not 32 bits. BSD
May 3, 2011 BSD
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy