Configure a range of ports to "socket" system call
Hello ;
This what i want to do :
I know that in the system call
you can specify the local port for your socket, but im using a private library , and im sure that in that library they call bind with port "0" (so operative system return a random port between dynamic defined ports) ; i know cause the port assigned is always different.
I need that the system's call " bind (to bind a socket id to a local port) taking a port number that i can configure before call it.
i've been analysing the file "/etc/services" , there i can see numbers of differents ports associated to a System Service or Common accepted services. Always one port , not a range.
Can i define a range of ports (pool) to the call "bind -with 0-" to take a number from this pool??? If so, is this in relation with "/etc/services"
Thx everybody.
---------- Post updated at 03:54 PM ---------- Previous update was at 12:24 PM ----------
Like ever.....i always finished responding my own questions....
Cannot present unpresented disks back again. On a test server tried this as a solution "multipath -r" and it worked. Too worried to try it in production before I know all the information.
Any info would be appreciated!
Also some links to the documentation on this specific issue could help a... (1 Reply)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hello experts!
I need your help please
I have a file.txt of which I want to extract 3rd and 4th columns with date with the form e.g.:
2016-11-25 03:14:50and pass them to "date" command, but also append the 9th column in a file as well.
So I want to execute
date -d '2016-11-25 03:14:50' ... (2 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I'm trying to add a custom ("Hello world" :o) system call.
In /usr/src/linux/hello/ I put simple hello.c ...#include "linux/linkage.h" // for linking a system call
#include "linux/kernel.h" // for "printk"
asmlinkage int sys_hello()
{
printk(KERN_ALERT "Hello!");
return 1;
}... and in... (5 Replies)
been a while so i'm a bit rusty and need a little help. writing a script that needs to compare $EXECHOST(a number) against a numerical range and then set a value. below isn't working but should give you folks an idea of my goal:
if ; then
echo "This is a 32B machine, exiting..."
if ;... (4 Replies)
Hi,
I am having an issue with using sockets.
I have a program which binds to a socket and listen on it. Later I spawn a thread to handle some function. In the new thread created I need to call a shell script which executes the specified function. Here I am using a system command to call the... (5 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)