media gateway control protocol

Network Internals


switch (mi->mgcp_type) {

case MGCP_REQUEST:
if(mi->is_duplicate){
/* Duplicate is ignored */
ms->req_dup_num++;
}
else {
ms->open_req_num++;
}
break;

Actions to be taken for MGCP commands.
If “mi->is_duplicate” is a non-zero value,
then the packet is ignored, otherwise a ty-
pical value is incremented to count of a
newer request.
Above Explanation May Not Be Accurate.
GNU Free Documentation License.
The Media Gateway Control Protocol is an
architecture for controlling media gateways
on Internet Protocol (IP) networks and the p-
ublic switched telephone network (PSTN).
A Media gateway is a translation device or
service that converts digital media streams
between disparate telecommunications net-
works such as PSTN, SS7, Next Generation
Networks (2G, 2.5G and 3G radio access ne-
tworks) or PBX.
Reference/Source :
http://en.wikipedia.org/wiki/Media_Gateway_Control_Protocol
http://en.wikipedia.org/wiki/Media_gateway

www.ivarch.com/programs/pv.shtml


if (opts->argc size = sb.st_size;
return;
}
stat, fstat, lstat - get file status
stat() stats the file pointed to by path and fills in buf.
fstat() is identical to stat(), except that the file to be
stat-ed is specified by the file descriptor fd.
Reference/Source :
Linux Programmer's Manual.

pv (Pipe Viewer) can be inserted into any normal
pipeline between two processes to give a visual
indication of how quickly data is passing through,
how long it has taken, how near to completion it
is, and an estimate of how long it will be until
completion.
Reference/Source:
Debian APT

kern.log part 1



$cut -d ' ' -f6-20 /var/log/kern.log
[22293.016178] kjournald starting. Commit interval 5 seconds
[22293.016218] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
[22293.016635] EXT3 FS on sdb2, internal journal
[22293.016647] EXT3-fs: mounted filesystem with ordered data mode.
$

The First field shown above is a timestamp.
The kernel ring buffer is not really a log file per se,
but rather an area in the running kernel you can
query for kernel bootup messages via the dmesg utility

Reference/Source :
https://help.ubuntu.com/community/LinuxLogFiles

Related Reading :
http://www.linuxjournal.com/article/6060

mkfifo command.



$ls -l jeffrin
ls: cannot access jeffrin: No such file or directory
$mkfifo jeffrin
$ls -l jeffrin
prw-r--r-- 1 jeffrin jeffrin 0 Oct 12 00:02 jeffrin
$
$ls -d > jeffrin

"another terminal"
$cat < jeffrin
.
$

A “FIFO” is a special file type that permits independent processes
to communicate. One process opens the FIFO file for writing, and
another for reading, after which data can flow as with the usual
anonymous pipe in shells or elsewhere.
Reference/Source :
Debian coreutils documentation using “info command”.
For further reading :
http://www.linuxjournal.com/article/2156

base64 encoding



$file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
$base64 a.out > ascii.txt
$tail -n 5 -f ascii.txt
X19lcnJub19sb2NhdGlvbkBAR0xJQkNfMi4yLjUAX19ic3Nfc3RhcnQAX19nY292X3dyaXRlX3N1
bW1hcnkAX19nY292X3JlYWRfY291bnRlcgBzdHJjcHlAQEdMSUJDXzIuMi41AF9lbmQAZmNsb3Nl
QEBHTElCQ18yLjIuNQBzdGRlcnJAQEdMSUJDXzIuMi41AGFjY2Vzc0BAR0xJQkNfMi4yLjUAZndy
aXRlQEBHTElCQ18yLjIuNQBfZWRhdGEAZnByaW50ZkBAR0xJQkNfMi4yLjUAZmNudGxAQEdMSUJD
XzIuMi41AG9wZW5AQEdMSUJDXzIuMi41AG1rZGlyQEBHTElCQ18yLjIuNQBtYWluAF9pbml0AA==
^C
$tail -n 5 -f a.out
@
@
@.
@>
@N
@^
@n

That was a peice from a.out may be not exactly 5 lines.

Base64 is a group of similar encoding schemes that represent binary
data in an ASCII string format by translating it into a radix-64
representation. The Base64 term originates from a specific MIME
content transfer encoding.
Reference/Source :
http://en.wikipedia.org/wiki/Base64

a simple hack related to xargs

$ls robinsons.iso
$ls | grep robinsons.iso | xargs rm
$ls robinsons.iso
ls: cannot access robinsons.iso: No such file or directory
$

xargs - build and execute command lines from standard input
This  manual  page  documents  the  GNU  version of xargs.  
xargs reads items from the standard input, delimited by blanks 
(which can be protected with double or single quotes or a backslash)
or newlines, and executes the command (default is /bin/echo) one or 
more times with any initial-arguments followed by items  read  
from  standard input.  Blank lines on the standard input are 
ignored. Because  Unix   filenames  can contain blanks and newlines,
this default behaviour is often  problematic; filenames containing 
blanks and/or newlines are incorrectly processed by xargs. In these
situations it is better to use the -0 option, which prevents such
problems. When using this option you will need to ensure that the 
program which produces the input for xargs also uses a null character
as a separator.  If that program is GNU find for example, the -print0
option does this for you.

Reference/Source :
Debian manual page for "xargs".

[x]args build and execute +

$ls robinsons.iso
robinsons.iso
$ls | grep robinsons.iso | xargs rm
$ls robinsons.iso
ls: cannot access robinsons.iso: No such file or directory
$

xargs – build and execute command lines from standard input
This manual page documents the GNU version of xargs. xargs reads items
from the standard input, delimited by blanks (which can be protected with double or single
quotes or a backslash) or newlines, and executes the command (default is /bin/echo)
one or more times with any initial-arguments followed by items read from standard
input. Blank lines on the standard input are ignored.
Because Unix filenames can contain blanks and newlines, this default behaviour is often
problematic; filenames containing blanks and/or newlines are incorrectly processed by xargs.
In these situations it is better to use the -0 option, which prevents such problems.
When using this option you will need to ensure that the program which produces the input
for xargs also uses a null character as a separator. If that program is GNU find for example,
the -print0 option does this for you.
Reference/Source :
Debian manual page for “xargs”.

system engineering

Software engineering occurs as a consequence of a process
called system engineering.Instead of concentrating solely on
software, system engineering focus on a variety of elements,
analyzing,designing and organizing those elements into a system
that can be a product,a service or a technology for the transformation
of information and control.
The system engineering process is called business process
engineering when the context of the engineering work focuses
on a business enterprise.When a product(In this context,
a product includes every thing from a wireless telephone to
an air traffic control system) is to be built,the process is called
product engineering.
Reference/Source:
Software Engineering. A Practitioner’s Approach.
Fifth Edition. Roger S. Pressman, Ph.D.

microscopic organisms



Many of the microscopic organisms that swarm and multiply in our ponds
are clearly visible with an ordinary school microscope. A closer look at
microscopic organisms may challenge existing ideas about the
differences between plants and animals and reinforce key ideas about
the importance of each in ecosystems.

Reference/source :
http://www.practicalbiology.org/areas/introductory/cells-to-
systems/microscopic-organisms/


$nospace workethics.txt
Remove whitespace from an ASCII text file
ASCII text output file [workethics.nospace]:
$diff workethics.txt workethics.nospace
1,4c1,4
< Work
< ethics
< in
Work
> ethics
> in
> QA
$
Reference/Source :
nospace is a command from "emboss" software suite.

pinky – lightweight finger



$pinky
Login Name TTY Idle When Where
jeffrin Jeffrin Jose *tty7 00:28 2010-09-27 15:33 :0
jeffrin Jeffrin Jose *pts/0 2010-09-27 15:40 :0.0
jeffrin Jeffrin Jose pts/1 2010-09-27 16:00 :0.0
$pinky jeffrin
Login Name TTY Idle When Where
jeffrin Jeffrin Jose *tty7 00:28 2010-09-27 15:33 :0
jeffrin Jeffrin Jose *pts/0 2010-09-27 15:40 :0.0
jeffrin Jeffrin Jose pts/1 2010-09-27 16:00 :0.0
$pinky -l jeffrin
Login name: jeffrin In real life: Jeffrin Jose
Directory: /home/jeffrin Shell: /bin/bash

$pinky -f jeffrin
jeffrin Jeffrin Jose *tty7 00:29 2010-09-27 15:33 :0
jeffrin Jeffrin Jose *pts/0 2010-09-27 15:40 :0.0
jeffrin Jeffrin Jose pts/1 00:01 2010-09-27 16:00 :0.0
$pinky -w jeffrin
Login TTY Idle When Where
jeffrin *tty7 00:30 2010-09-27 15:33 :0
jeffrin *pts/0 2010-09-27 15:40 :0.0
jeffrin pts/1 00:01 2010-09-27 16:00 :0.0
$
A lightweight `finger' program; print user information.
The utmp file will be /var/run/utmp.

Reference/Source :
Debian manual for "pinky".