audit!

是一个检查框架,提供受控访问保护配置文件(CAPP-compliant:)监控系统,收集系统可靠的信息系统关联的事件。他可以帮助你跟踪系统执行动作。它可以让你系统更加安全,提供系细节。但是它不从错误带木中提供系统保护,

e.g

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(total events = 1202)
624 18:13:53 t470p kernel: CPU2: Core temperature/speed normal
624 18:13:53 t470p kernel: CPU6: Core temperature/speed normal
624 18:13:53 t470p kernel: CPU2: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU6: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU1: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU0: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU5: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU7: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU4: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU3: Package temperature/speed normal
624 18:14:09 t470p mount.exfat[2730]: illegal UTF-16 sequence
624 18:14:09 t470p audit[2730]: ANOM_ABEND auid=1000 uid=0 gid=0 ses=2 pid=2730 comm="mount.exfat" exe="/usr/bin/mount.exfat-fuse" sig=6 res=1
624 18:14:09 t470p mount.exfat[2730]: failed to convert name to UTF-8
624 18:14:09 t470p kernel: audit: type=1701 audit(1592993649.131:74): auid=1000 uid=0 gid=0 ses=2 pid=2730 comm="mount.exfat" exe="/usr/bin/mount.exfat-fuse" sig=6 res=1
624 18:14:09 t470p systemd[1]: Created slice system-systemd\x2dcoredump.slice.
624 18:14:09 t470p systemd[1]: Started Process Core Dump (PID 2795/UID 0).
624 18:14:09 t470p audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2795-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostn>
624 18:14:09 t470p kernel: audit: type=1130 audit(1592993649.151:75): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2795-0 comm="systemd" exe="/usr>
624 18:14:09 t470p kdeinit5[1758]: "Could not enter folder /mnt/t5_1t/2t."
624 18:14:10 t470p systemd-coredump[2796]: Process 2730 (mount.exfat) of user 0 dumped core.

Stack trace of thread 2730:
#0 0x00007f567b053ce5 raise (libc.so.6 + 0x3bce5)
#1 0x00007f567b03d857 abort (libc.so.6 + 0x25857)
#2 0x0000564b036bf026 n/a (mount.exfat-fuse + 0x2026)
#3 0x0000564b036c5786 n/a (mount.exfat-fuse + 0x8786)
#4 0x0000564b036bf9bc n/a (mount.exfat-fuse + 0x29bc)
#5 0x00007f567b20e3c8 fuse_fs_readdir (libfuse.so.2 + 0xe3c8)
#6 0x00007f567b20e59a n/a (libfuse.so.2 + 0xe59a)
#7 0x00007f567b2153d2 n/a (libfuse.so.2 + 0x153d2)
#8 0x00007f567b2164eb n/a (libfuse.so.2 + 0x164eb)
#9 0x00007f567b212c75 fuse_session_loop (libfuse.so.2 + 0x12c75)
#10 0x00007f567b20ab80 fuse_loop (libfuse.so.2 + 0xab80)
#11 0x00007f567b21b709 n/a (libfuse.so.2 + 0x1b709)
#12 0x0000564b036bf39c n/a (mount.exfat-fuse + 0x239c)
#13 0x00007f567b03f023 __libc_start_main (libc.so.6 + 0x27023)
#14 0x0000564b036bf45e n/a (mount.exfat-fuse + 0x245e)
624 18:14:10 t470p systemd[1]: systemd-coredump@0-2795-0.service: Succeeded.
624 18:14:10 t470p kernel: audit: type=1131 audit(1592993650.121:76): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2795-0 comm="systemd" exe="/usr>
lines 1-77/77 (END)

