Giter Site home page Giter Site logo

Centos7 compile error about captagent HOT 8 CLOSED

leoapd19 avatar leoapd19 commented on July 18, 2024
Centos7 compile error

from captagent.

Comments (8)

btriller avatar btriller commented on July 18, 2024 1

Probably < 1.10 [1]

[1] https://centos.pkgs.org/7/centos-x86_64/libpcap-devel-1.5.3-12.el7.x86_64.rpm.html

from captagent.

leoapd19 avatar leoapd19 commented on July 18, 2024 1

Thanks , @kYroL01 its working now .

from captagent.

lmangani avatar lmangani commented on July 18, 2024

Hello @leoapd19 please provide full context to your build execution

from captagent.

leoapd19 avatar leoapd19 commented on July 18, 2024

hi @lmangani

[root@localhost captagent]# make
Making all in src
make[1]: Entering directory /home/homer/captagent/src' make all-recursive make[2]: Entering directory /home/homer/captagent/src'
Making all in .
make[3]: Entering directory /home/homer/captagent/src' make[3]: Leaving directory /home/homer/captagent/src'
Making all in modules/socket/pcap
make[3]: Entering directory /home/homer/captagent/src/modules/socket/pcap' Making all in . make[4]: Entering directory /home/homer/captagent/src/modules/socket/pcap'
CC socket_pcap_la-socket_pcap.lo
socket_pcap.c: In function 'callback_proto':
socket_pcap.c:470:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (ntohs((uint16_t)(&ethaddr)) == VLAN) {
^
socket_pcap.c:471:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
if (ntohs((uint16_t)
(&mplsaddr)) == MPLS_UNI) {
^
socket_pcap.c:511:81: error: dereferencing pointer to incomplete type
snprintf(mac_src, sizeof(mac_src), "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", sll2->sll2_addr[0], sll2->sll2_addr[1], sll2->sll2_addr[2], sll2->sll2_addr[3], sll2->sll2_addr[4], sll2->sll2_addr[5]);
^
socket_pcap.c:511:101: error: dereferencing pointer to incomplete type
snprintf(mac_src, sizeof(mac_src), "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", sll2->sll2_addr[0], sll2->sll2_addr[1], sll2->sll2_addr[2], sll2->sll2_addr[3], sll2->sll2_addr[4], sll2->sll2_addr[5]);
^
socket_pcap.c:511:121: error: dereferencing pointer to incomplete type
snprintf(mac_src, sizeof(mac_src), "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", sll2->sll2_addr[0], sll2->sll2_addr[1], sll2->sll2_addr[2], sll2->sll2_addr[3], sll2->sll2_addr[4], sll2->sll2_addr[5]);
^
socket_pcap.c:511:141: error: dereferencing pointer to incomplete type
snprintf(mac_src, sizeof(mac_src), "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", sll2->sll2_addr[0], sll2->sll2_addr[1], sll2->sll2_addr[2], sll2->sll2_addr[3], sll2->sll2_addr[4], sll2->sll2_addr[5]);
^
socket_pcap.c:511:161: error: dereferencing pointer to incomplete type
snprintf(mac_src, sizeof(mac_src), "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", sll2->sll2_addr[0], sll2->sll2_addr[1], sll2->sll2_addr[2], sll2->sll2_addr[3], sll2->sll2_addr[4], sll2->sll2_addr[5]);
^
socket_pcap.c:511:181: error: dereferencing pointer to incomplete type
snprintf(mac_src, sizeof(mac_src), "%.2X-%.2X-%.2X-%.2X-%.2X-%.2X", sll2->sll2_addr[0], sll2->sll2_addr[1], sll2->sll2_addr[2], sll2->sll2_addr[3], sll2->sll2_addr[4], sll2->sll2_addr[5]);
^
socket_pcap.c:514:33: error: dereferencing pointer to incomplete type
type_ip = ntohs(sll2->sll2_protocol);
^
socket_pcap.c:312:26: warning: unused variable 'ip6_pkt' [-Wunused-variable]
struct ip6_hdr* ip6_pkt = NULL;
^
socket_pcap.c: In function 'websocket_pre_decode':
socket_pcap.c:1029:13: warning: pointer targets in passing argument 2 of 'websocket_decode' differ in signedness [-Wpointer-sign]
websocket_decode((char*)decoded, p_websock, skip, mask_key);
^
socket_pcap.c:275:13: note: expected 'const char *' but argument is of type 'uint8_t *'
static void websocket_decode(char *dst, const char src, size_t len, const char mask[4])
^
socket_pcap.c:1029:13: warning: pointer targets in passing argument 4 of 'websocket_decode' differ in signedness [-Wpointer-sign]
websocket_decode((char
)decoded, p_websock, skip, mask_key);
^
socket_pcap.c:275:13: note: expected 'const char *' but argument is of type 'uint8_t *'
static void websocket_decode(char *dst, const char src, size_t len, const char mask[4])
^
socket_pcap.c:1040:13: warning: pointer targets in passing argument 2 of 'websocket_decode' differ in signedness [-Wpointer-sign]
websocket_decode((char
)decoded, p_websock, skip, mask_key);
^
socket_pcap.c:275:13: note: expected 'const char *' but argument is of type 'uint8_t *'
static void websocket_decode(char *dst, const char src, size_t len, const char mask[4])
^
socket_pcap.c:1040:13: warning: pointer targets in passing argument 4 of 'websocket_decode' differ in signedness [-Wpointer-sign]
websocket_decode((char
)decoded, p_websock, skip, mask_key);
^
socket_pcap.c:275:13: note: expected 'const char *' but argument is of type 'uint8_t *'
static void websocket_decode(char *dst, const char src, size_t len, const char mask[4])
^
socket_pcap.c: In function 'load_module':
socket_pcap.c:1621:9: warning: passing argument 3 of 'pthread_create' from incompatible pointer type [enabled by default]
pthread_create(&stat_thread, NULL, stat_collect, i);
^
In file included from socket_pcap.c:42:0:
/usr/include/pthread.h:235:12: note: expected 'void * (
)(void )' but argument is of type 'void ()(void *)'
extern int pthread_create (pthread_t *__restrict __newthread,
^
socket_pcap.c:1621:9: warning: passing argument 4 of 'pthread_create' makes pointer from integer without a cast [enabled by default]
pthread_create(&stat_thread, NULL, stat_collect, i);
^
In file included from socket_pcap.c:42:0:
/usr/include/pthread.h:235:12: note: expected 'void * restrict' but argument is of type 'unsigned int'
extern int pthread_create (pthread_t *__restrict __newthread,
^
socket_pcap.c: At top level:
socket_pcap.c:193:12: warning: 'check_port_filter' defined but not used [-Wunused-function]
static int check_port_filter(char *filter, int port_arg1, int port_arg2) {
^
socket_pcap.c:258:12: warning: 'strip_fcs_end' defined but not used [-Wunused-function]
static int strip_fcs_end(unsigned char *data, int len) {
^
make[4]: *** [socket_pcap_la-socket_pcap.lo] Error 1
make[4]: Leaving directory /home/homer/captagent/src/modules/socket/pcap' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory /home/homer/captagent/src/modules/socket/pcap'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /home/homer/captagent/src' make[1]: *** [all] Error 2 make[1]: Leaving directory /home/homer/captagent/src'
make: *** [all-recursive] Error 1
[root@localhost captagent]#

from captagent.

kYroL01 avatar kYroL01 commented on July 18, 2024

Hi @leoapd19 seems different OS has different libpcap version.
Could you please tell me your libpcap version ?
Thank you, I will investigate

from captagent.

kYroL01 avatar kYroL01 commented on July 18, 2024

Please @leoapd19 retest again after the fix we merged.
Let me know.
Thanks

from captagent.

leoapd19 avatar leoapd19 commented on July 18, 2024

Thanks , @kYroL01 its working now .

from captagent.

kYroL01 avatar kYroL01 commented on July 18, 2024

Thank you as well @btriller for reporting it.
Don't forget to star this project if you like it :)

from captagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.