<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: process id's and portnumber in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881295#M774293</link>
    <description>Hi Amith,&lt;BR /&gt;&lt;BR /&gt;A network connection is defined through a socket={src-ip,src-port,dest-ip,dest-port}.&lt;BR /&gt;&lt;BR /&gt;If you open a connection, say http, you know that you have to adress dest-port=80/tcp (http) because that service is "well-known" (see /etc/services). &lt;BR /&gt;If not portnumbers but PIDs would be used for dest-ports, how do you know the PID of httpd who serves &lt;A href="http://www.google.com?" target="_blank"&gt;www.google.com?&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Or&lt;BR /&gt;&lt;BR /&gt;If you, for example, replace the src-port with your browser-PID and you visit a site with lots of gifs your multithreaded browser will open lots of connetions, all with the same PID, how would your browser determine what ip-packet belongs to which gif?&lt;BR /&gt;&lt;BR /&gt;Now this work is done for every application by the tcp/ip stack. The applications only specify the target and will get a handle back for further work with that connection.&lt;BR /&gt;&lt;BR /&gt;Now if you want to know to what process opened a certain connection use lsof(8)&lt;BR /&gt;$ lsof -i @yourhost:src-port&lt;BR /&gt;&lt;BR /&gt;hns@AVALON:/home/hns&amp;gt; lsof -i @avalon:52545&lt;BR /&gt;COMMAND PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME&lt;BR /&gt;ssh     829 hns    3u  IPv4 0xc4a23910      0t0  TCP avalon:52545-&amp;gt;snowdon:ssh (ESTABLISHED)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;A good source for reading is &lt;BR /&gt;R. Stevens "UNIX Network programming Vol.I"&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;HGH</description>
    <pubDate>Tue, 17 Oct 2006 04:48:28 GMT</pubDate>
    <dc:creator>Hemmetter</dc:creator>
    <dc:date>2006-10-17T04:48:28Z</dc:date>
    <item>
      <title>process id's and portnumber</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881294#M774292</link>
      <description>Could anyone please tell me why port numbers are used in network programming instead of process id's&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Oct 2006 03:51:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881294#M774292</guid>
      <dc:creator>Amith_2</dc:creator>
      <dc:date>2006-10-17T03:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: process id's and portnumber</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881295#M774293</link>
      <description>Hi Amith,&lt;BR /&gt;&lt;BR /&gt;A network connection is defined through a socket={src-ip,src-port,dest-ip,dest-port}.&lt;BR /&gt;&lt;BR /&gt;If you open a connection, say http, you know that you have to adress dest-port=80/tcp (http) because that service is "well-known" (see /etc/services). &lt;BR /&gt;If not portnumbers but PIDs would be used for dest-ports, how do you know the PID of httpd who serves &lt;A href="http://www.google.com?" target="_blank"&gt;www.google.com?&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Or&lt;BR /&gt;&lt;BR /&gt;If you, for example, replace the src-port with your browser-PID and you visit a site with lots of gifs your multithreaded browser will open lots of connetions, all with the same PID, how would your browser determine what ip-packet belongs to which gif?&lt;BR /&gt;&lt;BR /&gt;Now this work is done for every application by the tcp/ip stack. The applications only specify the target and will get a handle back for further work with that connection.&lt;BR /&gt;&lt;BR /&gt;Now if you want to know to what process opened a certain connection use lsof(8)&lt;BR /&gt;$ lsof -i @yourhost:src-port&lt;BR /&gt;&lt;BR /&gt;hns@AVALON:/home/hns&amp;gt; lsof -i @avalon:52545&lt;BR /&gt;COMMAND PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME&lt;BR /&gt;ssh     829 hns    3u  IPv4 0xc4a23910      0t0  TCP avalon:52545-&amp;gt;snowdon:ssh (ESTABLISHED)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;A good source for reading is &lt;BR /&gt;R. Stevens "UNIX Network programming Vol.I"&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;HGH</description>
      <pubDate>Tue, 17 Oct 2006 04:48:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881295#M774293</guid>
      <dc:creator>Hemmetter</dc:creator>
      <dc:date>2006-10-17T04:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: process id's and portnumber</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881296#M774294</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.faqs.org/faqs/unix-faq/socket/" target="_blank"&gt;http://www.faqs.org/faqs/unix-faq/socket/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.google.com/url?sa=t&amp;amp;ct=res&amp;amp;cd=2&amp;amp;url=http%3A%2F%2Fwww.kohala.com%2Fstart%2F&amp;amp;ei=-a80RaGnMYe-2wLnk_20AQ&amp;amp;sig=__v746GYO1_ZHFw694VCXV27VnTY4=&amp;amp;sig2=nO-OpI9mIcHHiUZ3W59-dQ" target="_blank"&gt;http://www.google.com/url?sa=t&amp;amp;ct=res&amp;amp;cd=2&amp;amp;url=http%3A%2F%2Fwww.kohala.com%2Fstart%2F&amp;amp;ei=-a80RaGnMYe-2wLnk_20AQ&amp;amp;sig=__v746GYO1_ZHFw694VCXV27VnTY4=&amp;amp;sig2=nO-OpI9mIcHHiUZ3W59-dQ&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.google.com/url?sa=t&amp;amp;ct=res&amp;amp;cd=3&amp;amp;url=http%3A%2F%2Fwww.kegel.com%2Funpv1%2F&amp;amp;ei=-a80RaGnMYe-2wLnk_20AQ&amp;amp;sig=__Z8j9rt5Zb_jYe1Zp-aZUz-M8wT4=&amp;amp;sig2=SnqgRE1pvp-r0pN3YZYQyA" target="_blank"&gt;http://www.google.com/url?sa=t&amp;amp;ct=res&amp;amp;cd=3&amp;amp;url=http%3A%2F%2Fwww.kegel.com%2Funpv1%2F&amp;amp;ei=-a80RaGnMYe-2wLnk_20AQ&amp;amp;sig=__Z8j9rt5Zb_jYe1Zp-aZUz-M8wT4=&amp;amp;sig2=SnqgRE1pvp-r0pN3YZYQyA&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.google.com/url?sa=t&amp;amp;ct=res&amp;amp;cd=5&amp;amp;url=http%3A%2F%2Fwww.scit.wlv.ac.uk%2F~jphb%2Fcomms%2Fsockets.html&amp;amp;ei=-a80RaGnMYe-2wLnk_20AQ&amp;amp;sig=__2ol3SoeAP-JHJijp3B9tE16w-hc=&amp;amp;sig2=cWGCPKkPv7F7w65G70Mlag" target="_blank"&gt;http://www.google.com/url?sa=t&amp;amp;ct=res&amp;amp;cd=5&amp;amp;url=http%3A%2F%2Fwww.scit.wlv.ac.uk%2F~jphb%2Fcomms%2Fsockets.html&amp;amp;ei=-a80RaGnMYe-2wLnk_20AQ&amp;amp;sig=__2ol3SoeAP-JHJijp3B9tE16w-hc=&amp;amp;sig2=cWGCPKkPv7F7w65G70Mlag&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 17 Oct 2006 05:27:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881296#M774294</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-10-17T05:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: process id's and portnumber</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881297#M774295</link>
      <description>Friend &lt;BR /&gt;lsof |grep number-port&lt;BR /&gt;this goes to bring together numbers it of the process, that this leaving the door in Lock</description>
      <pubDate>Tue, 17 Oct 2006 07:34:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881297#M774295</guid>
      <dc:creator>Calandrello</dc:creator>
      <dc:date>2006-10-17T07:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: process id's and portnumber</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881298#M774296</link>
      <description>Port numbers are not used instead of process id's. When you develop a network service, the program must start and listed in a network address/port to accept connections.&lt;BR /&gt;&lt;BR /&gt;When the program starts, a PID is created for the process.&lt;BR /&gt;&lt;BR /&gt;As many network services can be running in a server, you need a way to allow multiple services running on the same network address. There is where ports numbers plays. To avoid service conflicts, every network service listen on a different network port but in the same IP address.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Oct 2006 08:25:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-id-s-and-portnumber/m-p/3881298#M774296</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-10-17T08:25:13Z</dc:date>
    </item>
  </channel>
</rss>

