Integrating the ublox LISA C200 modem

Fork of SprintUSBModemHTTPClientTest by Donatien Garnier

Committer:
sam_grove
Date:
Thu Sep 26 00:44:20 2013 -0500
Revision:
5:3f93dd1d4cb3
Exported program and replaced contents of the repo with the source
to build and debug using keil mdk. Libs NOT upto date are lwip, lwip-sys
and socket. these have newer versions under mbed_official but were starting
from a know working point

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 5:3f93dd1d4cb3 1 /*
sam_grove 5:3f93dd1d4cb3 2 * Copyright (c) 2002 CITEL Technologies Ltd.
sam_grove 5:3f93dd1d4cb3 3 * All rights reserved.
sam_grove 5:3f93dd1d4cb3 4 *
sam_grove 5:3f93dd1d4cb3 5 * Redistribution and use in source and binary forms, with or without
sam_grove 5:3f93dd1d4cb3 6 * modification, are permitted provided that the following conditions
sam_grove 5:3f93dd1d4cb3 7 * are met:
sam_grove 5:3f93dd1d4cb3 8 * 1. Redistributions of source code must retain the above copyright
sam_grove 5:3f93dd1d4cb3 9 * notice, this list of conditions and the following disclaimer.
sam_grove 5:3f93dd1d4cb3 10 * 2. Redistributions in binary form must reproduce the above copyright
sam_grove 5:3f93dd1d4cb3 11 * notice, this list of conditions and the following disclaimer in the
sam_grove 5:3f93dd1d4cb3 12 * documentation and/or other materials provided with the distribution.
sam_grove 5:3f93dd1d4cb3 13 * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors
sam_grove 5:3f93dd1d4cb3 14 * may be used to endorse or promote products derived from this software
sam_grove 5:3f93dd1d4cb3 15 * without specific prior written permission.
sam_grove 5:3f93dd1d4cb3 16 *
sam_grove 5:3f93dd1d4cb3 17 * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS''
sam_grove 5:3f93dd1d4cb3 18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
sam_grove 5:3f93dd1d4cb3 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
sam_grove 5:3f93dd1d4cb3 20 * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE
sam_grove 5:3f93dd1d4cb3 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
sam_grove 5:3f93dd1d4cb3 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
sam_grove 5:3f93dd1d4cb3 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
sam_grove 5:3f93dd1d4cb3 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
sam_grove 5:3f93dd1d4cb3 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
sam_grove 5:3f93dd1d4cb3 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
sam_grove 5:3f93dd1d4cb3 27 * SUCH DAMAGE.
sam_grove 5:3f93dd1d4cb3 28 *
sam_grove 5:3f93dd1d4cb3 29 * This file is a contribution to the lwIP TCP/IP stack.
sam_grove 5:3f93dd1d4cb3 30 * The Swedish Institute of Computer Science and Adam Dunkels
sam_grove 5:3f93dd1d4cb3 31 * are specifically granted permission to redistribute this
sam_grove 5:3f93dd1d4cb3 32 * source code.
sam_grove 5:3f93dd1d4cb3 33 */
sam_grove 5:3f93dd1d4cb3 34
sam_grove 5:3f93dd1d4cb3 35 #ifndef __LWIP_IGMP_H__
sam_grove 5:3f93dd1d4cb3 36 #define __LWIP_IGMP_H__
sam_grove 5:3f93dd1d4cb3 37
sam_grove 5:3f93dd1d4cb3 38 #include "lwip/opt.h"
sam_grove 5:3f93dd1d4cb3 39 #include "lwip/ip_addr.h"
sam_grove 5:3f93dd1d4cb3 40 #include "lwip/netif.h"
sam_grove 5:3f93dd1d4cb3 41 #include "lwip/pbuf.h"
sam_grove 5:3f93dd1d4cb3 42
sam_grove 5:3f93dd1d4cb3 43 #if LWIP_IGMP /* don't build if not configured for use in lwipopts.h */
sam_grove 5:3f93dd1d4cb3 44
sam_grove 5:3f93dd1d4cb3 45 #ifdef __cplusplus
sam_grove 5:3f93dd1d4cb3 46 extern "C" {
sam_grove 5:3f93dd1d4cb3 47 #endif
sam_grove 5:3f93dd1d4cb3 48
sam_grove 5:3f93dd1d4cb3 49
sam_grove 5:3f93dd1d4cb3 50 /* IGMP timer */
sam_grove 5:3f93dd1d4cb3 51 #define IGMP_TMR_INTERVAL 100 /* Milliseconds */
sam_grove 5:3f93dd1d4cb3 52 #define IGMP_V1_DELAYING_MEMBER_TMR (1000/IGMP_TMR_INTERVAL)
sam_grove 5:3f93dd1d4cb3 53 #define IGMP_JOIN_DELAYING_MEMBER_TMR (500 /IGMP_TMR_INTERVAL)
sam_grove 5:3f93dd1d4cb3 54
sam_grove 5:3f93dd1d4cb3 55 /* MAC Filter Actions, these are passed to a netif's
sam_grove 5:3f93dd1d4cb3 56 * igmp_mac_filter callback function. */
sam_grove 5:3f93dd1d4cb3 57 #define IGMP_DEL_MAC_FILTER 0
sam_grove 5:3f93dd1d4cb3 58 #define IGMP_ADD_MAC_FILTER 1
sam_grove 5:3f93dd1d4cb3 59
sam_grove 5:3f93dd1d4cb3 60
sam_grove 5:3f93dd1d4cb3 61 /**
sam_grove 5:3f93dd1d4cb3 62 * igmp group structure - there is
sam_grove 5:3f93dd1d4cb3 63 * a list of groups for each interface
sam_grove 5:3f93dd1d4cb3 64 * these should really be linked from the interface, but
sam_grove 5:3f93dd1d4cb3 65 * if we keep them separate we will not affect the lwip original code
sam_grove 5:3f93dd1d4cb3 66 * too much
sam_grove 5:3f93dd1d4cb3 67 *
sam_grove 5:3f93dd1d4cb3 68 * There will be a group for the all systems group address but this
sam_grove 5:3f93dd1d4cb3 69 * will not run the state machine as it is used to kick off reports
sam_grove 5:3f93dd1d4cb3 70 * from all the other groups
sam_grove 5:3f93dd1d4cb3 71 */
sam_grove 5:3f93dd1d4cb3 72 struct igmp_group {
sam_grove 5:3f93dd1d4cb3 73 /** next link */
sam_grove 5:3f93dd1d4cb3 74 struct igmp_group *next;
sam_grove 5:3f93dd1d4cb3 75 /** interface on which the group is active */
sam_grove 5:3f93dd1d4cb3 76 struct netif *netif;
sam_grove 5:3f93dd1d4cb3 77 /** multicast address */
sam_grove 5:3f93dd1d4cb3 78 ip_addr_t group_address;
sam_grove 5:3f93dd1d4cb3 79 /** signifies we were the last person to report */
sam_grove 5:3f93dd1d4cb3 80 u8_t last_reporter_flag;
sam_grove 5:3f93dd1d4cb3 81 /** current state of the group */
sam_grove 5:3f93dd1d4cb3 82 u8_t group_state;
sam_grove 5:3f93dd1d4cb3 83 /** timer for reporting, negative is OFF */
sam_grove 5:3f93dd1d4cb3 84 u16_t timer;
sam_grove 5:3f93dd1d4cb3 85 /** counter of simultaneous uses */
sam_grove 5:3f93dd1d4cb3 86 u8_t use;
sam_grove 5:3f93dd1d4cb3 87 };
sam_grove 5:3f93dd1d4cb3 88
sam_grove 5:3f93dd1d4cb3 89 /* Prototypes */
sam_grove 5:3f93dd1d4cb3 90 void igmp_init(void);
sam_grove 5:3f93dd1d4cb3 91 err_t igmp_start(struct netif *netif);
sam_grove 5:3f93dd1d4cb3 92 err_t igmp_stop(struct netif *netif);
sam_grove 5:3f93dd1d4cb3 93 void igmp_report_groups(struct netif *netif);
sam_grove 5:3f93dd1d4cb3 94 struct igmp_group *igmp_lookfor_group(struct netif *ifp, ip_addr_t *addr);
sam_grove 5:3f93dd1d4cb3 95 void igmp_input(struct pbuf *p, struct netif *inp, ip_addr_t *dest);
sam_grove 5:3f93dd1d4cb3 96 err_t igmp_joingroup(ip_addr_t *ifaddr, ip_addr_t *groupaddr);
sam_grove 5:3f93dd1d4cb3 97 err_t igmp_leavegroup(ip_addr_t *ifaddr, ip_addr_t *groupaddr);
sam_grove 5:3f93dd1d4cb3 98 void igmp_tmr(void);
sam_grove 5:3f93dd1d4cb3 99
sam_grove 5:3f93dd1d4cb3 100 #ifdef __cplusplus
sam_grove 5:3f93dd1d4cb3 101 }
sam_grove 5:3f93dd1d4cb3 102 #endif
sam_grove 5:3f93dd1d4cb3 103
sam_grove 5:3f93dd1d4cb3 104 #endif /* LWIP_IGMP */
sam_grove 5:3f93dd1d4cb3 105
sam_grove 5:3f93dd1d4cb3 106 #endif /* __LWIP_IGMP_H__ */