Giter Club home page Giter Club logo

go-mptcp-api's Introduction

go-mptcp-api's People

Contributors

aclarembeau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-mptcp-api's Issues

compilation error

Hello,

after running go get github.com/aclarembeau/go-mptcp-api I get the following errors:

`# github.com/aclarembeau/go-mptcp-api
/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c: In function ‘mptcplib_open_sub’:

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:70:25: error: invalid application of ‘sizeof’ to incomplete type ‘struct mptcp_sub_tuple’
int optlen = sizeof(struct mptcp_sub_tuple) + tuple->local_len + tuple->remote_len;
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:73:14: error: dereferencing pointer to incomplete type ‘struct mptcp_sub_tuple’
sub_tuple->id = 0;
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:83:49: error: ‘MPTCP_OPEN_SUB_TUPLE’ undeclared (first use in this function)
int error = getsockopt(sockfd, IPPROTO_TCP, MPTCP_OPEN_SUB_TUPLE, sub_tuple, &optlen);
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:83:49: note: each undeclared identifier is reported only once for each function it appears in
/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c: In function ‘mptcplib_get_sub_ids’:

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:108:45: error: ‘MPTCP_GET_SUB_IDS’ undeclared (first use in this function)
r = getsockopt(sockfd, IPPROTO_TCP, MPTCP_GET_SUB_IDS, ids, &optlen);
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:115:44: error: dereferencing pointer to incomplete type ‘struct mptcp_sub_ids’
struct mptcplib_intarray arr = {ids->sub_count, malloc(sizeof(int) * ids->sub_count)};
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c: In function ‘mptcplib_get_sub_tuple’:

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:139:14: error: dereferencing pointer to incomplete type ‘struct mptcp_sub_tuple’
sub_tuple->id = id;
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:142:45: error: ‘MPTCP_GET_SUB_TUPLE’ undeclared (first use in this function)
int r = getsockopt(sockfd, IPPROTO_TCP, MPTCP_GET_SUB_TUPLE, sub_tuple, &optlen);
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c: In function ‘mptcplib_close_sub’:
/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:197:31: error: storage size of ‘close_info’ isn’t known
struct mptcp_close_sub_id close_info;
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:199:34: error: invalid application of ‘sizeof’ to incomplete type ‘struct mptcp_close_sub_id’
unsigned int optlen = sizeof(struct mptcp_close_sub_id);
^
/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:204:49: error: ‘MPTCP_CLOSE_SUB_ID’ undeclared (first use in this function)
int error = getsockopt(sockfd, IPPROTO_TCP, MPTCP_CLOSE_SUB_ID, &close_info, &optlen);
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c: In function ‘mptcplib_set_sub_sockopt’:
/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:213:33: error: storage size of ‘sub_sso’ isn’t known
struct mptcp_sub_setsockopt sub_sso;
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:216:34: error: invalid application of ‘sizeof’ to incomplete type ‘struct mptcp_sub_setsockopt’
unsigned int optlen = sizeof(struct mptcp_sub_setsockopt);
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:224:47: error: ‘MPTCP_SUB_SETSOCKOPT’ undeclared (first use in this function)
int ret = setsockopt(sockfd, IPPROTO_TCP, MPTCP_SUB_SETSOCKOPT, &sub_sso, optlen);
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c: In function ‘mptcplib_get_sub_sockopt’:
/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:232:33: error: storage size of ‘sub_sso’ isn’t known
struct mptcp_sub_getsockopt sub_sso;
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:236:34: error: invalid application of ‘sizeof’ to incomplete type ‘struct mptcp_sub_setsockopt’
unsigned int optlen = sizeof(struct mptcp_sub_setsockopt);
^

/home/GO/src/github.com/aclarembeau/go-mptcp-api/mptcplib.c:244:49: error: ‘MPTCP_SUB_GETSOCKOPT’ undeclared (first use in this function)
int error = getsockopt(sockfd, IPPROTO_TCP, MPTCP_SUB_GETSOCKOPT, &sub_sso, &optlen);
`

any help please

thanks

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.