网络编程第二章的头文件

网络编程第二章的<AF_irda.h>头文件
在vc6中不包含,只要装上sdk2003 就可以了,不要忘了包含sdk的路径

 

红外通讯编译时需要一个<AF_irda.h>头文件 

 

相关连接:

http://www.vczx.com/forum/showthread.php?postid=34293

下面是af_irda.h的源文件:
af_irda.h
Language: C
License: GPL
Copyright: (c) 1998-2000 Dag Brattli, All Rights Reserved. (c) 2000-2002 Jean Tourrilhes
LOC: 41

/*********************************************************************
*
* Filename: af_irda.h
* Version: 1.0
* Description: IrDA sockets declarations
* Status: Stable
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Dec 9 21:13:12 1997
* Modified at: Fri Jan 28 13:16:32 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-2000 Dag Brattli, All Rights Reserved.
* Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Neither Dag Brattli nor University of Troms admit liability nor
* provide warranty for any of this software. This material is
* provided "AS-IS" and at no charge.
*
********************************************************************/

#ifndef AF_IRDA_H
#define AF_IRDA_H

#include <linux/irda.h>
#include <net/irda/irda.h>
#include <net/irda/iriap.h> /* struct iriap_cb */
#include <net/irda/irias_object.h> /* struct ias_value */
#include <net/irda/irlmp.h> /* struct lsap_cb */
#include <net/irda/irttp.h> /* struct tsap_cb */
#include <net/irda/discovery.h> /* struct discovery_t */

/* IrDA Socket */
struct irda_sock {
__u32 saddr; /* my local address */
__u32 daddr; /* peer address */

struct lsap_cb *lsap; /* LSAP used by Ultra */
__u8 pid; /* Protocol IP (PID) used by Ultra */

struct tsap_cb *tsap; /* TSAP used by this connection */
__u8 dtsap_sel; /* remote TSAP address */
__u8 stsap_sel; /* local TSAP address */

__u32 max_sdu_size_rx;
__u32 max_sdu_size_tx;
__u32 max_data_size;
__u8 max_header_size;
struct qos_info qos_tx;

__u16_host_order mask; /* Hint bits mask */
__u16_host_order hints; /* Hint bits */

void *ckey; /* IrLMP client handle */
void *skey; /* IrLMP service handle */

struct ias_object *ias_obj; /* Our service name + lsap in IAS */
struct iriap_cb *iriap; /* Used to query remote IAS */
struct ias_value *ias_result; /* Result of remote IAS query */

hashbin_t *cachelog; /* Result of discovery query */
__u32 cachedaddr; /* Result of selective discovery query */

int nslots; /* Number of slots to use for discovery */

int errno; /* status of the IAS query */

struct sock *sk;
wait_queue_head_t query_wait; /* Wait for the answer to a query */
struct timer_list watchdog; /* Timeout for discovery */

LOCAL_FLOW tx_flow;
LOCAL_FLOW rx_flow;
};

#define irda_sk(__sk) ((struct irda_sock *)(__sk)->sk_protinfo)

#endif /* AF_IRDA_H */

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值