exat在manjaro总是时不时崩溃

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[t470p mnt]# journalctl -S "2020-06-24 18:12:00" -U "2020-06-24 18:15:00" 
-- Logs begin at Wed 2020-06-24 17:50:55 CST, end at Wed 2020-06-24 20:23:53 CST. --
6月 24 18:13:03 t470p udisksd[1362]: Mounted /dev/sdb at /run/media/takethat/2t_t5 on behalf of uid 1000
6月 24 18:13:03 t470p kernel: F2FS-fs (sdb): Mounted with checkpoint version = 242db412
624 18:13:03 t470p kwin_x11[1580]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 60732, resource id: 83886085, major code: 18 (ChangeProperty), minor code:>
624 18:13:03 t470p kwin_x11[1580]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 60737, resource id: 83886086, major code: 18 (ChangeProperty), minor code:>
624 18:13:03 t470p kde-open5[2744]: QFileSystemWatcher::removePaths: list is empty
624 18:13:03 t470p kde-open5[2744]: QFileSystemWatcher::removePaths: list is empty
624 18:13:03 t470p kwin_x11[1580]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 60741, resource id: 83886087, major code: 18 (ChangeProperty), minor code:>
624 18:13:03 t470p kdeinit5[1758]: Skipped method "changeUrl" : Type not registered with QtDBus in parameter list: QUrl
624 18:13:03 t470p kdeinit5[1758]: Skipped method "slotTerminalDirectoryChanged" : Type not registered with QtDBus in parameter list: QUrl
624 18:13:03 t470p kdeinit5[1758]: Skipped method "openNewTabAfterCurrentTab" : Type not registered with QtDBus in parameter list: QUrl
624 18:13:03 t470p kdeinit5[1758]: Skipped method "openNewTabAfterLastTab" : Type not registered with QtDBus in parameter list: QUrl
624 18:13:03 t470p kdeinit5[1758]: Unsupported return type 65 QPixmap in method "grab"
624 18:13:03 t470p kdeinit5[1758]: Unsupported return type 65 QPixmap in method "grab"
624 18:13:03 t470p dolphin[2747]: QFileSystemWatcher::removePaths: list is empty
624 18:13:03 t470p dolphin[2747]: QFileSystemWatcher::removePaths: list is empty
624 18:13:03 t470p kwin_x11[1580]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 60985, resource id: 83886085, major code: 18 (ChangeProperty), minor code:>
624 18:13:04 t470p kdeinit5[2755]: Qt: Session management error: networkIdsList argument is NULL
624 18:13:05 t470p kwin_x11[1580]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 62899, resource id: 37774118, major code: 3 (GetWindowAttributes), minor c>
624 18:13:05 t470p kwin_x11[1580]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 62900, resource id: 37774118, major code: 14 (GetGeometry), minor code: 0
624 18:13:05 t470p kwin_x11[1580]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 62903, resource id: 37774118, major code: 3 (GetWindowAttributes), minor c>
624 18:13:05 t470p kwin_x11[1580]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 62904, resource id: 37774118, major code: 14 (GetGeometry), minor code: 0
624 18:13:10 t470p baloo_filemetadata_temp_extractor[2766]: QFSFileEngine::open: No file name specified
624 18:13:25 t470p kdeinit5[2781]: Qt: Session management error: networkIdsList argument is NULL
624 18:13:27 t470p plasmashell[1590]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/CompactRepresentation.qml:136: ReferenceError: jobProgressI>
624 18:13:27 t470p plasmashell[1590]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/CompactRepresentation.qml:135:13: QML PropertyChanges: Cann>
624 18:13:32 t470p upowerd[1380]: energy 64.430000 bigger than full 64.050000
624 18:13:53 t470p kernel: CPU2: Core temperature above threshold, cpu clock throttled (total events = 279)
624 18:13:53 t470p kernel: CPU6: Core temperature above threshold, cpu clock throttled (total events = 279)
624 18:13:53 t470p kernel: CPU6: Package temperature above threshold, cpu clock throttled (total events = 1202)
624 18:13:53 t470p kernel: CPU2: Package temperature above threshold, cpu clock throttled (total events = 1202)
624 18:13:53 t470p kernel: CPU3: Package temperature above threshold, cpu clock throttled (total events = 1202)
624 18:13:53 t470p kernel: CPU7: Package temperature above threshold, cpu clock throttled (total events = 1202)
624 18:13:53 t470p kernel: CPU5: Package temperature above threshold, cpu clock throttled (total events = 1202)
624 18:13:53 t470p kernel: CPU1: Package temperature above threshold, cpu clock throttled (total events = 1202)
624 18:13:53 t470p kernel: CPU0: Package temperature above threshold, cpu clock throttled (total events = 1202)
624 18:13:53 t470p kernel: CPU4: Package temperature above threshold, cpu clock throttled (total events = 1202)
624 18:13:53 t470p kernel: CPU2: Core temperature/speed normal
624 18:13:53 t470p kernel: CPU6: Core temperature/speed normal
624 18:13:53 t470p kernel: CPU2: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU6: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU1: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU0: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU5: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU7: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU4: Package temperature/speed normal
624 18:13:53 t470p kernel: CPU3: Package temperature/speed normal
624 18:14:09 t470p mount.exfat[2730]: illegal UTF-16 sequence
624 18:14:09 t470p audit[2730]: ANOM_ABEND auid=1000 uid=0 gid=0 ses=2 pid=2730 comm="mount.exfat" exe="/usr/bin/mount.exfat-fuse" sig=6 res=1
624 18:14:09 t470p mount.exfat[2730]: failed to convert name to UTF-8
624 18:14:09 t470p kernel: audit: type=1701 audit(1592993649.131:74): auid=1000 uid=0 gid=0 ses=2 pid=2730 comm="mount.exfat" exe="/usr/bin/mount.exfat-fuse" sig=6 res=1
624 18:14:09 t470p systemd[1]: Created slice system-systemd\x2dcoredump.slice.
624 18:14:09 t470p systemd[1]: Started Process Core Dump (PID 2795/UID 0).
624 18:14:09 t470p audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2795-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostn>
6月 24 18:14:09 t470p kernel: audit: type=1130 audit(1592993649.151:75): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2795-0 comm="systemd" exe="/usr>
6月 24 18:14:09 t470p kdeinit5[1758]: "Could not enter folder /mnt/t5_1t/2t."
6月 24 18:14:10 t470p systemd-coredump[2796]: Process 2730 (mount.exfat) of user 0 dumped core.

