Finally, I got some time to write my blog. Since the start of this year (2007), the work load starting to grow more and more. Some time I have to sleep just 4 hours to meet the project dead lines. No doubt, working day & night makes your boss extremely happy but at the same time this is not fair with the family. Anyway, my journey with AMD64 is going great. I learned some exciting things in last 2 months or so. And some cool optimization techniques. Also the kernel module for sniffing packet completed as well. Now stuck in sched_(*)affinity, this is some thing which changed dramatically in past glibc version and now I'm facing problem in implementing the right one.
Song of today's blog
http://www.apniisp.com/hindisongs.php?id=2341
Back in my college days, Packet sniffing on Ethernet LAN
was suppose to be the easiest task in programming, using
socket domain as PF_PACKET. Unfortunately, This old simple
trick is of no use when we are dealing with heavy traffic.
To capture packets in promiscuous mode on
gigabit, Surely, this was impossible to achieve using
lame LPF methods. While googling, I seen some advance
research and implementation done by ntop's Luca Deri. His project PF_RING
for enhancing packet capturing is really good. The good
points about his project is...
1) Implementing hook on netif_rx, netif_receive_skb and
dev_queue_xmit to copy the packet to mmap'ed space.
2) Use of mmap to directly access userspace memory. Although
several Projects out there using mmap.
3) Keeping the records of each packet, dropped or received.
With the introduction of NAPI support in 2.6.x kernel, It
looks quite achievable to capture packets on gigabit speed.
Pooling defiantly helpful in reducing kernel interrupt load
in heavy traffic. To understand the implementation I studied
my 3com Lan card driver.
The technique is to disable interrupt on the first packet
arrival and switch to the pooling mode. After processing all
the packets, re-enable interrupt (quite smart).
For the sake of
understanding the concept and working, I modified the source
code or PF_RING module and removed outgoing packet capturing
routine from both kernel core and ring modules. It further
improves the the performance but still it's wasting a lot of
time in bookkeeping packets information.
Another
project by Luca is
nCap, which offers 100% packet capturing facility and
will be the next project which I'll study.
Today is mavi's birthday and I can't even wish her, :(
my bad. She is the topic of my blog today. Although she
deserve more then just a few sentences in my blog but for me
Blog is more reliable then my memory. At least, with the
help of this blog, I can guaranty I'll remember her always,
otherwise "Banday ka koie pata lagta hai".
We started our friendship in Oct 2006, during Ramadan
and ended in Jan 2007. During this short period of time, the
only/important thing which I learned from her was the
importance of a Friend. And no doubt she was the lady of her
words. It was me who thought beyond the boundary of
friendship :) and I paid the price in the shape of losing
her forever. And Again the decision was mine which she
accepted as, for her, it was acceptable as compare to
thinking beyond friendship.
It's all started when she gave me some importance and
showed care for me. Yes! this is the care which I referring
in my previous blogs. Well she was only doing for friendship
or in other words, she only had the label of friendship in
her mind and I took it completely wrong. And it took a
while(1){} to make me realize that "SP your are moving
towards wrong direction". I still remember each word we
spoke on phone in our last conversation and believe me, In
the middle of conversation I felt I'm forcing her make a
relation. Although she refused clearly in her words, "My
parents will not agree so drop this topic". I heard this
typical sentence three time during our friendship period.
That was the point which make me dig more to find out what
she want but as she used to say "Trust is the only thing
which matters more in friendship" and I guess I should have
believed her words in first place instead of giving her hard
time while digging more and interfering in her personal
matters etc...
Anyway, her thought about more often than she probably
can guess, and thoughts of her just naturally bring smiles
of happiness. Now, that today's her birthday, may each and
every warm thought, bring a wish for all the best in life,
and all her favorite things. Ameen
As her chapter is now closed forever, the only thing
which I regret is that she must have said once thats she
likes me and I would have done every thing for her.
Good Bye Mavi you spent some memorable time with me and I'll always remember you as a good friend.
New year started with eid celebration and a sad incidence of saddam execution. Different people have different views about the execution, regardless of whatever it is, it shouldn't be shown on TV like this. I don't think there is any difference in keeping a person is prison and in graveyard, unless you have any personal fear from him/her.
Today is my first day of Eid and
as usual spending in front of laptop, reading about
different problems in Link List.
Girl Friend?
I'm doing preety well as far as my professional life is
concern but as compare to my social life I'm unable to get a
true friend willing to give me chance to show my care to
her. I know the importance of GF in life and I feel really
guilty about loosing some important true friends just
because of my own stubborn nature and sachi I'm afraid to
live a life like majno. Last few years of my life bring full
success, as I did really hard in achiving my goals, but If I
look behind It has changed my personality a lot. I learned a
lot from my previous experience and had a really bad
reputation of falling in initial love without even knowing a
person :). The only problem which I can see and I don't have
any solution for it is, I expect more from a GF as compare
to friend, I know every one do but I don't have the guts to
make some one fall for me, whom I like, and if any one do,
It just because of my status not me, yes this is true.
Anyway I can't say much as I don't have any successful
experience in life till now. But hota hai chalta hai, aur
haun "I don't give up yet". Let see who is next in 2007
:-).
Yesterday, It was my last day in XYZ
and it went so bad. I spent 1.5 years in XYZ
and guess what? email farewell... I was shocked when I
received email of CEO, giving farewell in just a two
paragraph email. I seen other employees leaving XYZ
and they had given a good farewell in a good respectable
manner, with
some discussion on what he/she has done for the company. I'm
not sure may be
they are not happy with my work @XYZ or the way I refused
the offer to stay in XYZ.
But whatever it was I felt extremely unhappy about it. I was
going on a one month proper notice while back in the time of
joining XYZ,
they forced me to join in 12 days.
New Job
My new jobs is really exciting and it's more toward embedded programming approach. Although I'm not strong in assembly but I guess this is the strong learning point for me also the strong reason of leaving XYZ. My job responsibility includes coding some heavily optimized application using inline assembly and using the feature of AMD's L1 and L2 cache. I was reading some documents on application optimization on AMD opteron platform and looks really exciting to me. Also my job responsibility includes device driver writing skills which is some thing not as new to me as assembly.
While developing Asterisk billing application, I have to
modify asterisk mysql CDR plugin to rate the CDRs before it
touches the databases. The experiment worked really great
and saved the time of post processing the CDRs. The other
stuff which took some time in coding was the best regax
matching extension while asterisk call hunting. For this, I
break down the numbers in seperate file and extensions which
really work out as I expected.
GSM/GPRS Embedded Module
I really Like these Modules. I only worked with g18 but looking forward to try g20. Currenlty, Mostly Asterisk GSM devices using these module in PCI cards to give the support of GSM to asterisk. While reading motrolla Developers guide I figure out we can actually play alot more with it.
New RFC for SIP only recomment SIP DGIEST method to be use as authentication mechanism. In Digest server sends a challenge string "nonce" which should be encrypted along with our username, pass, URI,realm , request and send back to the server. All this is achievable using a simple three step formula.
1. H1= MD5 ( username : realm : pass)
2. H2= Md5 ( METHOD : URI)
3. responce = MD5 ( H1: nonce : H2 )
In case when Authentication is needed server reponce back with the 401 (unauthorized request) along with the realm and nonce. As we are registering with the server the METHOD should be "REGISTER" and URI on the server which we want to access, e.g sip:192.168.1.20
New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!