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
Explain zero based addressing.
What is an expression?
What's the total generic pointer type?
What is string concatenation in c?
What is operator promotion?
What is the role of this pointer?
How many header files are in c?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What's the difference between constant char *p and char * constant p?
What is the advantage of c?
what are non standard function in c
What is use of bit field?
Why isn't it being handled properly?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
What is d'n in c?