Stack trace of thread 2730:
#0 0x00007f567b053ce5 raise (libc.so.6 + 0x3bce5)
#1 0x00007f567b03d857 abort (libc.so.6 + 0x25857)
#2 0x0000564b036bf026 n/a (mount.exfat-fuse + 0x2026)
#3 0x0000564b036c5786 n/a (mount.exfat-fuse + 0x8786)
#4 0x0000564b036bf9bc n/a (mount.exfat-fuse + 0x29bc)
#5 0x00007f567b20e3c8 fuse_fs_readdir (libfuse.so.2 + 0xe3c8)
#6 0x00007f567b20e59a n/a (libfuse.so.2 + 0xe59a)
#7 0x00007f567b2153d2 n/a (libfuse.so.2 + 0x153d2)
#8 0x00007f567b2164eb n/a (libfuse.so.2 + 0x164eb)
#9 0x00007f567b212c75 fuse_session_loop (libfuse.so.2 + 0x12c75)
#10 0x00007f567b20ab80 fuse_loop (libfuse.so.2 + 0xab80)
#11 0x00007f567b21b709 n/a (libfuse.so.2 + 0x1b709)
#12 0x0000564b036bf39c n/a (mount.exfat-fuse + 0x239c)
#13 0x00007f567b03f023 __libc_start_main (libc.so.6 + 0x27023)
#14 0x0000564b036bf45e n/a (mount.exfat-fuse + 0x245e)
6月 24 18:14:10 t470p systemd[1]: systemd-coredump@0-2795-0.service: Succeeded.
6月 24 18:14:10 t470p audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2795-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostna>
6月 24 18:14:10 t470p kernel: audit: type=1131 audit(1592993650.121:76): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2795-0 comm="systemd" exe="/usr>
lines 1-77/77 (END)

