📄 ipay-msg.h
字号:
/* $Id: ipay-msg.h,v 1.2 2000/04/06 07:26:53 jm Exp $ * Ipay message structures and code defines * * Dynamic hierarchial IP tunnel * Copyright (C) 1998-2000, Dynamics group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. See README and COPYING for * more details. */#ifdef INCLUDE_IPAY#ifndef IPAY_MSG_H#define IPAY_MSG_H#include <netinet/in.h>#include "owntypes.h"#define ATTRIBUTE_PACKED __attribute__ ((packed))#define IPAY_CHAR_LEN 64typedef __u32 IPAY_TYPE;typedef char IPAY_CHAR[IPAY_CHAR_LEN];#define IPAY_MSG_INITIALIZE 1struct ipay_initialize { IPAY_TYPE type; IPAY_CHAR mnIdentifier;} ATTRIBUTE_PACKED;#define IPAY_MSG_POLICY_REQ 2struct ipay_policy_prio_req { IPAY_TYPE type; __u32 timePrice; __u32 bytePrice;} ATTRIBUTE_PACKED;#define IPAY_MSG_POLICY_REPLY 3struct ipay_policy_prio_reply { IPAY_TYPE type; __u32 priority;} ATTRIBUTE_PACKED;#define IPAY_MSG_NEW_FA 4struct ipay_new_fa { IPAY_TYPE type; IPAY_CHAR faIdentifier; __u32 timePrice; __u32 bytePrice;} ATTRIBUTE_PACKED;#define IPAY_MSG_PURCHASE 5struct ipay_purchase { IPAY_TYPE type; __u32 timeStamp; IPAY_CHAR mnIdentifier; IPAY_CHAR faIdentifier; __u32 purchaseSerialNumber; __u32 microPaymentUnit; __u32 maxNumberOfUnits; IPAY_CHAR firstPayment; __u32 timePrice; __u32 bytePrice; IPAY_CHAR signature;} ATTRIBUTE_PACKED;#define IPAY_MSG_ALLOWANCE 6struct ipay_allowance { IPAY_TYPE type; __u32 allowance; IPAY_CHAR mnIdentifier; __u32 timePrice; __u32 bytePrice; __u32 approvedNumberOfUnits; IPAY_CHAR sessionKey; IPAY_CHAR signature;} ATTRIBUTE_PACKED;#define IPAY_MSG_PLEASE_PAY_MORE 7struct ipay_please_pay_more { IPAY_TYPE type; IPAY_CHAR mnIdentifier; __u32 usedTime; __u32 usedByte; IPAY_CHAR sessionKey; IPAY_CHAR signature;} ATTRIBUTE_PACKED;#define IPAY_MSG_MICRO_PAYMENT 8struct ipay_micro_payment { IPAY_TYPE type; IPAY_CHAR mnIdentifier; IPAY_CHAR nextPayment;} ATTRIBUTE_PACKED;#define IPAY_MSG_STATISTICS 9struct ipay_statistics { IPAY_TYPE type; IPAY_CHAR faIdentifier; __u32 bytes; __u32 time;} ATTRIBUTE_PACKED;#define IPAY_MSG_CAPACITY_USED 10struct ipay_capacity_used { IPAY_TYPE type; IPAY_CHAR mnIdentifier; __u32 timePrice; __u32 bytePrice; __u32 usedTime; __u32 usedByte;} ATTRIBUTE_PACKED;#define IPAY_MSG_APPROVAL 11struct ipay_approval { IPAY_TYPE type; __u32 timeStamp; __u32 purchaseTimeStamp; IPAY_CHAR mnIdentifier; IPAY_CHAR faIdentifier; __u32 purchaseSerialNumber; __u32 microPaymentUnit; __u32 maxNumberOfUnits; IPAY_CHAR firstPayment; __u32 timePrice; __u32 bytePrice; IPAY_CHAR purchaseSignature; __u32 approvedNumberOfUnits; IPAY_CHAR sessionKey; IPAY_CHAR signature;} ATTRIBUTE_PACKED;#define IPAY_MSG_BILLING 12struct ipay_billing { IPAY_TYPE type; __u32 timeStamp; IPAY_CHAR mnIdentifier; IPAY_CHAR faIdentifier; __u32 purchaseSerialNumber; __u32 billedPrice; __u32 usedPaymentUnits; IPAY_CHAR lastPayment; __u32 usedQuantitities;} ATTRIBUTE_PACKED;#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -