All Questions
Tagged with ip-address c
117
questions
0
votes
0
answers
35
views
ip address with lwip
I am trying to get a dynamic IP address with custom mpc5775b board and ksz8041 phy device in s32 design studio for pa but I don't get an IP address. I have used eth,phy,tcpip components. I have added ...
0
votes
0
answers
136
views
How can I identify IP address time to renewal in C program?
I know how to get IP address of the interfaces using getifaddrs(). But how to know how much time is left until this address may change due to DHCP lease expiration? dhcpclient shows it when renewing ...
-2
votes
1
answer
1k
views
Socket programming chat application
I made a chat application using sockets in c language. When i run server and client on same device it works fine. But, when i run client and server on different device client shows connect error. is ...
1
vote
1
answer
93
views
Use inet_pton for IP address conversion from a text file not working
I am trying to convert a range of ip addresses contained in a text file using inet_pton function. I need to get ip adresses strings from the text file and pass as src address parameter to inet_pton(). ...
1
vote
1
answer
1k
views
Check if given IP is in given Network range or not in C
I was asked this question in one of the interview and I was strictly asked to do programming in C/C++. I am not much into C++, I have tried writing code in C, can anyone help me improving my code, it ...
1
vote
0
answers
322
views
How to find Class, Network Address, Valid host address range, Broadcast address and default mask of input IP address (Classful)
I am working on a project on C in which I have to perform a certain tasks on a certain IP address.
I have to find:
Class
Network Address
Valid host address range
Broadcast address
and
default mask of ...
0
votes
0
answers
351
views
Unresolved external symbol - RtlIpv6AddressToStringA
I want to convert an Ipv6 Adress to a String. But I always get the following error:
Unresolved external symbol "S__imp__RtlIpv6AddressToStringA@8" in Funktion "_main"."
...
0
votes
1
answer
320
views
How to Verify If two hostnames or i.p address points to same machine in c++
I have some machines and hostnames are defined for them. I want to write a c++ program that checks if both the hostnames points to different machine and execute some steps. If both of them points to ...
1
vote
2
answers
2k
views
What does 0x7fff mean? C language
I've made function that prints memory address to the stdout but it dosent work the sameway as printf("%p", ...). For example the printf gives me this: 0x7fff58a2d2bb but my function prints ...
0
votes
1
answer
215
views
How to interpret the address converted from inet_pton?
I am confused with the value I get from specified address, when the address was converted by the inet_pton function to struct in_addr. Having this:
#include <stdio.h>
#include <arpa/inet.h>...
2
votes
2
answers
2k
views
How to get the remote/peer IP address from an SSL/ssl_st structure in C?
The things I have previously tried are getting the socket fd from SSL_get_wfd and then passing it to getpeername. I also looked the the BIO object/functions but without any luck. Attempted to look at ...
1
vote
1
answer
281
views
Get notified when IP address changes in device driver
I develop a Linux device driver that, among other things, bridges a private and public network in a real time embedded system to provide a path from management traffic.
I know it's possible to ask ...
0
votes
1
answer
239
views
Generate subnet mask (uint32_t or s_addr) from the mask length (for ipv4 and ipv6 addresses)
I have my input list of ipv4 and ipv6 addresses which are subnetted. I want to find their subnet mask in s_addr or uint_32_t form so that I can check if a given IP address belongs to the input list of ...
0
votes
2
answers
56
views
Can't seem to save the client's address to sourceMsgs[j]
The title says it all, it might be a simple thing but I'm pretty much new at programming hence the stupid question..
I have:
printf("sourcemsg: %s", inet_ntoa(sourceMsgs[j].sin_addr));
to see if ...
1
vote
3
answers
272
views
Will the address pointed by pointer change if we change char* ptr = ;
char* ptr = "hello";
ptr = "world";
Will the address of the ptr change?
If I originally set ptr = "hello", then I set ptr = "world". Where does "hello" go, it just disappears?
case 1:
[before ...