jungfrau server: feature finish: switching between 2 interfaces

This commit is contained in:
2019-05-17 19:19:03 +02:00
parent 1943e77b24
commit 1a1c6b9b42
15 changed files with 312 additions and 176 deletions

View File

@ -524,7 +524,8 @@ int Server_SendResult(int fileDes, intType itype, int update, void* retval, int
void getMacAddressinString(char* cmac, int size, uint64_t mac) {
memset(cmac, 0, size);
sprintf(cmac,"%02x:%02x:%02x:%02x:%02x:%02x",(unsigned int)((mac>>40)&0xFF),
sprintf(cmac,"%02x:%02x:%02x:%02x:%02x:%02x",
(unsigned int)((mac>>40)&0xFF),
(unsigned int)((mac>>32)&0xFF),
(unsigned int)((mac>>24)&0xFF),
(unsigned int)((mac>>16)&0xFF),
@ -535,4 +536,4 @@ void getMacAddressinString(char* cmac, int size, uint64_t mac) {
void getIpAddressinString(char* cip, uint32_t ip) {
memset(cip, 0, INET_ADDRSTRLEN);
inet_ntop(AF_INET, &ip, cip, INET_ADDRSTRLEN);
}
}