try ran fsck command

[t470p takethat]# fsck /dev/sdc1
fsck from util-linux 2.35.1
exfatfsck 1.3.0
Checking file system on /dev/sdc1.
WARN: volume was not unmounted cleanly.
File system version 1.0
Sector size 512 bytes
Cluster size 128 KB
Volume size 932 GB
Used space 147 GB
Available space 785 GB

ERROR: illegal UTF-16 sequence.
BUG: failed to convert name to UTF-8.
fsck: Warning… fsck.exfat for device /dev/sdc1 exited with signal 6.

在linux重新格式化exfat硬盘也还是出现这个问题

  1. 1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    #include<iostream>
    using namespace std;

    int main()
    {
    class a
    {};

    cout << sizeof(a) << endl;



    }

  2. https://blog.csdn.net/pingingchen/article/details/44594261

  3. 为什么空类型占一个字节: https://blog.csdn.net/imcdragon/article/details/6882875

  1. 为什么空类占用1个字节,而空数组布占呢
    https://bbs.csdn.net/topics/320170518
  1. c语言中的结构体中成员怎么不能直接初始化
    http://bbs.itheima.com/forum.php?mod=viewthread&tid=158477
  1. 先搞清楚初始化和赋值
    https://bbs.csdn.net/topics/390776522
  1. 为什么报错: error C3863: array type 'char [20]' is not assignable
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    #include<iostream>
    using namespace std;
    #define COMNumberLength 20

    enum enReaderNumber : int //读写器编号枚举类型
    {
    ENRNINREADER, //进站读写器
    ENRNVALUEREADER, //出站储值卡读写器
    ENRNTOKENREADER, //出站单程票读写器
    MAXENRN //枚举类型最大值
    };

    struct stReaderRunParam //读写器运行参数
    {
    char st_COMNumber[COMNumberLength]; //读写器串口号
    int st_Baudrate; //读写器通讯波特率
    int st_WorkType; //读写器工作类型
    int st_LogSize; //读写器日志文件容量
    };
    stReaderRunParam m_RunParam[MAXENRN]; //读写器运行参数


    int main()
    {

    //m_RunParam[1] = { "takethat",115200,2,1 };

    m_RunParam[1].st_Baudrate = 115200;
    m_RunParam[1].st_COMNumber = "tty/s3";
    m_RunParam[1].st_LogSize = 10;
    m_RunParam[1].st_WorkType = 1;
    //memset(m_RunParam, 0x00, 3 * sizeof(stReaderRunParam));
    cout << m_RunParam[3].st_Baudrate << endl;

    return 0;

    }
  1. 用VS查看结构体数组内存地址会
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    #include<iostream>
    #include <string.h>
    using namespace std;
    #define COMNumberLength 20

    enum enReaderNumber : int //读写器编号枚举类型
    {
    ENRNINREADER, //进站读写器
    ENRNVALUEREADER, //出站储值卡读写器
    ENRNTOKENREADER, //出站单程票读写器
    MAXENRN //枚举类型最大值
    };

    struct stReaderRunParam //读写器运行参数
    {
    int st_Baudrate; //读写器通讯波特率
    char st_COMNumber[COMNumberLength]; //读写器串口号

    int st_WorkType; //读写器工作类型
    int st_LogSize; //读写器日志文件容量
    };
    stReaderRunParam m_RunParam[MAXENRN]; //读写器运行参数


    int main()
    {

    //m_RunParam[1] = { "takethat",115200,2,1 };

    m_RunParam[1].st_Baudrate = 115200;
    strcpy(m_RunParam[1].st_COMNumber, "tty/s3");
    m_RunParam[1].st_LogSize = 10;
    m_RunParam[1].st_WorkType = 1;
    //memset(m_RunParam, 0x00, 3 * sizeof(stReaderRunParam));
    cout << m_RunParam[3].st_Baudrate << endl;

    return 0;

    }

