what is the differnce between AF_INET and PF_INET?
Answer Posted / neenz
In some documentation, you'll see mention of a mystical "PF_INET". This is a weird etherial beast that is rarely seen in nature, but I might as well clarify it a bit here. Once a long time ago, it was thought that maybe a address family (what the "AF" in "AF_INET" stands for) might support several protocols that were referenced by their protocol family (what the "PF" in "PF_INET" stands for).
That didn't happen. Oh well. So the correct thing to do is to use AF_INET in your struct sockaddr_in and PF_INET in your call to socket(). But practically speaking, you can use AF_INET everywhere.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Does free set pointer to null?
What is dynamic dispatch in c++?
given post order,in order construct the corresponding binary tree
What are runtime error?
Sir i need notes for structure,functions,pointers in c language can you help me please
What is an array? What the different types of arrays in c?
I have a varargs function which accepts a float parameter?
Write a program to show the change in position of a cursor using c
What's the right way to use errno?
Write a program to print all permutations of a given string.
What is the c value paradox and how is it explained?
When should a type cast not be used?
What is an auto variable in c?
What is maximum size of array in c?
Explain the use of #pragma exit?