diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-04-30 20:26:32 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-05-04 07:20:42 +0200 |
commit | 9f75c35eb3cf796366b7452538a1d3113cd6b546 (patch) | |
tree | 73d808204e00b05d87558c4e5982bd053d096bf4 /openbsc/src/input/ipaccess.c | |
parent | 44f1c27460325924e0391677ca76798951289f53 (diff) |
GPRS: Introduce a GPRS Gb Proxy
The ida of the Gb proxy is to aggregate Gb links with a number of BSS
and then present all the BSSGP-VC's together inside one NS-VC to the
actual SGSN.
The code is not yet expected to be complete.
Diffstat (limited to 'openbsc/src/input/ipaccess.c')
-rw-r--r-- | openbsc/src/input/ipaccess.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c index 2b5bf21a6..721cadd23 100644 --- a/openbsc/src/input/ipaccess.c +++ b/openbsc/src/input/ipaccess.c @@ -707,58 +707,6 @@ static int rsl_listen_fd_cb(struct bsc_fd *listen_bfd, unsigned int what) return 0; } -int make_sock(struct bsc_fd *bfd, int proto, u_int16_t port, - int (*cb)(struct bsc_fd *fd, unsigned int what)) -{ - struct sockaddr_in addr; - int ret, on = 1; - int type = SOCK_STREAM; - - if (proto == IPPROTO_UDP) - type = SOCK_DGRAM; - - bfd->fd = socket(AF_INET, type, proto); - bfd->cb = cb; - bfd->when = BSC_FD_READ; - //bfd->data = line; - - if (bfd->fd < 0) { - LOGP(DINP, LOGL_ERROR, "could not create TCP socket.\n"); - return -EIO; - } - - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_port = htons(port); - addr.sin_addr.s_addr = INADDR_ANY; - - setsockopt(bfd->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); - - ret = bind(bfd->fd, (struct sockaddr *) &addr, sizeof(addr)); - if (ret < 0) { - LOGP(DINP, LOGL_ERROR, "could not bind l2 socket %s\n", - strerror(errno)); - close(bfd->fd); - return -EIO; - } - - if (proto != IPPROTO_UDP) { - ret = listen(bfd->fd, 1); - if (ret < 0) { - perror("listen"); - return ret; - } - } - - ret = bsc_register_fd(bfd); - if (ret < 0) { - perror("register_listen_fd"); - close(bfd->fd); - return ret; - } - return 0; -} - /* Actively connect to a BTS. Currently used by ipaccess-config.c */ int ipaccess_connect(struct e1inp_line *line, struct sockaddr_in *sa) { |