https://www.cnblogs.com/tenjl-exv/p/7559674.html

  1. 1
    2
    3
    4
    5
    6
    7
    8
    int CReader_CD10A::checkCard(void* i_CardData, void* i_TradeData)
    {
    int iRet = 0;

    //iRet = m_cd->SZ_Check_Ticket(i_fd, *(stCheckTicketInfo*)i_CardData, *(stTradeInfo*)i_TradeData);
    iRet = m_cd->CD_AccessStation(*(_stAccessStation*)i_CardData);
    return iRet;
    }
  1. https://blog.csdn.net/u013687632/article/details/78616495
  1. c语言与指针
    https://blog.csdn.net/cooljune/article/details/18809179

初始化和赋值的区别
https://blog.csdn.net/gxnu/article/details/1832462

  1. 函数传参, 结构体强转:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    #define  _CRT_SECURE_NO_WARNINGS
    #include<iostream>
    using namespace std;


    typedef unsigned char U8;

    typedef struct stInitMode {
    char chModeStartTime[15]; // IN,模式发生时间(YYYYMMDDhh24mmss);
    U8 ucModeID; // IN,模式ID (参见第4分册“3.2.11 降级运营模式ID”)
    }_stInitMode;


    struct stInitReaderInfo_CD
    {
    char chLineNumber[3]; // IN,线路编码
    char chStationNumber[3]; // IN,车站编码
    char chEquipType[3]; // IN,设备类型
    char chEquipNumber[4]; // IN,3bytes设备编号
    U8 EquipWorkMode; // IN,设备工作模式(读写器工作模式:0x00——使用指令中的工作模式;0x10——ES;0x20——非付费区BOM;0x21——付费区BOM;0x22——TVM;0x23——TCM;0x24——PCA;0x40——进站AGM;0x41——出站AGM)
    U8 DownWorkModenum; // IN,模式数量
    char chRCodeBaudrate[12]; // IN,关联扫码枪通讯波特率
    _stInitMode Mode[16];
    // stInitMode_CD Mode[16];

    char chRCodeCOM[10]; // IN,关联扫码枪串口号
    char chModeStartTime[15]; // IN,模式发生时间(YYYYMMDDhh24mmss);
    char chRCodeServerAddr[256]; // IN, 支付平台接入地址,例如http://182.140.238.35:61082/
    U8 ucModeID; // IN,模式ID (参见第4分册“3.2.11 降级运营模式ID”)
    bool Mark_IsUseQRcode; //take:add是否启用二维码 在读写器里传参标志需要
    };

    typedef struct stInitReaderInfo {
    char chLineNumber[3]; // IN,线路编码
    char chStationNumber[3]; // IN,车站编码
    char chEquipmentType[3]; // IN,设备类型
    char chEquipmentNumber[4]; // IN,3bytes设备编号
    U8 ucEquipWorkMode; // IN,设备工作模式(读写器工作模式:0x00——使用指令中的工作模式;0x10——ES;0x20——非付费区BOM;0x21——付费区BOM;0x22——TVM;0x23——TCM;0x24——PCA;0x40——进站AGM;0x41——出站AGM)
    U8 ucDownWorkModenum; // IN,模式数量
    _stInitMode Mode[16];
    //char chEquipmentID[17]; // OUT,16位PSAM卡ID
    } _stInitReaderInfo;


    typedef struct _stRCodeInfo {
    char chRCodeCOM[10]; // IN,关联扫码枪串口号
    char chRCodeBaudrate[12]; // IN,关联扫码枪通讯波特率
    char chRCodeServerAddr[256]; // IN, 支付平台接入地址,例如http://182.140.238.35:61082/
    } _stRCodeInfo;




    void startReaderAFC(void* i_StartAFCData)
    {


    /****>>>>>>>>>>>>>>>>>>take:第一个参数结构体***>>>>>>>>>>>>>>>>>>>>>>>>>******************/

    _stInitReaderInfo take_stInitReaderInfo;
    strcpy(take_stInitReaderInfo.chLineNumber, ((stInitReaderInfo_CD*)i_StartAFCData)->chLineNumber);
    strcpy(take_stInitReaderInfo.chStationNumber, ((stInitReaderInfo_CD*)i_StartAFCData)->chStationNumber);
    strcpy(take_stInitReaderInfo.chEquipmentType, ((stInitReaderInfo_CD*)i_StartAFCData)->chEquipType);
    strcpy(take_stInitReaderInfo.chEquipmentNumber, ((stInitReaderInfo_CD*)i_StartAFCData)->chEquipNumber);
    take_stInitReaderInfo.ucEquipWorkMode = ((stInitReaderInfo_CD*)i_StartAFCData)->EquipWorkMode;
    take_stInitReaderInfo.ucDownWorkModenum = ((stInitReaderInfo_CD*)i_StartAFCData)->DownWorkModenum;
    //take_stInitReaderInfo.Mode = ((stInitReaderInfo_CD*)i_StartAFCData)->Mode;
    memcpy(take_stInitReaderInfo.Mode, ((stInitReaderInfo_CD*)i_StartAFCData)->Mode, sizeof(take_stInitReaderInfo.Mode));//take:这样可以吗?

    /***<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<take:第一个参数结构体**<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<******/


    /*>>>>>>>>>>>>>>>>>>>>>>>>>>>take:第二个参数*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    _stRCodeInfo *ptr_stRCodeInfo = (_stRCodeInfo*)malloc(sizeof(_stRCodeInfo));

    strcpy(ptr_stRCodeInfo->chRCodeCOM, ((stInitReaderInfo_CD*)i_StartAFCData)->chRCodeCOM);
    strcpy(ptr_stRCodeInfo->chRCodeBaudrate, ((stInitReaderInfo_CD*)i_StartAFCData)->chRCodeBaudrate);

    strcpy(ptr_stRCodeInfo->chRCodeServerAddr, ((stInitReaderInfo_CD*)i_StartAFCData)->chRCodeServerAddr);

    cout << take_stInitReaderInfo.Mode[0].chModeStartTime << endl;
    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*******************************************************<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
    // cout << ((test*)i_StartAFCData)->chEquipNumber << endl;



    // cout<<((stInitReaderInfo_CD*)i_StartAFCData)->chEquipmentNumber;
    }

    int main()
    {
    stInitReaderInfo_CD temp[2];


    // strcpy(temp[0].chEquipNumber_, "aa");
    temp[0].EquipWorkMode = 34;

    strcpy(temp[0].Mode[0].chModeStartTime, "201804-=18");
    strcpy( temp[0].chLineNumber, "nu");

    strcpy(temp[0].chStationNumber,"st");
    strcpy(temp[0].chEquipType,"tp");
    strcpy(temp[0].chEquipNumber, "chn");


    temp[1] = { 0 };

    startReaderAFC(&temp);


    }
  1. 回车(CR)与换行(LF),即 ‘\r’与’\n’的区别

https://blog.csdn.net/u013540854/article/details/37593357

http://www.ruanyifeng.com/blog/2006/04/post_213.html

彻底搞定回车0d和换行0a
https://blog.csdn.net/e_wsq/article/details/72957218

  • nobody
1
2
3
4
5
此处填入服务端要监听的端口。需要选择 1024 或以上的端口号,否则启动 ss-server 时将会需要 root 权限,而默认的服务文件则是以 nobody 用户启动 Shadowsocks 的。

如需选用低于 1024 的端口,也可执行命令 sudo setcap 'cap_net_bind_service=+ep' /usr/bin/ss-server 赋予相应权限,后续就可以使用 nobody 用户或普通用户启动 Shadowsocks。

或执行 systemctl edit shadowsocks-libev 命令,并输入以下内容:

Why are ports below 1024 privileged? [closed]

Fork me on GitHub